[Mimedefang] filter_recipient questions

David F. Skoll dfs at roaringpenguin.com
Fri Apr 28 09:29:07 EDT 2006


Dirk the Daring wrote:

> 	1) Is filter_recipient called for each RCPT TO:

Yes.

>         2) The documentation states that if filter_recipient returns
> 		DISCARD, the message is discarded for ALL Recipients. Is
> 		this also true of REJECT (as would also appear to be
> 		the case)?

No.  A REJECT only rejects that particular RCPT command.  This is just
how milter works.

> 	3) Since it looks like filter_recipient can't be used to
> 		selectively (on a per-Recipient basis, allowing to some
> 		but not all) reject/discard a connection,

It can selectively reject a RCPT command (end result is that sendmail
replies with a 5xx code), but it can't selectively discard.  If you
wish to selectively discard recipients, you need to do it in filter_begin
and remove the offending recipients.

>	       can I have it
> 		alter a given Recipient envelope address so I can look
> 		for that "flag" in filter_begin and remove the
> 		Recipient there?

No, but seeing as all recipients are available in filter_begin in @Recipients,
you can do your processing there if you only want to selectively remove
recipients (rather than 5xx'ing them.)

Regards,

David.



More information about the MIMEDefang mailing list