OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: Sending emails to another email address

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Tue Oct 04 2005 - 18:07:33 CDT


>
> >>> "Oliver Marshall" <omskillsearch.co.uk> 10/3/2005 2:16:43 PM >>>
>"There was also discussion on this list, about a year ago I think, of
>how to
>configure Postfix to effectively "fork" every email to two different
>backends"
>
>Ohhhh that could be just what im after, as the archived email will go
>to the same domain as all the other email, but to its own server.
...
>At 04:27 PM 10/4/2005, Mike Beal wrote:
>I'm new to this list, but I'm looking for a way to archive email as
>they're going through the system. If I can use this fork to save a copy
>of the email to the local hard drive I can create the archive I'm
>looking for. Does anyone have a link to this old thread? Or remember
>anything more about it that I can search on? Or is there an easier way
>to save a copy of the email before it's sent on? Using Postfix 2.2.1.
>Thanks.

http://www.postfix.org/postconf.5.html#always_bcc
http://www.postfix.org/postconf.5.html#recipient_bcc_maps
http://www.postfix.org/postconf.5.html#sender_bcc_maps
The above bcc options lose envelope information, and may not be
suitable for a robust archive.
One solution is to use a regexp to encode the information something like
# recipient_bcc_maps = regexp:/etc/postfix/recipient_bcc.regexp
# recipient_bcc.regexp
IF !/archive.local.invalid
/^(.*)$/ $1archive.local.invalid
ENDIF
and use transport_maps to route mail for archive.local.invalid to
where you need it. Other variations are possible, such as using
virtual_alias_maps similar to the
above. http://www.postfix.org/ADDRESS_REWRITING_README.html

Another options is to use a content_filter that saves a copy of
everything that passes through. Amavisd-new can be convinced to
quarantine a copy of every message if you know the right incantation,
or write something yourself.
http://www.ijs.si/software/amavisd/#features-users

--
Noel Jones