modify the recipient address of an email on the file in the postfix queue
The best way (or the least intrusive way) would be to have an address rewrite for that recipient. From the Postfix Address Rewriting
/etc/postfix/main.cf:
smtp_generic_maps = hash:/etc/postfix/generic
/etc/postfix/generic:
[email protected] [email protected]
Following this example, you could try:
cd /etc/postfix
Add to the generic
file or create it with:
[email protected] [email protected]
and build the associated map:
sudo postmap generic
Add to main.cf
:
smtp_generic_maps = hash:/etc/postfix/generic
make Postfix load this configuration change:
sudo postfix reload
smtpd
will use generic
to rewrite the problematic address upon next scan of queue.