Hello Rob0, Fixing the application is not possible since we don't own source code and owner company doesn't want to change it. On the application we are just be able to set a smtp server.
English is not my first language so I probably haven't explain the problem very well. I will do my best right now. The application connects to a smtp server and sent an e-mail as: SENDER: user1@domain TO: user2@domain;user3@domain >From this smtp server we would like to relay e-mail to Corporate Exchange server.This server needs authentication to relay e-mail. Since user1 password changes every week, we would like to set a generic user whose password will not change. Therefore, sender must be changed to genericuser@domain. Also it is needed that original sender (user1@domain) became a recipient of e-mail in Corporate Exchange server ( I thought this could be achieved by setting CC field in the e-mail, but it seems I was wrong). Is postfix able to do this? If not, is there any other app to do that? Thank you very much. I hope to have explained better myself. On Sat, Dec 3, 2011 at 10:01 PM, /dev/rob0 <r...@gmx.co.uk> wrote: > On Saturday 03 December 2011 13:24:30 Ignacio wrote: > > I would like to rewrite FROM and CC headers. There is an > > application that connects to a postfix smtp server and it > > sends an e-mail like this: > > FROM: user1@domain > > TO: user2@domain;user3@domain > > > > And that e-mail is relayed to another e-mail server. I would > > like the relayed e-mail to be something like: > > FROM: genericuser@domain > > TO: user2@domain;user3@domain > > CC: user1@domain > > > > Changing the FROM field is an easy task, but I don't know how to > > add user1@domain as a CC (It is a must to be CC, BCC is not an > > option) > > What you are asking is relatively easy, using header_checks(5). You > match the To: or From: or other header as added by the broken mail > application, then "PREPEND Cc: user1@domain". > > However, what you are asking, and what you probably want, are not the > same thing. Adding a Cc: header does not add a recipient. To do that > you would have to do something else, such as: always_bcc, (recipient| > sender)_bcc_maps, or virtual_alias_maps. > > We don't know enough about the problem to advise you further. Well, > the best advice was already given: fix the application. > -- > Offlist mail to this address is discarded unless > "/dev/rob0" or "not-spam" is in Subject: header >