Exim 4.72 release
[exim-website.git] / config.samples / C026
1 Date: Tue, 12 Oct 1999 13:07:25 -0500
2 From: mark david mcCreary <mdm@internet-tools.com>
3
4 Most modern email readers will now show any URL's in the body of an
5 email message as a clickable link.  AOL also does this, but needs the
6 URL to be in the HTML syntax.
7
8 The following configuration and program will allow messages going to
9 AOL only, to be filtered thru a Perl script.  This Perl script will
10 convert any URL's to the HTML syntax.
11
12 In addition, the transport will use VERP to send a unique envelope
13 sender with each message.
14
15 It is useful for mailing lists.
16
17
18
19 ######################################################################
20 #                      TRANPORTS CONFIGURATION                       #
21 ######################################################################
22
23 # This transport is used for delivering messages AOL messages one at a time
24 # It will put their email address in the To: line
25 # It will create a custom sender envelope address that will allow bounces
26 # to be easier to track.
27 #
28
29 aol_smtp:
30   headers_remove =
31 "To:Message-Id:Resent-To:Resent-Date:Resent-From:Resent-Message-Id:Resent-Bcc",
32 add_headers = "To: $local_part@$domain\n\
33   Message-Id:
34 <Epah${length_3:$local_part}${substr_17_2:$tod_log}${substr_14_2:$tod_log}${subs
35 tr_11_2:$tod_log}${length_3:$domain}\
36   @$primary_hostname>",
37   transport_filter = "/usr/local/bin/aol_transport_filter.pl",
38   return_path = "${if match {$return_path}{^(.+?)-request@.*\\$}\
39         {bounce-$1=$local_part=$domain@$primary_hostname}fail}",
40   driver = smtp;
41   max_rcpt = 1
42
43
44
45 ######################################################################
46 #                      ROUTERS CONFIGURATION                         #
47 ######################################################################
48
49 filter_msg_aol_domains:
50    self = defer,
51    driver = lookuphost,
52    transport = aol_smtp,
53    domains = "aol.com"
54
55
56
57
58
59
60
61
62 ######################################################################
63 #          /usr/local/bin/aol_transport_filter.pl
64 ######################################################################
65
66 #!/usr/bin/perl -w
67 #
68 #  This program will tweak the body of all email messages going to
69 #  America On Line (AOL).
70 #
71 #  It will change a plain text URL clause to an HTML version
72 #  since that is how the AOL email reader works.
73 #
74 #  For example,
75 #
76 #  http://commerce.internet-tools.com becomes
77 #
78 #  <A
79 HREF="http://commerce.internet-tools.com">http://commerce.internet-tools.com</A>
80 #
81 #  or also with the https, mailto, and ftp prefix
82 #
83 #
84
85
86 $/ = "";                    # set paragraph mode
87 chomp($headers = <STDIN>);  # read a paragraph, remove trailing newlines
88 $/ = "\n";                  # unset paragraph mode
89
90 printf(STDOUT "%s\n\n", $headers);
91
92 while (<STDIN>)
93   {
94
95 s%\b((mailto:|((http(s?)|ftp)://)).*?)(?=(\s|:\s|\.\s|;\s|,\s|\?\s|!\s))%<A
96 HREF="$1">$1</A>%ig;
97   print(STDOUT $_);
98   }
99
100 exit;
101
102
103
104