Trim /var/spool/mail/username? - Grin with cat attached — LiveJournal
Previous Entry Next Entry
Trim /var/spool/mail/username? Jun. 18th, 2004 09:46 pm
Geek Q - mail admin, to be precise:

My mail server runs Exim, and Dovecot IMAP. Incoming mail for myself is dropped by exim into /var/spool/mail/wechsler. Dovecot drops my mail into /var/mail/wechsler (INBOX) and ~/mail/* (subfolders).

Therefore when I collect mail via IMAP I don't need the data in /var/spool/mail/wechsler.

Thus the question:
Which service would usually trim this on a standard mailserver? I can't see a way for dovecot to do this, which I assume would be responsible for the task.

Non-geek content may appear in this journal once I figure out my work/life balance and get more sleep.

D'oh: lrwxrwxrwx 1 root root 7 Oct 28 2002 /var/spool/mail -> ../mail

Thanks folks.

Solution that I use

From: bondagewoodelf
Date: June 18th, 2004 - 09:25 pm (Link)
sendmail dumps in /var/spool/mail/user
elm reads in /var/mail/user

So I have:

ln -sf /var/spool/mail /var/mail

From: bondagewoodelf
Date: June 18th, 2004 - 09:26 pm (Link)
Well, of course it's not sendmail, but rather the mail.local delivery program, but you get the idea.
From: grahamb
Date: June 18th, 2004 - 09:52 pm (Link)

Exim will deliver the mail to whichever spool you tell it to. Traditionally you only have one mail spool, linking the two is optional but most modern OS' do this for you, otherwise you end up in situations like you have now.

If you only go with one, stick with the convention for your OS. FreeBSD for example uses /var/mail by default. As does Solaris. Linux, well, it varies.

If you've installed Exim and Dovecott from source you'd be able to tell them where your spool is. If you've installed them from packages you're probably better off linking the two mail spools.

From: ciphergoth
Date: June 19th, 2004 - 10:05 am (Link)
The Linux Filesystem Hierarchy Standard mandates /var/mail: