When I receive email from my server with an empty "Return-Path", The "Add to WhiteList" feature of the CGI don't work.
Why ? If "Return-Path" is empy, it's "From:" (who is good) that is use no ?
No.
There are only two possible addresses considered for whitelisting: 'Return-path' and the header 'X-Primary-Address'. In fact, the X-Primary-Address is only considered if it is "close enough" to the Return-path.
There is a reason we do this. TMDA whitelists and checks the Envelope Sender. By "Envelope Sender" I mean the address given by the sender of the mail NOT as part of the email message itself (not the "from:" or "reply-to:" header), but given as part of the SMTP transaction itself. When a sender sends email, it talks to the SMTP server like this:
Server> I am a mailserver. Welcome. Sender> HELO my.hostname.com Server> OK - Hello, 'my.hostname.com', nice to meet you. Sender> MAIL FROM: [EMAIL PROTECTED] Server> OK Sender> RCPT TO: [EMAIL PROTECTED] Server> OK Sender> DATA Server> Go ahead, send the mail. End with '.' on its own line. Sender> From: [EMAIL PROTECTED] Sender> To: [EMAIL PROTECTED] Sender> Subject: Test email Sender> Sender> This is a test email. Enjoy! Sender> . Server> OK - Got it, and delivering it. Sender> BYE Server> OK - See you.
In the simplified example above, the Envelope Sender is "[EMAIL PROTECTED]", and the From Address is "[EMAIL PROTECTED]".
In most modern mail clients the Envelope Sender is usually set to the same as the From Address, but this is not always the case. The "Envelope Sender" is considered to be more reliable because this is where the receiving server will send a bounce if something goes wrong... the From Address is hardly ever used at all any more.
When TMDA receives a message, it uses the Envelope Sender to check against the whitelists to see if a message is allowed through. When a message is queued in the pending queue, it puts this Envelope Sender in a header in the message - the "Return-Path" header. When you whitelist using TMDA-cgi, this Return-Path is added to the list. When the person replies to TMDA's challenge and releases their message, the Return-Path is also added to the whitelist. This is so that the next time they send a message, with the same Envelope Sender, they are allowed through automatically.
-- Jim Ramsay "Me fail English? That's unpossible!"
_____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
