[Dovecot] Dovecot LDA / Deliver question
Stacy Trippe
strippe at gmail.com
Tue Apr 15 20:58:59 EEST 2008
Problem described:
I am trying to get Postfix + Dovecot + MySQL setup to work together in a
virtual mail hosting platform. I am running Postfix 2.3.x, and MySQL 5.0.x.
I am trying to use Dovecot's LDA for delivery to the users vmail home
directory -- usually under /var/vmail/domain.com/j/jdoe for home and
/var/vmail/domain.com/j/jdoe/.maildir for mail location, using MAILDIR
format. However, I cannot get Dovecot's LDA to write the maildir
folders/files into the right location. It wants to write in MBOX format to
/var/vmail/mail/inbox instead. When I force the mail_location
variable...it just uses the system 'vmail' user (uid: 1101) and 'vmail'
group (gid: 1101) that I assigned for the virtual mail user.
mail_location = maildir:/var/vmail/%d/%1n/%n
I am not sure where to go to troubleshoot Dovecot LDA...and how to turn
up/down the verbosity of debug messages (albeit now I am logging the deliver
info to /var/log/dovecot-deliver.log).
Does anyone know what I am missing? Can Dovecot LDA be told how to deliver
mail to the users maildir folder?
Here is my postfix master.cf:
...
dovecot unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/libexec/dovecot/deliver -f ${sender}
Here is my postfix main.cf (as it pertains to dovecot LDA):
virtual_transport = dovecot
mailbox_command = /usr/libexec/dovecot/deliver
smtpd_sasl_type = dovecot
dovecot_destination_recipient_limit = 1
dovecot --version
1.0.rc15
dovecot -n
# /etc/dovecot.conf
log_path: /var/log/dovecot.log
login_dir: /var/run/dovecot/login
login_executable(default): /usr/libexec/dovecot/imap-login
login_executable(imap): /usr/libexec/dovecot/imap-login
login_executable(pop3): /usr/libexec/dovecot/pop3-login
login_greeting: SMTP ready.
login_process_size: 64
login_processes_count: 5
login_max_connections: 512
mail_executable(default): /usr/libexec/dovecot/imap
mail_executable(imap): /usr/libexec/dovecot/imap
mail_executable(pop3): /usr/libexec/dovecot/pop3
mail_plugin_dir(default): /usr/lib64/dovecot/imap
mail_plugin_dir(imap): /usr/lib64/dovecot/imap
mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
pop3_uidl_format(default): %08Xu%08Xv
pop3_uidl_format(imap): %08Xu%08Xv
pop3_uidl_format(pop3): %08Xv%08Xu
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
auth default:
mechanisms: plain login digest-md5
verbose: yes
debug: yes
debug_passwords: yes
passdb:
driver: sql
args: /etc/dovecot-sql.conf
userdb:
driver: passwd
userdb:
driver: prefetch
userdb:
driver: sql
args: /etc/dovecot-sql.conf
socket:
type: listen
client:
path: /var/spool/postfix/private/auth
mode: 432
user: postfix
group: postfix
master:
path: /var/run/dovecot/auth-master
mode: 432
user: vmail
group: vmail
grep -v '^ *\(#.*\)\?$' dovecot-sql.conf
driver = mysql
connect = host=localhost dbname=mailsql user=mailquery password=m at 1l
default_pass_scheme = PLAIN-MD5
password_query = SELECT email as user, passwd AS password,
concat('/var/vmail',homeDir) as userdb_home, 1101 AS userdb_uid, 1101 AS
userdb_gid, concat('maildir:/var/vmail',mailDir) as userdb_mail FROM users
WHERE (username = '%u' OR email = '%u' OR email =
concat('%u','@domain.net')) AND status = 'A' AND type = 'M'
user_query = SELECT concat('/var/vmail',homeDir) as home, 1101 AS uid, 1101
AS gid, concat('maildir:/var/vmail',mailDir) as mail FROM users WHERE
username = '%u'
....
The schema for my data table is as follows:
+----------+--------------+------+-----+-------------------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+--------------+------+-----+-------------------+-------+
| updated | timestamp | YES | | CURRENT_TIMESTAMP | |
| username | tinytext | NO | | NULL | |
| email | varchar(128) | NO | PRI | NULL | |
| passwd | varchar(128) | YES | | NULL | |
| name | tinytext | NO | | NULL | |
| status | char(1) | NO | | A | |
| type | char(1) | NO | | M | |
| homeDir | longtext | YES | | NULL | |
| mailDir | longtext | YES | | NULL | |
| newEmail | varchar(128) | NO | | NULL | |
+----------+--------------+------+-----+-------------------+-------+
Any help at all would be greatly appreciated!
Thanks,
Stacy
More information about the dovecot
mailing list