Mail note - for the Laptop-HOWTO ?
Some time back I was having a number of problems with my mail system. I
wanted to stop using Netscape for mail and use a "proper" mail daemon for
handling mail. With the help of some of the guys here I eventually sorted
out the various problems, and have prepared a short summary of what I had to
do to get it running properly. I'm attaching my report for your
edification. If you feel it's worth anything, feel free to add it to the
Laptop Mail Configuration Suggestions.
Some notes for ordinary users without too much sysadmin experience.
setting up a single mail system which works equally well in the
different environments a laptop is used in (eg ethernet connection at
work, modem from home)
Netscape is simplest to set up, but is unstable (crashes), and does
not have enough flexibility. Want mail daemons to handle mail, and for
the mail to be accessible remotely (eg text console over ssh).
fetchmail - straightforward for collection, collecting from
outside mail server into localhost (daemon can be set to run
automatically on login). Configure with fetchmailconf.
exim - mail delivery. Configure with eximconfig.
Also divides mail into different folders (mail sorting) (using ~/.forward)
I use mutt for reading. Other mail readers could work equally well.
Problem 1. Laptop mobility. Different IP addresses at home and at
work. Difficult to reset hostname, easier to keep a single hostname with
the domain unspecified within the hostname: eg I am drew@strider.
But exim by default wants "canonical" addresses with full domain, and
will not deliver mail.
Solution: add "localhost" to list of local computers in exim
[Note: later versions of exim are supposed to handle mail to localhost
automatically, but this did not work. On my system localhost was
interpreted as localhost.ucdavis.edu, which of course won't work. Hence I
had to specify localhost explicitly as mentioned above]
Problem 2. No connection to main mail server.
I could connect to the university's mail server from work
but not from home. The university mail server was set up in exim as a
"smarthost" (eximconfig Opt 2).
Solution: The problem was that the university admin had decided not to
allow SMTP mail connections from outside (my connection at home goes
through a commercial provider). Choosing Opt 1 in eximconfig fixed
the problem, allowing my machine to perform its own SMTP connections
directly with the recipient.
Problem 3. Outside mail servers don't accept address "drew@strider"
Solution: Rewriting the address (change /etc/exim.conf by hand, uncommenting
the rewrite lines at the end so that /etc/email-addresses will be
used.) The later just contains the entry "drew email@example.com")
Problem 4. exim not receiving mail
Solution: exim instructions weren't explicitly clear. after running
eximconfig, you have to run eximconfig -i to launch the exim daemon.
This might be a problem after upgrading exim from an older version.
That's pretty much all I've had to do to get the mail system running
with exim. Pretty simple once you know what to write where. And my
computer is still happily a non-canonical "strider" :)