]> git.pld-linux.org Git - packages/exim-lite.git/commitdiff
new files/sources/patches
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 10 Aug 1999 09:35:52 +0000 (09:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    analyse-log-errors -> 1.1
    exim.aliases -> 1.1
    exim.cron.db -> 1.1
    exim.sysconfig -> 1.1
    newaliases -> 1.1

analyse-log-errors [new file with mode: 0644]
exim.aliases [new file with mode: 0644]
exim.cron.db [new file with mode: 0644]
exim.sysconfig [new file with mode: 0644]
newaliases [new file with mode: 0644]

diff --git a/analyse-log-errors b/analyse-log-errors
new file mode 100644 (file)
index 0000000..4d704a6
--- /dev/null
@@ -0,0 +1,297 @@
+
+From mdm@internet-tools.com Mon Mar 30 09:53:15 1998
+Date: Fri, 27 Mar 1998 22:09:36 -0600
+From: mark david mcCreary <mdm@internet-tools.com>
+To: exim-users@exim.org
+Subject: [EXIM] gadget to parse log file and generate bounce message
+
+These steps can process exim log files, and generate a bounce message
+back to mailing lists, thus clearing the bad address off the list.
+
+Bounce message come in a couple of flavors.  First of all, it could
+bounce before the message even got there.  They just reply with an
+SMTP code of 5xx, such as 550 - User Unknown.  Juno.com does it this
+way.
+
+Or they could accept the message, and then later on realize that the
+user is unknown, and email back a bounce message.  Aol.com does it
+like this.
+
+This gadget will help remove bad addresses from juno.com, and similiar
+mail hosts.  Since there is no bounce message, the information must be
+gotten from the exim log (typically called exim_mainlog).
+
+This works ok with the Smartlist Mailing List Manager.
+
+
+4 Steps
+
+1)  Use Eximstats to generate error only report, and mail to special
+procmail recipe.
+
+       Put this in your crontab file
+
+               54 23 * * * root /usr/local/exim/bin/eximstats -nt -h0 -q0
+-nr -t0 /var/log/exim/exim_mainlog 2>&1 | /bin/mail -s 'exim errors' bouncer
+
+
+
+       It generates a report like this
+
+               1 Joe@aol.net <jokes@mail.domain.com>: unrouteable mail
+domain "aol.net"
+
+which means that the error occured 1 time, joe@aol.net was the mailing
+list subscriber, and jokes was the mailing list.
+
+2)  Procmail recipe massages headers, and passes body of message to
+Perl program.  Handle email sent to bouncer address.
+
+
+       #   The mail-list.com front-end for Smartlist Mailing Lists
+       #
+       #   Copyright (c) 1998 Internet Tools, Inc.
+       #
+       #       This program is free software; you can redistribute it
+and/or modify
+       #       it under the terms of the GNU General Public License as
+published by
+       #       the Free Software Foundation; either version 2 of the
+License, or
+       #       (at your option) any later version.
+       #
+       #
+       #   Bounce Error Routine
+       #
+       #   Reads report of errors generated by Eximstats and creates and sends
+       #   bounce message back to appropriate list
+       #
+       #   Calls Perl program bouncer.pl to accomplish the bulk of the work
+
+       PATH=.:/home/ftp/discuss/.bin:/bin:/usr/bin:/usr/local/bin:/usr/sbin:$PATH\r     SHE
+LL=/bin/sh
+
+       VERBOSE=yes
+       LOGABSTRACT=all
+       LOGFILE=$HOME/procmailog
+       COMSAT=no
+
+       DOMAIN=domain.com               # the common domain for all the lists
+       SUBDOMAIN=`hostname`            # the fully qualified hostname
+
+       #  save a copy of all incoming files to an existing directory
+called backup
+       #
+       :0 c
+       backup
+
+       SENDER  = `formail -rtzx To:`
+       SUBJECT = `formail -zxSubject:`
+       TODAY   = `date "+%Y-%m-%d %T"`
+
+
+       :0 hwic: log.lock
+       |  echo -e $TODAY "\t" $SENDER "\t" $SUBJECT >> log-bouncer
+
+
+       #  filter the email message
+       #  set up the headers for the perl program
+
+       :0 fh
+       | formail -I"Subject: Bounce from Bouncer" \
+                         -I"From: mailer-daemon@localhost"
+
+       #
+       #  pass email message to perl program
+       #  which will send out 1 email message for each error line in the
+body of the message
+       #
+
+       :0 w
+       | bouncer.pl
+
+
+3)  Perl program parses report, grabbing bad email addresses, and
+sending in a bounce message.
+
+       #!/usr/bin/perl -w
+       #
+       #   The mail-list.com front-end for Smartlist Mailing Lists
+       #
+       #   Copyright (c) 1998 Internet Tools, Inc.
+       #
+       #       This program is free software; you can redistribute it
+and/or modify
+       #       it under the terms of the GNU General Public License as
+published by
+       #       the Free Software Foundation; either version 2 of the
+License, or
+       #       (at your option) any later version.
+       #
+
+       #
+       #
+       #  This program will generate bounce messages, and send them to the
+       #  appropriate list-request address.
+       #
+       #  This program is invoked by a Procmail recipe.  The body of the email
+       #  message is an error report produced by Eximstats.
+       #
+       #  The error report has a specific format of error messages, which
+looks like
+       #
+       #        1 u2pino@telcel.net.ve <chistes@mail.domain.com>
+       #
+       #  From which the first email address is the bad address, and the
+second
+       #  address is the list address.  Which can easily be transformed into
+       #  the list-request address.
+       #
+       #  This program uses the Perl Module  Mail::Internet to send each
+message.
+       #
+       #
+       #
+
+       use Mail::Internet;
+
+       chop(my $Date = `date "+%Y-%m-%d %T"`);
+
+       my $error_ind = '    \d ';              #  all error lines start
+with this sequence
+       my $bounce_body = '     550 ';  #  550 is SMTP error code for user
+unknown
+       open(LOG,">>/tmp/bouncer.log") || die(" Could not open bouncer.log
+$!");
+
+       $ENV{'SMTPHOSTS'} = 'localhost';
+
+       my $mesg = new Mail::Internet \*STDIN;
+
+       # look at mail headers, and grab the data
+
+       my $from = $mesg->head->get('From'); chop($from);
+       my $subject = $mesg->head->get('Subject'); chop($subject);
+
+       # tidy up the body
+
+       my $body = $mesg->body();
+       map {chop($_)} @$body;
+
+       # @commands is an array of each line in the message body.
+
+       my @commands = @$body;
+
+       @$body = ();
+
+       my $command;
+       foreach $command (@commands) {
+
+               next if $command =~ m/^\s*$/;                   # skip
+blank lines
+
+               unless ($command =~ m/^$error_ind/) {
+                       next;
+               }
+
+           @tokens = split(/\s+/, $command);           # put each word
+into a seperate array cell
+
+           my $bad_address = $tokens[2];                       # bad
+address that caused the list problems
+
+           my $list_address = $tokens[3];              # list address that
+had problems
+
+           $list_address =~ s/<//;                                     #
+strip < symbol from address
+           $list_address =~ s/>//;                                     #
+strip > symbol from address
+           $list_address =~ s/://;                                     #
+strip colon symbol from address
+           $list_address =~ s/\@/-request\@/;          # add request onto
+user name
+
+               unless ($bad_address =~ m/\@/) {
+                       next;
+               }
+
+               unless ($list_address =~ m/\@/) {
+                       next;
+               }
+
+               # make the body of the message a simple bounce message that
+smartlist can handle
+
+               my $message_body = $bounce_body . "<" . $bad_address . ">"
+. "\n";
+
+               my $new_mesg = new Mail::Internet(
+                       [ ],
+                       'Body' => [$message_body]
+                       );
+
+               # this is who the mail is directed to via SMTP;
+
+               $ENV{MAILADDRESS} = $from;
+
+               # these are the addresses placed in the header block of the
+message.
+
+               $new_mesg->head()->add('From', $from);
+               $new_mesg->head()->add('To', $list_address);
+               $new_mesg->head()->add('Subject', $subject);
+
+       #       $new_mesg->print_header(\*LOG);
+       #       $new_mesg->print_body(\*LOG);
+
+           print LOG  "$Date\t$list_address\t$bad_address\n";
+
+               my @recips =  $new_mesg->smtpsend;
+
+               unless (@recips > 0) {
+                       print LOG "Failed to deliver
+($from,$list_address,$message_body) \n";
+                       next;
+               }
+
+               }
+
+
+4)  Mailing list software unsubscribes bad address.
+
+
+
+Assumes
+
+You have Procmail installed.  Preferably the latest version.
+
+Your exim configuration file receives incoming mail for localhost ip
+address.  For example,
+
+       local_domains = "@:domain.com:[127.0.0.1]"
+
+You have Eximstats, which is a Perl program to report on the exim
+mainlog, that comes with Exim as standard equipment.
+
+You have the Perl Mailtools modules installed.  This module takes care
+of sending via SMTP interchange a mail message to the list request
+address.
+
+I will be happy to take corrections, updates, or additions via private
+email (mdm@internet-tools.com).
+
+mark
+
+
+
+mark david mcCreary
+Internet Tools, Inc.            1436 West Gray #438
+mdm@internet-tools.com          Houston, Texas 77019
+http://www.internet-tools.com   713.627.9600
+
+
+
+-- 
+***  Exim information can be found at http://www.exim.org/  ***
+
diff --git a/exim.aliases b/exim.aliases
new file mode 100644 (file)
index 0000000..765cb3b
--- /dev/null
@@ -0,0 +1,40 @@
+#
+#      @(#)aliases     8.2 (Berkeley) 3/5/94
+#
+#  Aliases in this file will NOT be expanded in the header from
+#  Mail, but WILL be visible over networks or from /bin/mail.
+#
+#      >>>>>>>>>>      The program "newaliases" must be run after
+#      >> NOTE >>      this file is updated for any changes to
+#      >>>>>>>>>>      show through to sendmail.
+#
+
+# Basic system aliases -- these MUST be present.
+MAILER-DAEMON: postmaster
+postmaster:    root
+hostmaster:    root
+webmaster:     hostmaster
+ftpmaster:     hostmaster
+admin:         hostmaster
+administrator: hostmaster
+
+# General redirections for pseudo accounts.
+bin:           root
+daemon:                root
+games:         root
+ingres:                root
+nobody:                root
+system:                root
+toor:          root
+uucp:          root
+
+# Well-known aliases.
+manager:       root
+dumper:                root
+operator:      root
+
+# trap decode to catch security attacks
+decode:                root
+
+# Person who should get root's mail
+#root:         wallner
diff --git a/exim.cron.db b/exim.cron.db
new file mode 100644 (file)
index 0000000..3629442
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+cd /
+/usr/bin/exim_tidydb -t 1d /var/spool/exim retry
+/usr/bin/exim_tidydb -f    /var/spool/exim retry
+/usr/bin/exim_tidydb -t 7d /var/spool/exim wait-smtp
+/usr/bin/exim_tidydb -f    /var/spool/exim wait-smtp
diff --git a/exim.sysconfig b/exim.sysconfig
new file mode 100644 (file)
index 0000000..293b9e7
--- /dev/null
@@ -0,0 +1,5 @@
+# yes|no
+DAEMON=yes
+
+# queue time
+QUEUE=1h
diff --git a/newaliases b/newaliases
new file mode 100644 (file)
index 0000000..b8d7941
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+/usr/bin/exim_dbmbuild /etc/mail/aliases /var/spool/exim/db/aliases  && chown exim.exim /var/spool/exim/db/aliases
This page took 0.091977 seconds and 4 git commands to generate.