1

I have a computer with Ubuntu 13.04 with a local IMAP server that I use to share email over the LAN. I set this computer up to have an encrypted /home, however this therefore means that anyone logging into the server won't be able to view the IMAP folders unless the local user is also logged in. I want to therefore move the mail to /var/mail/Maildir/%u.

I have the following in my /etc/dovecot/conf.d/01-mail-stack-delivery.conf

mail_location = maildir:/var/mail/Maildir/%u

And my /etc/postfix/main.cf has:

home_mailbox = Maildir/

However when I log in locally with a mail client over IMAP, it recreates the ~/Maildir directory instead of using /var/mail/. What am I missing?

Edit:

Here is my postconf -n after applying shutupsquare's answer:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = /usr/lib/dovecot/deliver -c /etc/dovecot/dovecot.conf -m "${EXTENSION}"
mailbox_size_limit = 0
mailbox_transport = dovecot
mydestination = $myhostname, $mydomain, localhost.$mydomain, localhost, localhost.localdomain, ubuntu
myhostname = host
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = reject_unknown_sender_domain
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/ssl/certs/ssl-mail.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-mail.key
smtpd_tls_mandatory_ciphers = medium
smtpd_tls_mandatory_protocols = SSLv3, TLSv1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
virtual_alias_maps = hash:/etc/postfix/virtual

Edit 2: my /var/log/mail.log contains the following:

May  4 02:10:01 servername postfix/local[469]: warning: connect #7 to subsystem private/dovecot: No such file or directory
May  4 02:10:11 servername postfix/local[469]: warning: connect #8 to subsystem private/dovecot: No such file or directory
May  4 02:10:21 servername postfix/local[469]: warning: connect #9 to subsystem private/dovecot: No such file or directory
May  4 02:10:31 servername postfix/local[469]: warning: connect #10 to subsystem private/dovecot: No such file or directory
May  4 02:10:41 servername postfix/local[469]: fatal: connect #11 to subsystem private/dovecot: No such file or directory
May  4 02:10:42 servername postfix/qmgr[30763]: warning: private/local socket: malformed response
May  4 02:10:42 servername postfix/qmgr[30763]: warning: transport local failure -- see a previous warning/fatal/panic logfile record for the problem description
May  4 02:10:42 servername postfix/master[30759]: warning: process /usr/lib/postfix/local pid 469 exit status 1
May  4 02:10:42 servername postfix/master[30759]: warning: /usr/lib/postfix/local: bad command startup -- throttling
1

in /etc/postfix/main.cf

Remove:

home_mailbox = Maildir/

and add this line in:

mailbox_transport = dovecot

You should also have in /etc/dovecot/conf.d/15-lda.conf

lda_mailbox_autocreate = yes

  • That didn't seem to work – Mike May 4 '13 at 7:46
  • See the edit, file name maybe different in Ubuntu mind they like to do stuff like that. – 0x7c0 May 4 '13 at 7:56
  • PS, service restart dovecot && service restart postfix after changing files. – 0x7c0 May 4 '13 at 7:58
  • Hmm tried that too and it still doesn't work. It's still trying to look under ~/Maildir when I check for mail and recreating that directory when it doesn't exist – Mike May 4 '13 at 8:04
  • post the /var/log/mail.log when its looking up the mailbox, and turn dovecots logging on for mail. – 0x7c0 May 4 '13 at 8:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.