[Pymilter] Wiretap feature?

Stuart D. Gathman stuart at bmsi.com
Mon Dec 18 18:33:45 EST 2006


On Mon, 18 Dec 2006, Henry Kwan wrote:

> I was looking through pymilter.cfg and noticed that it had a wiretap
> feature.  Is there a way to configure this feature to be always on for all
> emails, regardless of to:, cc:, or bcc: status?  I've wanted to archive
> all of our emails, inbound and outbound, for awhile now so this seems like
> the perfect way to do it if I could configure it to work on every single
> message.  Though ideally, I would like it to work after SpamAssassin does
> it's thing so I can filter and not archive spam.

The wiretap feature doesn't look at to, cc, bcc, etc.  It only looks at
MAIL FROM.  It copies all mail from that mailbox.  

However, to Bcc all email to some mailbox, just call
self.addrcpt(archive_mailbox) from eom().  Or just do

  out = open(archive_file,'a') 
  msg.dump(out)
  out.close()

around line 1586 in CVS version 
(just before "if not defanged and not spam_checked:").

But the point is well taken.  I should add an archive= config option
in the main confuration section.  Value can be the pathname of an
archive file or an archive mailbox.  Maybe I can squeeze that into
0.8.7.

-- 
	      Stuart D. Gathman <stuart at bmsi.com>
    Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the Pymilter mailing list