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

Reply via email to