|
From: Gerald H. <fet...@pu...> - 2011-01-22 14:51:10
|
Thank you Sunil for the quick and very enlightening reply! On 22.01.2011 04:10, Sunil Shetye wrote: > There are two SMTP transactions involved. You have to check the SMTP > messages before the 'Trying to connect to 127.0.0.1/25' below. Ah, now suddenly things are starting to make sense for me. > Due to 'set no bouncemail', fetchmail is sending the bounce to the postmaster instead of the original sender. Oh... So basically It is impossible to switch off bounce mails, as the "no bouncemail" option is actually more like "send bouncemail to someone else" ? The man page says: "Setting postmaster to the empty string causes such mail as described above [this is referring to bouncemail] to be discarded - this however is usually a bad idea" Not sure why this would be such a bad idea though, the original mail isn't going to be deleted from the POP3 server anyway if delivery fails :-) I've tried setting the postmaster string to an empty string to avoid the long delays of fetchmail trying to send to a nonexisting postmaster, however: This only disables trying to deliver the bounce to the smtphost, but not to the localhost MTA: --- --- Log with postmaster string empty --- --- fetchmail: forwarding to mail.asp.the-exchange-asp-provider.de fetchmail: SMTP> MAIL FROM:<som...@ma...> SIZE=2289 fetchmail: SMTP< 250 2.1.0 Sender OK fetchmail: SMTP> RCPT TO:<fir...@th...> fetchmail: SMTP< 550 5.1.1 User unknown fetchmail: SMTP error: 550 5.1.1 User unknown fetchmail: SMTP listener doesn't like recipient address `fir...@th...' Trying to connect to 127.0.0.1/25...connected. fetchmail: SMTP< 220 mail.machine-running-fetchmail.net ESMTP fetchmail: SMTP> HELO envy.machine-running-fetchmail.net fetchmail: SMTP< 250 mail.machine-running-fetchmail.net Ok. fetchmail: SMTP> MAIL FROM:<> fetchmail: SMTP< 250 Ok. fetchmail: SMTP> RCPT TO:<> fetchmail: SMTP< 500 Invalid address fetchmail: SMTP> QUIT fetchmail: SMTP< 221 Bye. fetchmail: no address matches; no postmaster set. fetchmail: SMTP> RSET fetchmail: SMTP< 250 2.0.0 Resetting . not flushed --- --- Log with postmaster string empty --- --- If the postmaster string is empty, IMHO trying to send something to an empty email address using the localhost MTA is quite futile and should not be tried :-) > The original SMTP transaction continues. As there are no valid recipients, fetchmail tries to send the mail to the postmaster as a last resort. This is to ensure that the mail is not lost permanently. The mail would have stayed on the POP3 server anyway and 5 minutes later crontab would have made fetchmail try again :-) > As mentioned above, the second recipient is for the original message and is not linked to the bounce message. > > You have to ensure that the postmaster address is valid and acceptable on your smtphost. Ensure that both the bounce message and the the last-resort mails go to the postmaster on the smtphost. If the postmaster account were valid on the smtphost, am I correct in the assumption that he would get the original content of the mail? (and would that lead to the mail then being deleted from the POP3 server? Or would the postmaster get the mail each time cron starts my fetchmail?) I would rather not want someone else to get the mail (contents may potentially not be for him to see), nor would I want to have it deleted on the POP3 server just because "someone" may have gotten it. Therefor I almost HAVE to set postmaster to an empty string :-) > - postmaster option is overloaded. It is being used as a last-resort address and for other internal messages when connected to 'smtphost' and for bounce messages when connected to 'localhost'. The fetchmail user has to ensure that the postmaster is acceptable on both 'smtphost' and 'localhost'. Would be nice if someone could clean up this overload in fetchmail v7 and separate the two things. If we had a "last-resort-error-mail-address option" in addition to the postmaster option, setting that to an empty string would solve my problems! (if that would disable sending of last resort mails) Basically I just want fetchmail to fail without trying to send any bounces (except for of course exiting with a non-zero errorlevel, so cron will send me a mail that something went wrong, so that it can be looked into) :-) > - There is no valid reason why fetchmail should use a last-resort address. After all, if a bounce message has already been sent and accepted, the right thing to do would be to just drop the mail. Adding a default address means that the postmaster would get flooded with all the 'User unknown' messages. This design must have been to ensure that local misconfiguration does not lead to permanent loss of mail. I'm getting the impression that I'm misusing fetchmail for something it wasn't meant, and I would like to officially apologize to everyone for that :-) > Solution for now: > - Ensure that 'postmaster' is acceptable on your 'smtphost'. > - Ensure that 'postmaster' inbox is cleaned up regularly. I guess I'll have my postmaster set to an empty string, to make sure nothing gets delivered and I'll have to learn with the long delays it takes trying for localhost to realize that sending a mail to "" isn't possible. Thank you very much! I've certainly learned a lot about how fetchmail handles bounces and last resort mails now :-) Gerald |