Re: [exim] Another Disclaimer Question

Top Page
Delete this message
Reply to this message
Author: Ruairi Hickey
Date:  
To: exim-users
Subject: Re: [exim] Another Disclaimer Question
On Tuesday 01 September 2009 13:12:51 Jan-Piet Mens wrote:
> > Does anyone have any suggestions on how to implement this based on
> > senders domain?
>
> Presumably you could implement this in pure Exim with some sort of
> ${lookup that directs to particular transports -- I've never tried.
>
> The [off-topic] method I chose was to use MailScanner, which we have
> anyway, as I can easily avoid adding disclaimers to S/MIME messages (or
> they break). I've written up a bit of how I did it at
> http://blog.fupps.com/2007/05/12/mail-footers-sometimes-not/
>
>         -JP


Here you go....
     the disclaimers are in directories per domain name      ... Ruairi


In my router I have the following:

dnslookup_with_disclaimer:
  debug_print = "R: dnslookup_withdisclaimer for $local_part@$domain"
  driver = dnslookup
  senders = domain1.ie : domain1.sg
  domains = ! +local_domains
  transport = disclaimer_smtp
  same_domain_copy_routing = yes
  # ignore private rfc1918 and APIPA addresses
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
                        172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
                        255.255.255.255
  no_more


dnslookup_with_disclaimer_default:
  debug_print = "R: dnslookup_withdisclaimer for $local_part@$domain"
  driver = dnslookup
  domains = ! +local_domains
  transport = disclaimer_smtp_default
  same_domain_copy_routing = yes
  # ignore private rfc1918 and APIPA addresses
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
                        172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
                        255.255.255.255
  no_more



dnslookup:
  debug_print = "R: dnslookup for $local_part@$domain"
  driver = dnslookup
  domains = ! +local_domains
  transport = remote_smtp
  same_domain_copy_routing = yes
  # ignore private rfc1918 and APIPA addresses
  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 192.168.0.0/16 :\
                        172.16.0.0/12 : 10.0.0.0/8 : 169.254.0.0/16 :\
                        255.255.255.255
  no_more



The relevant transports are

disclaimer_smtp:
  debug_print = "T: disclaimer_smtp for $local_part@$domain from 
$sender_address_domain"
  driver = smtp                                                                         


transport_filter = /usr/bin/altermime --verbose --log-syslog --input=- --
disclaimer=/usr/local/etc/exim4/$sender_address_domain/textdisclaimer --
disclaimer-b64=/usr/local/etc/exim4/$sender_address_domain/disclaimer.b64 --
disclaimer-html=/usr/local/etc/exim4/$sender_address_domain/htmldisclaimer 
size_addition = -1                                                                                                                                                        


disclaimer_smtp_default:
  debug_print = "T: disclaimer_smtp for $local_part@$domain from 
$sender_address_domain"
  driver = smtp                                                                         


 transport_filter = /usr/bin/altermime --verbose --log-syslog --input=- --
disclaimer=/usr/local/etc/exim4/default/textdisclaimer --disclaimer-
b64=/usr/local/etc/exim4/default/disclaimer.b64 --disclaimer-
html=/usr/local/etc/exim4/default/htmldisclaimer size_addition = -1                                         


remote_smtp:
debug_print = "T: remote_smtp for $local_part@$domain"
driver = smtp