Carlos E. R. wrote:
The 03.09.08 at 15:23, Andreas Winkelmann wrote:
Ok, a few lines from fetchmail's manpage:
... Return codes which fetchmail treats as antispam responses and discards the message can be set with the `antispam' option. This is one of the only three circumstance under which fetchmail ever discards mail (the others are the 552 and 553 errors described below, and the suppression of multidropped messages with a message-ID already seen). ...
In short, only errors 552 and 553 without the antispam-option lets fetchmail delete the mail from the server. And of course double msg-ids.
In your case the best choice will be "antispam 550" so the mail will be deleted directly from the server, and if you want to supress bounce-mails set "spambounce" to no.
Notice that the 550 response also causes mail to be deleted from the server (verified by experiment); in theory, it has ben downloaded and bounced back, so it can be deleted. That works.
What it happens is that if I set the nobounce option, the bounce mail goes instead to me (good), but it also means that the original mail is not deleted from the server.
What I'm saying is that the behaviour of deleting or not deleting changes if I use the nobouncemail option, and that is not documented.
Yeah, you're right, i found it in the source. ... /* handle SMTP errors based on the content of SMTP_response */ /* return of PS_REFUSED deletes mail from the server; PS_TRANSIENT keeps it */ ... return(run.bouncemail ? PS_REFUSED : PS_TRANSIENT); ... This means if run.bouncemail is true, the function returns PS_REFUSED. If run.bouncemail is false return with PS_TRANSIENT.
But maybe i had misunderstood you.
I could treat it as spam - which it is, in this case - but it could be a legitimate mail containing an atachement which I reject automatically. I don't think that treating all rejects as spam is correct.
I don't know if it is only undocumented or is a bug. Maybe you want to change it and recompile fetchmail.
Which leaves me with another problem: how to tell postfix NOT to send emails comming from fetchmail-daemon,
Aparently this could be done with:
/^From:.*fetchmail-daemon\@nimrodel\.valinor HOLD
There was a missing "/" at the end (valinor/). It is working now.
in the /etc/postfix/header_checks file. But it doesn't work.
Is HOLD really what you want?
Not really. I want it redirected for manual inspection and deletion. I'm thinking of using "reject", which probably would send them back to the user "fetchmail-daemon", which is the postmaster... I will try that right away [...] No, it is worse:
Sep 8 16:50:46 nimrodel postfix/cleanup[8423]: DBF2ACAF86: reject: header From: FETCHMAIL-DAEMON@nimrodel.valinor from localhost[127.0.0.1]; from=
to= proto=ESMTP helo=<localhost>: Message content rejected Sep 8 16:50:47 nimrodel amavis[8416]: Rejected by MTA: 550 End data with <CR><LF>.<CR><LF> Error: Message content rejected
REDIRECT is supported in an actual snapshot from Postfix, not in a release. And of course not in the suse-postfix. -- Andreas