• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Postfix email redirect (from to same address) broken

B

brooks

Guest
Of the many problems and architectural issues with 9.0.1 I've yet to be able to find a solution to this one.

Setup:

Hosted domain: abc.net
Email redirect: [email protected]-> [email protected]

Problem: If you send mail to a redirect (forwarder) using the same address as the redirection end point the mail is dropped by postfix.

For example, Amy sends herself a message using a remote mail service using the "From:" address "[email protected]" to her account at abc.net ([email protected]). The mail is silently dropped by Postfix, no error messages, no bounced messages, nothing.

If I setup a shell account under Linux with a normal ".forward" file and do the same test the mail is correctly forwarded.

I've enabled verbose logging (a nice change from qmail) to try to track this down and it looks like it's something in the "trivial-rewrite" engine:

Here's a excerpt from the mail log: Notice the first (senders address) attribute is empty.

Apr 20 11:49:46 ds postfix/trivial-rewrite[1523]: `' -> `[email protected]' -> (`smtp' `cbs.net' `[email protected]' `4096')
Apr 20 11:49:46 ds postfix/trivial-rewrite[1523]: send attr flags = 0
Apr 20 11:49:46 ds postfix/trivial-rewrite[1523]: send attr transport = smtp
Apr 20 11:49:46 ds postfix/trivial-rewrite[1523]: send attr nexthop = cbs.net
Apr 20 11:49:46 ds postfix/trivial-rewrite[1523]: send attr recipient = [email protected]
Apr 20 11:49:46 ds postfix/trivial-rewrite[1523]: send attr flags = 4096

Here's the same excerpt with the only difference being that the mail is sent to [email protected] from [email protected].

Apr 20 11:32:37 ds postfix/trivial-rewrite[828]: `[email protected]' -> `[email protected]' -> (`smtp' `cbs.net' `amy@cbs' `4096')
Apr 20 11:32:37 ds postfix/trivial-rewrite[828]: send attr flags = 0
Apr 20 11:32:37 ds postfix/trivial-rewrite[828]: send attr transport = smtp
Apr 20 11:32:37 ds postfix/trivial-rewrite[828]: send attr nexthop = cbs.net
Apr 20 11:32:37 ds postfix/trivial-rewrite[828]: send attr recipient = [email protected]
Apr 20 11:32:37 ds postfix/smtp[921]: 1110DB7076B: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10027, delay=0.13, delays=0.03/0/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 21D69B70769)

For some reason the mail is never being queued. I've searched the Postfix mailing lists, etc. for similar problems but came up empty. After testing the shell .forward functionality I'm fairly confident that this bug is specific to the Plesk postfix implementation.
 
works in my postfix just fine.

try a postfix set-permissions and restart postfix.
 
I did a "postfix set-permissions" then restarted postfix but it still behaves the same. This is a CentOS 5.3 based server.

From different than the forwarder destination:

Apr 24 11:39:37 ds postfix/qmgr[27353]: A3A65B7076E: from=<[email protected]>, size=1549, nrcpt=1 (queue active)
Apr 24 11:39:37 ds postfix/smtp[27433]: 93619B70770: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10027, delay=0.13, delays=0.02/0.01/0.04/0.05, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as A3A65B7076E)

From same as the forwarder destination:
Apr 24 11:38:02 ds postfix/qmgr[27353]: A3AF2B7076E: from=<[email protected]>, size=1183, nrcpt=1 (queue active)

The mail never gets queued for remote delivery. Very strange.
 
Back
Top