3 # Delivery notification for Exim
4 # Vladimir Litovka <doka@kiev.sovam.com>, 1999/10/18
7 # 1. Add such entry in transports section:
11 # command = "/usr/local/sbin/rrc.pl \
12 # ${original_local_part}@${original_domain}"
18 # 2. Add shadow_transport in local delivery entry (or entries)
22 # shadow_transport = rrc
27 die "Must be executed from Exim\n" unless ($who);
31 last if ($_ eq ''); # Empty row - the end of headers
34 $headers{$header} .= " " . $_ ; }
39 ($header, $content) = split (/: +/, $_, 2);
40 $headers{lc($header)} = $content;
44 if ( !($to = $headers{'disposition-notification-to'}) ) {
45 $to = $headers{'return-receipt-to'};
48 if ($too = $to) { # If there are delivery notification request(s)
50 # Strip GECOS from RRC header
51 if ($too !~ s/^.*?<([-=+\.\w\@]+)>.*$/$1/g) {
52 $too =~ s/^([-=+\.\w\@]+)\s+\(.*?\).*$/$1/g;
55 # Check is RRC header valid
56 if ($too !~ /^[-=+\w\.]+\@(\w[-\w]*\.)+[a-z]{2,4}$/io) {
57 $mailto = $headers{'from'};
58 $x_to = "X-Invalid-DSN-To: $to";
63 open MAIL, "| sendmail -t";
66 Subject: Delivery notification
70 From: $headers{'from'}
72 Subject: $headers{'subject'}
73 Date: $headers{'date'}
74 Message-ID: $headers{'message-id'}
76 was successfully delivered. I hope that recipient of your message will
77 read it and answer you as soon as possible.
81 Mailer-Daemon of Sovam Teleport Ukraine.