[Dovecot] Vexim with LDA delivery

Chris Wopat chrisw at supranet.net
Fri Mar 9 21:19:43 EET 2007


No support help needed, just a success report having Dovecot integrate 
with Vexim (exim with web based frontend and sql db):

	http://silverwraith.com/vexim/

Just wanted to forward some configs to the list if anyone finds them 
useful. I just switched from vexim's normal "virtual_delivery" to 
"dovecot_virtual_delivery" so I could use sieve, which works nicely with 
Horde. This is mostly as described on the wiki:

	http://wiki.dovecot.org/LDA

I'm using maildirsize in my case. There were a few things that had to be 
done to get it to work with quotas, I thought I would just spell it all 
out for anyone reading this list in the future:

I can add stuff if anyone would like to the wiki, some of these items 
are elsewhere in the wiki, I wanted to ask before I put a full page up 
for integration with Vexim in particular. Should I do this, or just 
throw bits and peices where they seem relevant?

This was on FreeBSD, hence the /usr/local/etc/ stuff.


Exim's 'configure' file:
================================
virtual_domains:
   #file_transport = virtual_delivery
   file_transport = dovecot_virtual_delivery

virtual_domains_catchall:
   #file_transport = virtual_delivery
   file_transport = dovecot_virtual_delivery


dovecot_virtual_delivery:
         driver = pipe
         command = /usr/local/libexec/dovecot/deliver -d \
		$local_part@$domain
         message_prefix =
         message_suffix =
         delivery_date_add
         envelope_to_add
         return_path_add
         log_output
         user = mailnull


dovecot-sql.conf:
================================
driver = mysql
connect = host=HOSTNAME dbname=vexim user=vexim password=PASSWORD
default_pass_scheme = CRYPT
password_query = SELECT crypt as password FROM users,domains \
	WHERE users.username = '%u' AND users.enabled = '1' \
	AND users.type='local' and domains.enabled='1' \
	AND domains.domain_id = users.domain_id
user_query = SELECT pop AS home, 26 AS uid, 26 AS gid, \
	CONCAT('maildir:storage=', quota*1024) AS quota \
	FROM users WHERE username = '%u' AND enabled = '1'


Mostly complete dovecot.conf (much of this is obvious, but it's easier 
than piecing things together from various mailing lists posts/docs):
================================

mail_location = maildir:%h/Maildir
first_valid_gid = 26
last_valid_gid = 26
protocol lda {
	mail_plugins = quota
}
auth default {
	mechanisms = plain
	passdb sql {
		args = /usr/local/etc/dovecot-sql.conf
	}
	userdb sql {
		args = /usr/local/etc/dovecot-sql.conf
	}
	user = root
	socket listen {
		master {
			path = /var/run/dovecot/auth-master
			mode = 0660
			user = mailnull
			group = mail
		}
	}

}

plugin {
	quota = maildir
}

================================


--Chris


More information about the dovecot mailing list