I believe the solution is via the canonical(5)
mapping facility, which describes address cleanups to be performed with the cleanup(8)
daemon:
The optional canonical(5) table specifies an address mapping
for local and non-local addresses. The mapping is used by the
cleanup(8) daemon, before mail is stored into the queue. The
address mapping is recursive.
...
Typically, one would use the canonical(5) table to replace
login names by Firstname.Lastname, or to clean up addresses
produced by legacy mail systems.
This address cleaning can be performed both to local submissions (/usr/sbin/sendmail
) and remote submissions (via SMTP) -- if Wordpress sends mail via SMTP. you might need to add your Wordpress hostname to local_header_rewrite_clients
.
You provide a plain text table (typically /etc/postfix/canonical
) to the postmap(1)
command to build the indexed database. If the From:
from Wordpress is always the same (wordpress@alvazan.com
, for example), then the entry would be:
wordpress@alvazan.com support@alvazan.com
If the From:
from Wordpress changes, but the domain is always the same, you could use:
@alvazan.com support@alvazan.com
If the From:
really could be just about anything and you always want support@alvazan.com
in the From:
headers, you could use the regex support. I'm a little leery about this, but it's an option:
/./ support@alvazan.com
You should set the canonical_classes
variable to envelope_sender, header_sender
. (By default, it also includes envelope_recipient
and header_recipient
; it might not hurt to leave it alone, but (especially with that greedy regex option) could be catastrophic. It depends upon how this specific server is used.)
I recommend testing late at night and make sure you test mail coming in and out of the system after making all changes. And don't forget to keep your configs under some kind of source control. (But you knew all that.)