Re: [Exim] saving outgoing message to internet

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Nigel Metheringham
Dátum:  
Címzett: mohammad.meskarian
CC: exim-users
Tárgy: Re: [Exim] saving outgoing message to internet
On Fri, 2002-04-05 at 12:51, mohammad.meskarian wrote:
> This is a multi-part message in MIME format.


Please post in plain text.
> I want to save every thing that my local mail server send to out side world not saving incoming mail from internet world
>
>   sorry maybe I couldn't say my purpose correctly .
>     I need function exactly Q9810 but reverse (saving out going message to internet)


I'll quote Q9810 here, and you tell me in what way it does not meet your
needs. If you want to save in a file then use save rather than deliver
(see Q9811), to split by sender then use the sender address variable in
the folder name.

Q9810: I'd like to make a copy of all outgoing messages to a local
mailbox. Is there a solution for this using an Exim filter?

A9810: The following filter makes a copy of every message, except for
delivery failure reports:

# Exim filter
# Ignore error messages
         if error_message then finish endif


# Copy if this is the first delivery attempt
         if first_delivery then
           unseen deliver copy@??? errors_to \
            postmaster@???
         endif


The keyword "unseen" stops this being a "significant delivery", so that
the message goes on to be delivered as normal. The errors_to setting
changes the envelope sender on the copy so that if there is a problem
delivering it, the bounce message is sent to postmaster.

You can add to the condition setting to select specific messages. To
make a copy of outgoing messages only requires a definition of
"outgoing". Because a message may have many recipients, simply testing
for your own domain in both the From: and the To: headers is not enough.
You can craft your own conditions, but here is one suggestion:

if $h_from: contains your.domain and
             foranyaddress $h_to:,$h_cc:
               ($thisaddress does not contain your.domain)
         then
           unseen deliver copy@??? errors_to \
            postmaster@???
         endif


This takes copies of messages whose From: header contains your.domain
and whose To: and Cc: headers contain at least one address that does not
contain your.domain. See also Q9817.



This is pretty specific stuff, if you want your *exact* problem solving
and gift warpped then a number of people will do paid consultancy work.

I also refer you to Matthew's previous comment - you are sailing very
close to illegality in the UK.

    Nigel.
--
[ Nigel Metheringham           Nigel.Metheringham@??? ]
[ - Comments in this message are my own and not ITO opinion/policy - ]