procmail
[Top] [All Lists]

Re: Getting a copy of emails

2000-01-28 10:55:17
eek, are you monitoring email? Your message is kind of freaky. 
I'm so glad I use PGP.

Anyway,

: Let's say on a mail server we have incoming and outgoing mail from a top
: level country domain (say for example .gr if we have Greece). How do we
: either get a copy of every message that was sent or received from a .gr
: email address?
: 
: Here's what I've done so far. I think the answer (at least partially) lies
: on procmail for the incoming email. I have created a /etc/procmairc file
: which should affect all incoming email with the following rule:
: 
: :0:
: 
: * ^From:.*\.gr
: 
: * !^From:.*\.gr\.
: 
: GRMail
: 
: However this simply drops all the .gr mail in that file (GRMail) and does
: not continue delivery of the message. How do I tell procmail to drop a COPY
: in that file and continue delivery to the specified recipient? I've found
: some examples but they all assume that we are dealing with a set recipient
: address. I need it done for ALL my users.

# you need to add the c (continue) flag to the recipe
# to make procmail continue processing
:0 c:
* ^From:.*\.gr
BigBrother

: Note that I do not nessessarily have to put the copies in a file. I could
: also email a copy to an address. However the task there is that that address
: would have to not show up on the regular email sent to the original
: recipient. I am assuming that the sendmail ruleset I'm looking for would put
: my "monitoring" email in the BCC field. But how?

# to forward email to yourself
# and continue on to the user
:0 c:
* ^From:.*\.gr
! evileye(_at_)autonomy(_dot_)com

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