Re: hub/client configuration

Top Page
Delete this message
Reply to this message
Author: Piete Brooks
Date:  
To: welty
CC: exim-users
Subject: Re: hub/client configuration
> does anyone have any thoughts on exim configuration for client
> systems?


yes.

> i have our main mail hub converted to exim, but the various
> clients are still using sendmail.


... which is a copy of exim I assume :-)

> i suppose it's not really a big deal, except that we have two systems that
> used to be minor hubs that aren't any longer; they have MX records pointing
> to our real hub rather than to themselves, but some mail still comes in from
> MTAs that ignore the lack of a direct MX record.


Tell there where to go !!

> thus, it appears that i need three configurations -- standard client,
> ex-hub, and hub; hub is finished and working. how do people generally
> set these other types of situations up?


I go one step further ....

On the hubs, run a REAL exim, setuid root and all that, using a config file of
/etc/exim.conf.0 [ compile with CONFIGURE_FILE_USE_EUID=yes ] and have an SMTP
entry in inetd.conf.

On all machines (even the MTAs), install exim as sendmail, setuid to exim (not
root) using /etc/exim.conf to say "send everything to the hub".

On "mail-reject" run a dummy SMTP server which rejects all email [[ all hosts
have MX RRs pointing at that server -- all email should be delivered to the
somain, not to a host ]]


/etc/exim.conf:

        log_received_recipients
        qualify_domain = cl.cam.ac.uk
        local_domains =
        exim_path = /usr/lib/sendmail
        spool_directory = /usr/exim/spool
        freeze_tell_mailmaster
end
        smtp: driver = smtp;
end
end
        domainlist: driver = domainlist;
                route_list = "* cl.cam.ac.uk"
        lookuphost: driver = lookuphost,
                transport = smtp;
                self_mx = send
end
        *               *       F,2h,2m; G,16h,2h,1.5; F,4d,8h
end
#nd     of Exim configuration file



rejection script (will need editing to change the messages):

#!/usr/bin/perl

$info = ""; while ($res = pop(@ARGV)) { $info .= " " . $res; }

chop($host = `uname -n`);
chop($date = `date`);
$domain = "cl.cam.ac.uk";

$| = 1;

print "220 $host SMTP email rejecter ready at $date.$info\r\n";
while (<>) {
        last if /^quit/i;
        if (/^hel[op]/i) { print "250 $host Hello there -- I shall reject all 
ma
il you send me\r\n"; }
        elsif (/^mail *from:/i) { print "250 I accept any sender address I 
shall
 reject all email though\r\n"; }
        elsif (/^rcpt *to:[     ]*([^\n\r]*)/i) {
                $recip = $1;
                $domain = $1 if $recip =~ /\@[^.]+\.(.+\.cam\.ac\.uk)/;
                print "550 All email should be sent to user@$domain and NOT to 
a
 specific machine (e.g. $recip)\r\n";
        }
        elsif (/^vrfy/i || /^expn/i) {
                $domain = $1 if /\@[^.]+\.(.+\.cam\.ac\.uk)/;
                print "550 All email should be sent to user@$domain and NOT to 
a
 specific machine\r\n"; }
        elsif (/^data/i) { print "503 No recipeints are ever valid\r\n"; }
        elsif (/^rset/i | /^noop/i | /^debug/i) { print "250 OK\r\n"; }
        else { print "500 Command unrecognized.\r\n"; }
}
print "221 $host closing connection.  Goodbye.\r\n";