Directory delivery discombobulation

mdb at primelogic.com mdb at primelogic.com
Sat Jan 9 22:49:08 UTC 2016


Greetings,

On a server running FreeBSD 8.2, I'm configuring Postfix 2.8.0 and 
Dovecot 1.2.16, using Dovecot for SASL and LDA. For reasons I won't go 
into, I don't want to upgrade anything on the server to current 
versions. I'm configuring for maildir with virtuals. Here's the 
directory structure I want to use:

     /usr/vmail/domain/username/cur,new,tmp

And here's where Dovecot is delivering mail:

     /usr/vmail/domain/user/Maildir/cur,new,tmp

Oddly, the first time I connected with Thunderbird (configured for 
IMAP), the following directories were created in 
/usr/vmail/domain/user/, i.e., below Maildir:

     .INBOX.Drafts
     .INBOX.Sent
     .Junk
     .Trash

Thunderbird can see sent mail in .INBOX.Sent, but it can't see any mail 
in Maildir. Obviously, something is amiss in my configuration. Here's 
the dovecot -n output:

# 1.2.16: /usr/local/etc/dovecot.conf
# OS: FreeBSD 8.2-RELEASE i386  ufs
protocols: imap pop3
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/local/libexec/dovecot/imap-login
login_executable(imap): /usr/local/libexec/dovecot/imap-login
login_executable(pop3): /usr/local/libexec/dovecot/pop3-login
verbose_proctitle: yes
first_valid_uid: 1000
first_valid_gid: 1000
mail_privileged_group: mail
mail_location: maildir:/home/vmail/%d/%n
maildir_very_dirty_syncs: yes
mail_executable(default): /usr/local/libexec/dovecot/imap
mail_executable(imap): /usr/local/libexec/dovecot/imap
mail_executable(pop3): /usr/local/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/local/lib/dovecot/imap
mail_plugin_dir(imap): /usr/local/lib/dovecot/imap
mail_plugin_dir(pop3): /usr/local/lib/dovecot/pop3
imap_client_workarounds(default): delay-newmail netscape-eoh 
tb-extra-mailbox-sep
imap_client_workarounds(imap): delay-newmail netscape-eoh 
tb-extra-mailbox-sep
imap_client_workarounds(pop3):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
lda:
   sendmail_path: /usr/sbin/sendmail
auth default:
   mechanisms: plain login
   username_format: %Lu
   passdb:
     driver: passwd-file
     args: /etc/dovecot/passwd
   userdb:
     driver: static
     args: uid=1000 gid=1000 home=/home/vmail/%d/%n
   socket:
     type: listen
     client:
       path: /var/spool/postfix/private/auth
       mode: 432
       user: postfix
       group: postfix
     master:
       path: /var/run/dovecot/auth-master
       mode: 384
       user: postfix
       group: postfix

Note that I haven't defined mail_location as "maildir:~/Maildir," yet 
Dovecot is delivering to the Maildir directory (a directory I don't 
want). I'm not sure about the path in args:

userdb:
     driver: static
     args: uid=1000 gid=1000 home=/home/vmail/%d/%n

Here's the LDA config for virtuals in Postfix's master.conf:

dovecot   unix  -       n       n       -       -       pipe
   flags=DRhu user=vmail:vmail 
argv=/usr/local/libexec/dovecot/dovecot-lda -f ${sender} -d ${recipient}

I'm also unsure about the home_mailbox value in Postfix's main.cf. The 
docs say this: " Specify
"Maildir/" for qmail-style delivery (the / is required)." And there was 
no alternative listed, so that's what I used:

home_mailbox = Maildir/

However, does it designate a directory named Maildir?

Not sure if they're relevant, but here are some additional config lines 
from Postfix's main.cf

virtual_mailbox_domains = /etc/postfix/vhosts
virtual_mailbox_base = /home/vmail/
virtual_mailbox_maps = hash:/etc/postfix/vmaps
virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000

smtpd_sasl_type = dovecot
# Can be an absolute path, or relative to $queue_directory
smtpd_sasl_path = /var/spool/postfix/private/auth
# and the common settings to enable SASL:
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks, 
permit_sasl_authenticated,reject_unauth_destination

Finally,  "postconf -a" returns "dovecot," so SASL is copacetic.

That's all I can think of that might be relevant. It sure would be nice 
if Dovecot would forget about the Maildir directory and deliver directly 
to the username/ directory so Thunderbird could access it, but other 
than setting the mail_location var to "maildir:/home/vmail/%d/%n," I'm 
at a loss.

Thanks for your help.

Doc


More information about the dovecot mailing list