Standard mail location and format

Simon McVittie simon.mcvittie at
Mon Jun 29 04:36:04 PDT 2009

On Mon, 29 Jun 2009 at 13:24:31 +0900, Daniel Bo wrote:
> Is there an XDG variable for user mail location? Should there be a
> standard location and format? I can see the spec being pretty simple:
> Default: ~/Mail
> Format: MailDir

I don't think that's conventional? The locations I've usually seen are:

~/Maildir, a Maildir [1] or Maildir++ [2]

~/Mail, a directory containing one mbox file [3] per mail folder

/var/mail (or sometimes /var/spool/mail), a directory containing one mbox
file per user representing that user's inbox [4]

However, trying to standardize this in the same way as XDG_DATA_DIRS probably
isn't very useful: on systems with a local MTA, where mail is delivered is
mainly a sysadmin decision, and users have to either cope with where the
sysadmin has told the MTA to put their mail, or use .forward/procmail/whatever
(if allowed) to divert it to a location of their choice.

On systems that have an IMAP (or POP3) server, users who want to take advantage
of that can't even divert their mail somewhere else: they have to rely on the
sysadmin configuring the IMAP server to look in the same place that the MTA
delivers mail (typically the sysadmin would point both to ~/Maildir).

On systems with no local MTA (i.e. users download mail directly into their
MUA, in the same way as on Windows) the only important location is where the
user's preferred MUA puts their mail and how that MUA stores it; MUAs that
use different storage formats (e.g. Maildir vs mbox vs sqlite) can't
share mail storage anyway.


[2] Maildir doesn't support subfolders, but Maildir++ does.

More information about the xdg mailing list