Re: [exim] Adding those Legal disclaimers to e-mails

Inizio della pagina
Delete this message
Reply to this message
Autore: Johann Spies
Data:  
To: exim-users
Oggetto: Re: [exim] Adding those Legal disclaimers to e-mails
On Thu, Apr 28, 2005 at 06:16:33AM +0200, Kjetil Torgrim Homme wrote:

> this should be RFC compliant, except for one thing: it does not verify
> that the boundary actually is unique. to do that you need to use
> temporary files, and I couldn't be bothered.
>
> #! /bin/sh

...

We (the system administrators) have lost our battle against
disclaimers and have to implement it now.

I have tried the suggestion in the Exim Book (page 94) in combination
with the script Kjetil supplied:
========================
In the Transport section:

remote_smtp_filter:
        driver = smtp
        transport_filter = /usr/local/bin/disclaimer


And in the router section:

smarthost:
  debug_print = "R: smarthost for $local_part@$domain"
  driver = manualroute
  domains = ! +local_domains
#  transport = remote_smtp_smarthost
  transport = ${if eq {$sender_address_domain}{sun.ac.za}\
               {remote_smtp_filter}{remote_smtp}}
  route_list = * DCsmarthost byname
  host_find_failed = defer
  same_domain_copy_routing = yes
  no_more


=====================
But I get the following error:

T=remote_smtp_filter defer (-24): transport filter process failed
(127): unable to execute command


The script seems to work:
=======================================
$ a="Dit is nou 'n e-posboodskap"

$ echo $a | /usr/local/bin/disclaimer
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=-=-1537-burger.sun.ac.za-

-=-1537-burger.sun.ac.za-


-=-1537-burger.sun.ac.za-
Content-Type: text/plain

Die byvoeging van hierdie item is 'n dom idee

---=-1537-burger.sun.ac.za-
=======================================

I don't understand enough of what is happening in the process when
exim calls in this script. Therefore I do not know how to debug it.

Is there a tutorial somewhere on what must happen in the communication
between exim and an outside command changing the message?

And how do I debug this? I have tried "exim4 -d -bh 1.2.3.4" but this
did not help me to see what goes wrong.

Regards
Johann
-- 
Johann Spies          Telefoon: 021-808 4036
Informasietegnologie, Universiteit van Stellenbosch


     "Do all things without murmurings and disputings; 
      that ye may be blameless and harmless, the sons of 
      God, without rebuke, in the midst of a crooked and 
      perverse nation, among whom ye shine as lights in the 
      world."    Philippians 2:14,15