On 2010-09-05 21:51:27 +0200, Kjetil Kjernsmo wrote: > I have a small number of users that are no longer using the system, but > have no known forwarding address. Thus, I'd like to auto-respond to > messages to these users (after spamassassin), but I'd like to respond with > a permanent error (550, right?)
551 would be better. But last time I looked, plugins couldn't return specific codes. > so that mailing list system can automatically remove these addresses > from their lists. Furthermore, I'd like to include a long text > explaining where the user went. > > I'm not familiar enough with SMTP to know if such a text can be included in > a 550-message, but if it can, this sounds like a pretty trivial plugin. Has > anyone written such a thing? I use that one: sub hook_rcpt { my ($self, $transaction, $rcpt) = @_; return DECLINED unless $rcpt->notes('redirect'); if ($rcpt->notes('redirect') =~ /(.*)\@(.*)/) { return DENY, "Mail address disabled; try <" . $rcpt->notes('redirect') . ">"; } else { my ($local, $domain) = $rcpt->address =~ /(.*)\@(.*)/; return DENY, "Mail address disabled; try <" . $local . '@' . $rcpt->notes('redirect') . ">"; } } Of course you need another plugin to set the "redirect" note on the recipient, but that's part of my general address-handling. hp -- _ | Peter J. Holzer | Openmoko has already embedded |_|_) | Sysadmin WSR | voting system. | | | h...@hjp.at | Named "If you want it -- write it" __/ | http://www.hjp.at/ | -- Ilja O. on commun...@lists.openmoko.org
signature.asc
Description: Digital signature