Standard Linux installation provide a maildir in /var/spool/mail/$user
(that's actually a single file holding all emails, not a "mail directory"), soft-linked by /var/mail/
.
I'm going to set up managed email on my installation, and I want to store mail in a separate partition that can be attached to the file system in case of server reimage (I already enforced this disaster-recovery measure for services such as mysql
). The separate filesystem is /home
.
So I would like system mail to be delivered to /home/$user/.mail[/]
(final /
in brackets because I'm not sure whether to include mail in a directory or not).
Currently, I run email for my own domain by redirecting all email to my ISP's email, which will not be forever (in case I change ISP I must migrate all email to the new ISP), so Postfix is instructed to redirect everyting directed to *@example.org
to user@example.com
.
I was thinking about using Dovecot
as email server, as it fully supports SSL.
So first, before configuring Dovecot, how do I tell the system to deliver mail in a different directory than /var/spool? Please mind that cron regularly sends email to root
when jobs don't write to /dev/null
, so the configuration must be system-wide.