Dovecot does not fetch mail from /var/spool/mail/$user to mail_location
Solution 1:
Andrzej's comment above is right on; dovecot isn't supposed to automagically do that. You will either need to tell sendmail to put the mail where dovecot is expecting it (or at least tell its local delivery agent to do that), or tell dovecot to expect it where sendmail puts it.
In my case, I do the latter; my dovecot.conf
includes the line
mail_location = mbox:~/:INBOX=/var/spool/mail/%u
Edit: your sendmail is configured much as mine, using procmail
as the local MDA. The man page for procmail suggests that /var/spool/mail/$user
is the default place that procmail wil put incoming mail, if no other is provided:
/var/spool/mail/$LOGNAME system mailbox; both the system mailbox and the immediate directory it is in will be created every time procmail starts and either one is not present
so I repeat my point: you can either configure sendmail's MDA, procmail, to put incoming mail in /home/$user/mail/.INBOX
, or you can configure dovecot to look in /var/spool/mail/$user
. But you will have to do one of these things, it's not going to happen by magic.
Solution 2:
Sendmail reconfiguration for integration with dovecot
http://wiki2.dovecot.org/LDA/Sendmail
For using dovecot for delivery for existing OS use account consider adding the following lines to sendmail,mc
file [sendmail.mc
requires compilation into sendmail.cf
]
FEATURE(`local_procmail', `/usr/local/libexec/dovecot/dovecot-lda',`/usr/local/libexec/dovecot/dovecot-lda -d $u')
MODIFY_MAILER_FLAGS(`LOCAL', `-f')
Other possible sendmail reconfiguration options
- making sendmail use dovecot only for UIDs no lesser than 1000
[clasic delivery for system users/accounts, dovecot for normal users] - making sendmail support deliveries to existing virtual dovecot users [local_procmail based reconfiguration DOES NOT support it]