Re: [EXIM] spanned mailcopy to particular address

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Philip Hazel
Datum:  
To: Kuttner Stefan
CC: exim-users
Betreff: Re: [EXIM] spanned mailcopy to particular address
On Tue, 18 May 1999, Kuttner Stefan wrote:

> i didn`t could found any config option yet for this in FAQ then in the
> documentation. Perhaps this is OT :-( !
> I would like a "bcc-copy" for every mail performing by the MTA
> (also virtual domains) to a appointed a email-address. This should
> be done for backup mail.


The answer to this will appear in the next version of the FAQ, which I
am currently working on. Here it is:

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


A9810: The following filter does this. You can adjust the conditions to meet   
       your needs. The keyword 'unseen' stops this being a "significant       
       delivery", so that the message goes on to be delivered as normal.      


         # Exim filter                                                        


         # Ignore error messages                                              
         if error_message then finish endif                                    


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


       This filter makes a copy of every message, except for delivery failure 
       reports. 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@???                                    
         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.                                                  




-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***