On 03/03/2015 02:56, helices wrote: > I am tasked to design, build and maintain a new MTA. The company has > one special requirement, for which I'm investigating the simplest > solution: > > For each incoming message received, every outgoing "reply" must use > the "To:" address from the incoming received message as the "From:" > address in the outgoing reply. > > This is trivial when the incoming has "To: [email protected]," Sally > reads and replies, and the outgoing message has "From: [email protected]" > > It's trickier when the incoming has "To: [email protected]," the MTA > delivers to an Exchange server, which distributes that message to > Sally, and Sally replies. What is the simplest way for that outgoing > message to use "From: [email protected]?" > > Scope is roughly one hundred (100) different domains and, possibly, > thousands of combinations with various [email protected]. > > Ideally, the MTA will handle all of header address processing, > whatever that process might look like. I seek the simplest solution, > regardless how that process looks and compares to the status quo. It's doable, but would require a fair bit of work and really isn't something exim would/could do directly.
However, I would implement the task as a message filter; for each message, extract the envelope to: address, the message id, and the time/date stamp, adding them to a database (local copy of sqlite3 would do fine for this, or mysql/postgres if you want it to scale better). Then *if* the message is effectively outbound (from a local domain address) AND has an in-reply-to header, use that to look up the original email and perform the rewrite. Not THAT hard, but still at least three or four days coding. Another solution (and what I do for a matching but simpler situation) is to use a mail client that can already do this - Thunderbird (for example) can and does search aliases for the "to" address and preselects one (if it can find a match) for the outbound. Then the answer simplifies to "any MTA you choose" :) -- ## List details at https://lists.exim.org/mailman/listinfo/exim-users ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/
