procmail
[Top] [All Lists]

Re: Help needed testing antispam tool with procmail

2007-07-17 21:08:14
Hello, 

Sebastian Krohn writes: 


You can do this with procmail. I use the following recipe to get the IP
from the sending host: 

---
:0
*^Received:.from.*\(\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+\).*by.schatten.darksystem.net
 ..qpsmtpd
* MATCH ?? ^^\/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
{ SENDERIP = $MATCH }
--- 

You will have to look in your mails to see how your MTA adds the
Received-headers. Often one can simply use the topmost one. In my case
the MTA accepting the Mails from the outside world isn't the one
running procmail so I had to tweak it a little bit but you should get
the idea. :-)

Thank you.  I definately will save this.  I got so frustrated trying to 
figure this out, I just added a section to DynaStop to extract the IP 
address for me. 

 --- 

DynaStop: Stopping spam one dynamic IP address at a time.
http://tanaya.net/DynaStop/
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail