Quirin Hofstaetter <[EMAIL PROTECTED]> writes: > > > As you see the rule "from <> ok" is applied. But the envelope sender IS > > > NOT <> but '"" <@prihost.com>' like in the From line. > > > > Incorrect. The envelope sender is logged by TMDA in the 'Sndr:' line > > above, and it is <>. > > Ok, then you can perhaps explain the behavior of TMDA in the following > case: I've tested this by sending a message manually via telnet: > | [EMAIL PROTECTED]:~ > telnet mail.de.loc smtp > | Trying x.x.x.x... > | Connected to mail.de.loc. > | Escape character is '^]'. > | 220 mail.de.loc ESMTP > | helo workstation > | 250 mail.de.loc > | mail from: xyz <@yahoo.com> > | 250 ok > | rcpt to: [EMAIL PROTECTED] > | 250 ok > | data > | 354 go ahead > | From: xyz <@yahoo.com> > | To: [EMAIL PROTECTED] > | Subject: Spam-Mail > | > | This is spam! > | . > | 250 ok 1061295888 qp 10778 > | quit > | 221 mail.de.loc > | Connection closed by foreign host. > > The result is: message is passing TMDA with the following logfile entry: > > | Date: Tue Aug 19 14:25:45 CEST 2003 > | Sndr: <> > | From: xyz <@yahoo.com> > | To: [EMAIL PROTECTED] > | Subj: Spam-Mail > | Actn: OK (from <> ok) (369) > > 'from <> ok' ALTOUGH the envelope sender IS DEFINITIVELY NOT <> > Can anybody explain that to me and tell me how to work around it?
Sure. Qmail can't parse that envelope sender address and therefore provides an empty SENDER environment variable to TMDA. By the time TMDA sees it, the bogus "@yahoo.com" envelope sender is long gone. TMDA's email address parser has the same problem. When tmda-filter tries to parse the bogus From: field, it gets back an empty string for the address part. So the "from @yahoo.com drop" rule doesn't work. The only workaround I can think of is what Jason suggested: checking the From: field with regular expression. You've apparently had success with that... > > Oh, perhaps the 'headers' or 'headers-file' source would work for you > > since you can use a regular expression. See > > http://tmda.net/filter-sources.html. > > Perfect - that's it! Thank you! Tim _____________________________________________ tmda-users mailing list ([EMAIL PROTECTED]) http://tmda.net/lists/listinfo/tmda-users
