EML:
> I've written a milter to replace a hand-coded SMTP relay. This works, 
> but I'm having a problem handling bounces.
> 
> The 'relay' actually handles private mailing lists which must be 
> anonymised (for minors). A user sends a mail to 'virtual' addresses, and 
> the relay does a database lookup, and forwards the incoming mail on to 
> the real addresses of the recipients. 'Virtual' in this sense means that 
> all users get a made-up address ('[email protected]'), so the 
> relay just converts between real and made-up private addresses/./
> 
> In the Postfix equivalent, the new milter doesn't work without this 
> entry in virtual_alias:
> 
> @private.example.com? my-email-address
> 
> Where 'my-email-address' is a local address (which isn't required or 
> monitored). So, Postfix first checks the incoming address in 
> virtual_alias; if there is a match, the milter is called. The milter 
> then anonymises and sends on the mail to the real recipient addresses. 
> Note that general name translation is /not/ handled in virtual_alias, 
> because there are hundreds of names, and they're constantly changing, 
> and this is all tied up with a membership database that does lots of 
> other things.
>
> This all works, but there's a problem with bounces. If a bounce is 
> returned with RCPT TO set to <>, postfix/bounce takes over, looks up 
> virtual_alias, and does local delivery to 'my-email-address', /without 
> calling the milter/. This is no good, since I don't want to read all the 

You can control bounce inspection with internal_mail_filter_classes
(you would need to enable non_smtpd_milters for that), but locally
generated bounces is not recommended because that can result in an
email explosion (one message geneates a bounce which generates a
bounce which geneates a bounce and so on).

For a good recommendation we need to know NOT what solution is (i.e.
NOT the frankenstein solution that you are trying to implement).
but the problem you are trying to solve (something with sending
email with anonymized senders).

        Wietse

Reply via email to