This is a discussion on postfix & fetchmail (not flushed) within the alt.comp.mail.postfix forums, part of the Mail Servers and Related category; Hi out there, i've running Postfix as MTA and fetchmail to get mails from my ISP (t-online). Trying ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi out there,
i've running Postfix as MTA and fetchmail to get mails from my ISP (t-online). Trying to prevent getting spam i have included some rules in Postfix. in body_checks.regexp i have somthing like this: /name=\"(.*)\.(bat|chm|cmd|com|do|exe|hta|jse|rm|sc r|pif|vbe|vbs|vxd|xl)\"$/ REJECT Attachments dieses Dateiformats nehmen wir aus Sicherheitsgruenden nicht an Postfix sends fetchmail the code 450 and I would expect that fetchmail discards the mail if I start fetchmail with the following options: fetchmail -F -L /var/log/fetchmail -Z 450,554 But this doesn't work. fetchmail always says "...not flushed". Why ? These mails will still be left at my ISP-Account. What i am missing? THX 4 any hint. Stefan |
|
|||
|
On Wed, 11 Aug 2004 11:36:31 +0200, Stefan Wegner <steve.w@t-online.de> wrote in <ef5pu1-oaq.ln1@000540086477320040390001.home.t-online.de>:
> i've running Postfix as MTA and fetchmail to get mails from my ISP > (t-online). Trying to prevent getting spam i have included some rules in > Postfix. > in body_checks.regexp i have somthing like this: > /name=\"(.*)\.(bat|chm|cmd|com|do|exe|hta|jse|rm|sc r|pif|vbe|vbs|vxd|xl)\"$/ > REJECT Attachments dieses Dateiformats nehmen wir aus > Sicherheitsgruenden nicht an If you are using fetchmail, I would recommend DISCARD above REJECT, because REJECT only makes sense when a mailserver is connecting directly to your machine. That mailserver (or spammer) will then handle the reject message. If it's legitimate mail, that person will get a message. If it's spam, nothing will happen. But with fetchmail, instead of the real sending machine, it's your server that has to deal with deciding what to do. It will generate a bounce message and send it to what it presumes is the sender. If it's spam, that sender is probably fake, so you might be sending the bounce to an innocent person, or a non-existent address. If you change REJECT to DISCARD, fetchmail will deliver it and the message will disappear, and no unnecessary bounce messages will be generated. -- Kind regards, Michel Klijmij ICQ/MSN in headers http://michel.klijmij.net/ |
|
|||
|
Michel Klijmij schrieb:
.... > If you change REJECT to DISCARD, fetchmail will deliver it and the message > will disappear, and no unnecessary bounce messages will be generated. > OK, should work, but as i understood man fetchmail I can decide on what SMTP-Errors (with the option -Z 450) fetchmail(!) will discard the mail without handing it over to Postfix. Postfix only sends the code to fetchmail so that fetchmail knows how to handle this mail. Am i right ? Anyway your hint (DISCARD instaed of REJECT) should work for me, cause I dont want these attachments ever. Stefan |
|
|||
|
On Thu, 12 Aug 2004 20:16:29 +0200, Stefan Wegner <steve.w@t-online.de>
wrote in <8aosu1-5ta.ln1@000540086477320040390001.home.t-online.de>: > Michel Klijmij schrieb: > > ... >> If you change REJECT to DISCARD, fetchmail will deliver it and the message >> will disappear, and no unnecessary bounce messages will be generated. >> > > OK, should work, but as i understood man fetchmail I can decide on what > SMTP-Errors (with the option -Z 450) fetchmail(!) will discard the mail > without handing it over to Postfix. I've looked, and it should if postfix returns 450. But with reject, it probably gives 550 or 554. Have you checked the actual error code postfix gives? If fetchmail doesn't, then that's a fetchmail problem, not a postfix one I think. -- Kind regards, Michel Klijmij ICQ/MSN in headers http://michel.klijmij.net/ |