[Dovecot] From Sendmail to Dovecot mdbox, what is missing.

Torpey List list at torpey.org
Tue Jan 1 01:37:25 EET 2013


Sendmail 8.14.4
dovecot 2.0.9


I have sendmail working and it is sending mail to /var/mail/%u.
I have dovecot working in that I can move emails into IMAP folders and I can send email through IMAP.  I have set up dovecot to use mdbox based on the following:
mail_location = mdbox:~/mail

However, I seem to be lacking a key piece of information.  
Sendmail is sending the mail to /var/mail/%u as a mbox (single file for all emails) format.
Dovecot wants to read the mail in mdbox (Multiple messages per file, but unlike mbox multiple files per mailbox.)  So the two programs are not working together.

So, I cannot get dovecot to read new emails at /var/mail/%u.
So I tried changing to the following:
mail_location = mdbox:~/mail:INBOX=/var/mail/%u
However, dovecot complains that it is NOT a directory.  That is because sendmail is sending as mbox format.

I have tried two lines of “mail_location” but that did not work.
example
        mail_location = mdbox:~/mail                                   ----> for dovecot
        mail_location = mbox:INBOX=/var/mail/%u            -----> for sendmail

I have tried LMTP and dovecot-lda.

LMTP – I could not see any difference with this added or not.

Dovecot-lda – I have had issues getting it configured.

Thanks for any help!

Sendmail changes
FEATURE(`local_procmail', `/usr/libexec/dovecot/dovecot-lda',`/usr/libexec/dovecot/dovecot-lda -d $u')
MODIFY_MAILER_FLAGS(`LOCAL', `-f')
MAILER(procmail)dnl

Here is dovecot configuration
[root at nala mail]# dovecot -n
# 2.0.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-279.14.1.el6.x86_64 x86_64 Scientific Linux release 6.3 (Carbon)
auth_mechanisms = plain login
mail_gid = mail
mail_location = mdbox:~/mail
mail_uid = mail
mbox_write_locks = fcntl
passdb {
  driver = pam
}
plugin {
  mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
  mail_log_group_events = yes
}
service auth {
  unix_listener auth-userdb {
    mode = 0600
    user = mail
  }
}
service lmtp {
  inet_listener lmtp {
    address = 192.168.1.185 127.0.0.1 ::1
    port = 24
  }
  user = mail
}
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
protocol lda {
  info_log_path = /var/log/maillog
  log_path = /var/log/maillog
  postmaster_address = postmaster at torpey.org
}


More information about the dovecot mailing list