[Mimedefang] Re: filter_recipient questions (Jan Pieter Cornet & David Skoll)

Dirk the Daring dirk at psicorps.org
Fri Apr 28 15:08:15 EDT 2006


   Thanks to David and Jan for replying:

On Fri, 28 Apr 2006 mimedefang-request at lists.roaringpenguin.com wrote:

>------------------------------
>> 	1) Is filter_recipient called for each RCPT TO: (as would
>> 		appear to be the case), or at DATA?
>
>At RCPT To:

   And David noted the same thing. That was my reading of the docs, I
just wanted to be sure.

>>         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)?
>
>Nope, REJECT will reject that single recipient, not any other recipients.
>We do that all the time, works fine. Why do you think a REJECT here
>stops the entire email?

   Because the documentation states that DISCARD affects all recipients,
but is silent on the subject of REJECT. Since no differentiation is
made, the "safe" conclusion is that REJECT and DISCARD have similar
results (rather than assuming that REJECT has a less-broad scope and
coding a filter that inadvertently REJECTs entire messages because of a
wrong assumption). At least if I was wrong, I would have been wrong on
the side of not inadvertently dumping entire E-Mails.

>Some MUAs will abort the entire transmission, when one of the RCPT TOs
>fail. That is to be construed as a feature. MTAs will do "the right
>thing" and continue with the email for the other recipients (if any).

   The MTA in this case is sendmail v8.13, and the host does not talk to
any MUAs, only other MTAs.

>That won't work, just return('REJECT', "Recipient invalid");

   I was hoping I could do that. Much simpler (altho it'll also involve
being nice enuf to the SPAMmers to give them a 5xx, and I really don't
like being nice to them.

>Ugh. You really do such stuff in production code? I hope nobody
>has the idea to start a JoinValidation project at your site to
>scrutinize SQL code, and creates an email address after the
>project name.

   I'm not a Perl programmer, nor an SQL programmer for that matter. And
all projects at my site are initiated, managed, performed and reviewed
by me. And Harvey the Rabbit. Same thing with all E-Mail addresses. :-)

>You don't ever get here if all recipients are REJECTed ;)

   Yep, that would be my preference, to REJECT in filter_recipient.

Dirk



More information about the MIMEDefang mailing list