Linux mail

Software and guides

Getting e-mails delivered

Use exim4 as mail transport agent (MTA) for local and remote mail delivery, but no mail reception.

dpkg-reconfigure exim4-config
invoke-rc.d exim4 reload
man update-exim4.conf

To test:

mail -s test steen
 text
^D

Note that exim4 uses this line in /etc/hosts to figure out which machine it's running on --

127.0.0.1       esteve.sscnet.ucla.edu esteve

You'll need to change this when the machine is moved.

If you have a permissions problem in /var/log/exim4/mainlog (or paniclog), it's likely you don't have 755 all the way to /usr/sbin/exim4 -- check each directory.

Any undelivered messages will be in /var/spool/exim4/input.
To send stuck e-mails, issue exim -v -M <file name> (only send -D files and remove the -D).

Example configuration for local and remote mail:
dc_eximconfig_configtype='smarthost'
dc_other_hostnames='esteve'
dc_local_interfaces='127.0.0.1'
dc_local_domains='localhost:esteve'
dc_readhost='sscnet.ucla.edu'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='mail.sscnet.ucla.edu'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
Not fully tested. Run "update-exim4.conf" if you edit the file by hand, or use "just reconfigure exim4-config".

Keeping track of e-mails

You currently use several ways of sending e-mails:

  • ssc to weber and use pine
  • browse to webmail.sscnet.ucla.edu and use webmail
  • thunderbird from sigillo
  • pine from sigillo
  • pine from cogweb -- several accounts/li>

On cogweb or other mail servers that use a different e-mail address from the valid return address, configure pine to use a default Reply-To address. Find "Customized headers" and enter "Reply-To: Name

" and this will show up by default in sent mail. Display it with R(ich headers) if you need to delete it.

The inbox issue is relatively simple -- for this account, there is only one inbox, though it exists in two versions:

  • pine on weber sees the raw incoming folder
    • previous six months copied to a storage folder every six months
    • storage folders currently not available on Sigillo (but should be copied?)
  • webmail uses the same inbox
    • no additional inbox
  • thunderbird on sigillo sees the same incoming folder
    • copy stored on sigillo://vx/ImapMail/sscnet/INBOX
    • has problems accessing past a few days ago for some obscure reason
  • pine on sigillo sees this inbox under Incoming Folders / sscnet
    • copy stored on sigillo://vx/ImapMail/sscnet/INBOX
    • same file as thunderbird uses, but pine accesses them all fine
      • this copy has currently goes back to 1 Jan 2005
The sent-mail folder is more problematic.

First the mail sent either from pine on weber or thunderbird on Sigillo -- these use Imap folders that should sync both ways:
  • pine on weber saves to weber://~/steen/mail/sent-mail
    • pine on weber sees this unproblematically
      • currently not periodically copied to another file (OK for now)
    • webmail on weber may not have access to this file (unclear, not tested)
    • thunderbird stores a copy on sigillo://vx/ImapMail/sscnet/Sent
      • again, it has problems accessing past mails (worries if they're sync'ed?)
    • pine on sigillo reads it under Incoming Folders / sscnet-sent, no problems
Second the mail sent from webmail on weber, which doesn't use the same sent-mail folder (why not?)
  • webmail on weber saves to a different file -- and shouldn't really (ask Shinn)
    • can pine on weber see it? (not checked)
    • webmail on weber itself I assume has perfect access to it (not checked)
    • thunderbird sees this folder under sscnet mail/INBOX.sent
    • pine on sigillo doesn't seem to have access to this folder at the moment
Third the mail sent from pine on sigillo:
  • pine on sigillo saves its sent-mail in ~/mail by default; this is symlinked to /vx/imapMail/sigillo.
    • pine on weber has no access -- directories don't sync
    • webmail has no access
    • thunderbird sees them through this symlink:
      • /vx/ImapMail/LocalFolders$ ln -sf ../sigillo/sent-mail Sigillo-sent
    • pine sees them under Local folders in mail/
Finally, stored folders end up all over the place:
  • pine on weber has lots of stored folders -- they're not copied to sigillo
    • did I make a copy to trevi?
  • webmail on weber probably doesn't have a lot of stored folders -- maybe postponed or draft?
    • these are likely available in thunderbird under sscnet mail/INBOX.draft
  • thunderbird on sigillo has lots of stored folders in /vx/ImapMail/LocalFolders
    • weber can't see them
    • pine on sigillo can perhaps see them -- not currently set up
      • you could use a symlink here too I guess
  • pine on sigillo also has stored folders, in /vx/ImapMail/sigillo/
    • make them available to Thunderbird with a symlink:
      • /vx/ImapMail/LocalFolders$ ln -sf ../sigillo/sent-mail Sigillo-sent
That's pretty much the story. My problem was that past mail is most easily read in pine (thunderbird has a problem because it's trying to sync and isn't connected), so I created a stored directory from pine with important e-mails, called sigillo/important -- but I couldn't see it in thunderbird. A tentative solution is to symlink it so that thunderbird can to access it under its LocalFolders:
sigillo:/vx/ImapMail/LocalFolders$ ln -sf ../sigillo/sent-mail Sigillo-sent
There may be drawbacks to this method -- thunderbird seems to create its own versions of the folders, copying the material, instead of just using the symlink.  But basic access at least is working!

Hints

In exim4, you may need to do some manual configuration to permit local delivery of e-mail -- that is to say, e-mail delivered from one user to another on the same machine.

In cron, you can define more than one recipient for completed jobs -- for instance,

tna, steen

This may be useful for the television capture project or other projects where several people are monitoring a process.

Pine

apt-get build-dep pine
apt-get -b source pine

Standard exim4 configuration

  • just reconfigure exim4-config
    • Split configuration? No
    • mail sent by smarthost; received via SMTP or fetchmail
    • System mail name: e.g., cyberspace.ucla.edu
    • 127.0.0.1 (port to listen on)
    • Other destinations: leave blank
    • Machines to relay: leave blank
    • Smarthost: mail.sscnet.ucla.edu
    • Hide local mail name: Yes (if on cyberspace for instance)
    • Visible: edu.tikiwiki.org (on cyberspace)
    • DNS-queries minimal? No

Not thoroughly tested but should work.

Regular

On my first SuSE installation, outgoing mail worked, but not incoming. I used pine.

Date: Mon, 17 Dec 2001 17:34:08 -0800 (PST)
From: root <root@gubbio.sscnet.ucla.edu>
To: fsteen@ucla.edu
Subject: test

I'm not sure you'd want incoming mail, or how you would define it. It could be useful to have several e-mail addresses, some of them for listserv subscriptions. You could of course also run your own server for cogweb.

SSH

Get the latest version of openssh
kssh (KDE ssh client)

How to check mail from the command line. If you try to check your mail using ssh, you get "unknown terminal linux". Here's the solution:

  1. Login as user steen (or use the switch -l steen)
  2. Use the tcsh shell (type tcsh to start it)
  3. Define the environmental value terminal (set term=vt100)
  4. Verify (echo $term and get vt100)
  5. ssh ssc.ucla.edu

That does it. Note that the bash shell won't work, though I'm sure there's a workaround. Downside: can't access Norwegian keyboard. See also remote login.

Newsreader

Of course, the KDE newsreader is wonderful.

 

 

 

top
Debate
Evolution
CogSci

Maintained by Francis F. Steen, Communication Studies, University of California Los Angeles


CogWeb