procmail
[Top] [All Lists]

Re: archiving outgoing mail

2008-02-22 16:08:44

On 21-Feb-2008, at 18:57, Troy Piggins wrote:

* Klaus Johannes Rusch is quoted & my replies are inline below :
Troy Piggins wrote:
I'd like to try the same thing for outgoing mail.  Pretty sure  
I've seen
solutions using mailertables and procmail.  Just wondering if I'm  
better off
using a postfix only solution.  If so, any pointers in the right  
direction?

The recipient_bcc_maps option in postfix allows directing mail to
additional addresses;  you may want to split the incoming and  
outgoing
mailservers so you only bcc for outgoing. (If you only want to  
implement
this for your own account, most mailers have an automatic BCC  
option as
well.)

Been thinking about this some more.  I was thinking I'd need to set  
up rules
for every user.  But if I was to bcc some user I set up, say I named  
it
"outgoing-archiver" although it doesn't matter really, I could set  
up a
system-wide procmail rule like:

recipient_bcc_maps is the way to go, and you apss it a specific  
procmailrc file that is only invoked for that.

The simplest rule to archive the outgoing mail would simply be:

:0fw
| gzip (or 7za or bzip2, whatever) >> /var/mail.archive.gz

:0:

That lock makes no sense.

* ! ^TO_$LOGNAME
* ^From:.*$LOGNAME
| gzip -fc9 >> $HOME/Sent_$DATE.gz

You probably want a fw flag to when you are piping to an external  
program.

What do you think?

I think archiving outbound email is questionable unless you are a  
corporation that is required to do so by law.



-- 
You too will get old.  And when you do you'll fantasize that when you  
were young prices where reasonable, politicians were noble, and  
children respected their elders.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>