Re: [exim] Alerting users to obsolete email forwarding

Page principale
Supprimer ce message
Répondre à ce message
Auteur: J.R.Haynes
Date:  
À: Jonathan Knight
CC: exim-users
Sujet: Re: [exim] Alerting users to obsolete email forwarding
On Fri, 31 Jan 2014 at 12:49 -0000, Jonathan Knight wrote

>
> The best plan to date is to alter the subject line so instead of
> Subject: test message
> the user will get
> Subject: [Obsolete address j.knight@??? used] test message
>


> I wondered if anyone had done something similar and if so, what did you use?


We rewrite the subject line of messages detected as spam for users who opt
out of having these rejected at SMTP time.

This is done by adding a temporary header in the relevant ACL

add_header = X-New-Subject:{SPAM?} $h_subject

and replacing in the system filter
   if first_delivery then
     if $h_X-New-Subject: is not ""
     then
        headers remove Subject
        headers add "Subject:$rh_X-New-Subject:"
        headers remove X-New-Subject
     endif
   endif



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

                              J. R. Haynes
                         Senior Network Specialist


      IT Department,                  e-mail: J.Haynes@???
      Bld 63,
      Cranfield University,           Tel: Bedford (01234) 754205
      Wharley End,                         Bedford (01234) 750111 Extn 4205
      Cranfield,                      Fax: Bedford (01234) 751814
      Beds.,
      MK43 0AL.