简体   繁体   中英

Exim: read local mail with simple mail client like unix `mail`

EDIT: I have not used the wrong mail reader, but my exim was no configured correctly. So I go and check that first. I used exim quite out-of-the-box in gentoo linux.

Original Question:

It's a bit hard to google, since the word mail means much more than just the unix command mail .

I want to run a local exim that spools most of the mail just locally. I want to read that mail with something like mail from commandline.

Now, exim does not use /var/spool/mail and not the same spooling format, so mail just finds no new mails.

So my question: how should I combine a simple mail client with exim, and which simple mail client is able to do so?

Check your exim.conf file to see which transports are delivering local messages. It will look something like this (from an Ubuntu machine):

mail_spool:
  debug_print = "T: appendfile for $local_part@$domain"
  driver = appendfile
  file = /var/mail/$local_part
  delivery_date_add
  envelope_to_add
  return_path_add
  group = mail
  mode = 0660
  mode_fail_narrower = false

Also go look in your mail logs, somewhere under /var/log. Find where it's actually delivering the messages by finding what transport it's using to deliver them. It will be in the delivery line (the one containing "=>" to the local user) and will be of the format T=transport_name . You can look at that transport definition in exim.conf to determine where it's delivering them if you can't figure out where the emails are being delivered from the log messages.

Alternative: Every distro has the mutt MUA available as well (CentOS installs it by default). You might find it easier to install and configure mutt to read the mail spool wherever it is being delivered, than to try and re-work whatever custom changes your distro made to exim and its local mail spool delivery. Common delivery locations are:

  1. /var/mail/$USER
  2. $HOME/Maildir/
  3. $HOME/.maildir/

Note that the presence of a trailing slash when defining mail spools usually indicates that the mailbox is in Maildir++ format (ie one file per message). The absence of that slash usually indicates that the mailbix is in mbox format (ie one big file).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM