NO_DNS_FOR_FROM

Jan-Peter Koopmann Jan-Peter.Koopmann at SECEIDOS.DE
Tue Nov 2 16:24:25 GMT 2004


On Tuesday, November 02, 2004 4:44 PM MailScanner mailing list wrote:

> As I tested this a week or so ago and confirmed that the
> 'NO_DNS_FOR_FROM' test will not work unless the recognized
> Envelope_From header is at the top, you will really need to convince
> me that the location does not matter. 

That's not what I said. I said: If you specify envelope_sender_header
then this header will be used regardless of its position. Let me show
you the relevant part of the code:

---snipp---
      
  # Use the 'envelope-sender-header' header that the user has specified.
  # We assume this is correct, *even* if the fetchmail/X-Sender screwup
  # appears.
  $envf = $self->{conf}->{envelope_sender_header};
  if ((defined $envf) && ($envf = $self->get($envf)) && ($envf =~ /\@/))
{
    goto ok;
  }

... stuff removed ...

  # procmailrc notes this, amavisd are adding it, we recommend it
  # (although we now recommend adding to Received instead)
  if ($envf = $self->get ("X-Envelope-From")) {
    # heuristic: this could have been relayed via a list which then used
    # a *new* Envelope-from.  check
    if ($self->get ("ALL") =~
/(?:^|\n)Received:\s.*\nX-Envelope-From:\s/s) {
      dbg ("X-Envelope-From header found after 1 or more Received lines,
cannot trust envelope-from");
    } else {
      goto ok;
    }
  }

---snapp---

> When MS placed the Envelope From header at the bottom, SA refused to
> 'trust' it and would therefore skip the 'NO_DNS_FOR_FROM' test.
> 
> Here is the log entry that proves that:
>> "debug: X-Envelope-From header found after 1 or more Received lines,
>> cannot trust envelope-from"

Because no option was set it used X-Envelope-From and since that one was
below the received lines it did not work.

> To cast my vote to Julian's poll, I prefer option 'A' to
> change MS's entry to "X-Envelope-From:" for the shallow but
> simple reason that its what SA expects by default, hence a
> pseudo-standard. 

What happens if you have several MailScanners involved in a mail
transfer and all of them use "X-Envelope-From". Then count fetchmail in
and here the trouble starts... Personally I so not think of this as a
clean solution. There is a reason all (?) MailScanner headers have
%org-name% in it...

You will achieve the same thing if you put a suitable line in
spam.assassin.prefs.conf. I agree though that the user still would have
to change the file at least once. On the other hand: He/She should do
that anyways to set the appropriate bayes_ignore_header.


Kind regards,
  JP

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the MAQ (http://www.mailscanner.biz/maq/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).




More information about the MailScanner mailing list