So we have a little more than usual deferred mail on our Postfix server, so I started to look through the messages to make sure we weren't hacked and sending out spam. Everything is fine and it turns out that a bot had filled out our Request Info form multiple times with bad info. However, I did find one that was a legitimate request for more information about our company and I noticed that it isn't sending because they fat-fingered the address with gmal.com. Is there a way I can correct that and have Postfix send it out? This is on a CentOS server.
|
You will probably want to look into http://www.postfix.org/ADDRESS_REWRITING_README.html#canonical This is what I just did for my recent case, although this is on the receiving side. "travelmate.lan" is the bad domain that got held. /etc/postfix/main.cf:
/etc/postfix/canonical:
After having that set up to your need, you would create the map and rerun the queue with:
|
||||
|
|
|
Delete the mail ( Postfix (and you as a sysadmin) is not responsible for "users-do-mistakes"- or "users-are-dumb"-errors. What the users did is stupid, but not an error or something that breaks the system/environment. It is just how Email works. |
||||
|
|
If the message is stored in plaintext, can't you just use a text editor to edit the RCPT header, and then use |
|||||||||
|
|
I asked a similar question a few months ago. My question was about fixing them with DNS and the result of the question was that you can't do it with DNS. There are also quite a few tricky edge cases that you should think about before trying to correct user typos. You can probably do something with smtp_generic_maps and regular expressions. |
|||
|
|
|
I would hope postfix would have similar functionality the address functionality provided by Exim. It is possible add addresses or mark them delivered while they are held. Then when they are reprocessed, the delivery will go to the correct address. The data requiring changing is only the envelope data. (Although if it is going to customer service you may want to notify them of the change.) This is similar to the postman correcting the address on mail sent to the wrong street number. EDIT: It appears you may be able to use virtual aliases to get the message delivered to you so you can re-inject it. |
||||
|