procmail
[Top] [All Lists]

Getting a copy of emails

2000-01-27 16:06:40
Here's what I'm trying to achieve:

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.

As for the outgoing mail I believe the answer lies in sendmail. How do I
achieve that? Is there a ruleset I need to deploy?

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?

Thanks in advance for all your help.


---------------------

Nicko Demeter
Network Administrator / Jedi Knight
Autonomy
http://www.autonomy.com


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