Answer the question
In order to leave comments, you need to log in
How to add your header to an email in postfix?
Regular mail server.
There is an external transport agent (MTA) on a remote server that forwards mail to an MTA on a server on the company's internal network.
Postfix is used as the transport agent (MTA), and dovecot plays the role of delivery and access agents (DA and AA).
It turns out the scheme for receiving letters is as follows: remote MTA - local MTA - DA - AA
There is a task to filter letters by a hidden header.
For example, there is a newsletter [email protected] Everything that comes to it goes to the user [email protected] The user [email protected] has a filter configured, if the header "To" or "CC" contains [email protected], then the letter should go to the news folder.
But since [email protected] is a well-known mailing list, all spam often goes there. Moreover, the left mail is indicated in the To header, and [email protected] is entered in the "Bcc" header (blind copy), so sometimes clients do this for some reason. And it turns out that this letter ends up in the inbox instead of the news folder.
As a solution, I thought, maybe it can be done so that when a message arrives at the transport agent with a BCC header (blind copy), the transport agent will add its own header (for example, X-bcc) and copy the contents of the original "bcc" header there . Then it will be possible to filter the letter by this "X-Bcc" header.
Tell me whether it is possible to do this in postfix or by other means, or to completely do without this crutch and somehow solve this problem differently.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question