Exim is a package that supplies the sendmail program. Type
type sendmailto find out the path of sendmail. On my machine it is
/usr/sbin/sendmailThen type
dpkg -S /usr/sbin/sendmailto find out what package provides it. On my machine it is exim4-daemon-light. If it is anything with the word "exim" in it, you are using exim.
To reconfigure exim on Debian, type
sudo dpkg-reconfigure exim4-configwhich will ask a bunch of questions and then set up your system. This changes config files and restarts the exim daemon - nothing else to do.
System mail name: $DOMAIN IP-addresses to listen on for incoming SMTP connections: 127.0.0.1 Other destinations for which mail is accepted: $HOSTNAME;$HOSTNAME.$DOMAIN Machines to relay mail for: <<<this is left blank>>> IP address or host name of the outgoing smarthost: $SMARTHOST Hide local mail name in outgoing mail? <<YES>> Visible domain name for local users: $DOMAIN Keep number of DNS-queries minimal (Dial-on-Demand)? <<NO>> Delivery method for local mail: mbox format in /var/mail/ Split configuration into small files? <<NO>> Root and postmaster mail recipient: $USERNAMEYou will have to change the above answers as follows:
HOSTNAME = your hostname (not qualified). Example: "apooley-5" or "fatdragon" DOMAIN = domain where you get mail. Example: "nvidia.com" or "rawbw.com" SMARTHOST = name of your outgoing SMTP mail server. Example: "owa.nvidia.com" or "mail.rawbw.com" USERNAME = your username on the local machine (should be the same as your email address name)
To configure sendmail edit
/etc/mail/sendmail.mc(Note: back up the original file first). When done, save the file and run make in the same directory:
cd /etc/mail sudo makeThen restart sendmail:
sudo /etc/init.d/sendmail restart
To send all mail through a particular server (e.g. an Exchange server), specify the server like this:
define(`SMART_HOST',`mailgw.nvidia.com')
Set the domain that the mail should appear to come from like this:
MASQUERADE_AS(`nvidia.com')dnl FEATURE(masquerade_envelope)dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl
I think you can comment out these for safety:
dnl # FEATURE(`accept_unresolvable_domains')dnl dnl # LOCAL_DOMAIN(`localhost.localdomain')dnl