Am 27.12.18 um 02:05 schrieb Andrey Repin: > Greetings, Wietse Venema! > >> Andrey Repin: >>> Greetings, All! >>> >>>> I think I just broke my mail system. I'd like a quick help if possible. >>>> I have a remote server that accepts the mail for domain right now. >>>> The mail is retrieved from it by fetchmail and pushed to the local postfix >>>> instance to be delivered to the user mailboxes using >>> >>>> mda "/usr/sbin/sendmail -iG -N never -f %F -- %T" >>> >>>> The problem is, only virtual recipients are delivered correctly. >>>> An attempt to deliver mail for real users end in message being trashed with >>>> "delivery loop detected". >>>> The log says "bounced", but it is nowhere to be found. Not on postmaster, >>>> neither on the sender's address. >>> >>> Ok, I've managed to capture a bounce. >>> Here's headers of a message that was received (and bounced) by postfix. >>> Yes, the final destination is [email protected], and the user actually >>> exists. > >> Rule number one: email routing MUST NOT depend on the message >> header content and it MUST NOT depend on the message body content. > > It's neither. I have explicitly set final destination for each remote account. > If there any way to work around it, until the migration is done and the remote > server is decomissioned?
Without fetchmail configuration details and logs, it's too hard to debug remotely. As Wietse stated, %T might be dangerous, if it's a single-user mailbox, you might as well just specify the user's name instead. Else you _must_ make sure that fetchmail can properly derive envelope recipient headers (assuming that your mailbox stores them in some form), and that in turn assumes that your fetchmail configuration makes for a constant recipient... In which case you need to make sure that the messages you inject from fetchmail does not end up in the mailbox you are fetching from - which is what might be happening. For the fetchmail end, see <http://www.fetchmail.info/fetchmail-FAQ.html#G3> (again, remove passwords).
