[Dovecot] Problems with LDA and vitual mailboxes
Hello,
I try to set up dovecot LDA with virtual domains/mailboxes to use sieve.
I use dovecot 1.0_rc7 with sieve dovecot-sieve-20060726 .
All datas about the virtual domains and mailboxes are stored in a mysql-database. And without using the LDA delifer agent, everything works fine.
But when I try to use LDA (even without sieve), I got a delivery failture.
I followed the wiki-howto http://wiki.dovecot.org/LDA to set up LDA support and added
/etc/postfix/maser.cf:
# Dovecot LDA dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
/etc/postfix/main.cf: dovecot_destination_recipient_limit = 1 virtual_transport = dovecot
for postfix.
In dovecot.conf I added:
auth default { # Space separated list of wanted authentication mechanisms: # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi mechanisms = plain login
# SQL database passdb sql { # Path for SQL configuration file, see doc/dovecot-sql.conf for example args = /etc/dovecot/dovecot-sql.conf }
# SQL database userdb sql { # Path for SQL configuration file, see doc/dovecot-sql.conf for example args = /etc/dovecot/dovecot-sql.conf }
socket listen { master { path = /var/run/dovecot-auth-master # use this for LDA, the dovecot-auth will NOT work mode = 0600 user = virtual #group = mail # Or alternatively mode 0660 + LDA user in this group } client { path = /var/run/dovecot-auth # use this for postfix mode = 0600 user = posfix # postfix user #group = mail # Or alternatively mode 0660 + postfix user in this group } } }
protocol lda { log_path = /var/tmp/dovecot-lda.log {
And in dovecot-sql
# Dataabase driver: mysql, pgsql driver = mysql
# Currently supported schemes include PLAIN, PLAIN-MD5, DIGEST-MD5, and CRYPT. default_pass_scheme = CRYPT #default_pass_scheme = PLAIN-MD5
# Database options connect = host=localhost dbname=$DB user=$USER password=$PASSWD
password_query = SELECT password FROM mailbox WHERE username = '%u' AND active = '1' user_query = SELECT maildir, 1002 AS uid, 1004 AS gid FROM mailbox WHERE username = '%u' AND active = '1'
# eof
But when I send a mail to a vitual user, I got the following log entries in mail.log:
Oct 11 08:40:38 server postfix/pipe[11673]: D39A5664420: to=zigulle@zigulle.de, relay=dovecot, delay=0.08, delays=0.06/0/0/0.03, dsn=4.3.0, status=deferred (temporary failure)
and in /var/tmp/dovecot-lda.log: deliver(zigulle@zigulle.de): Error: userdb(zigulle@zigulle.de) didn't return a home directory
has anyone here a hint, where the Problem ist?
cu Daniel
TELEKOM-Mitarbeiter, die keine TELEKOM-Aktien kaufen, sollten wegen Verwendung von Insider-Wissen bestraft werden. (Azkin Kaden)
On Wed, 2006-10-11 at 09:18 +0200, Daniel Frickemeier wrote:
user_query = SELECT maildir, 1002 AS uid, 1004 AS gid FROM mailbox WHERE username = '%u' AND active = '1' .. deliver(zigulle@zigulle.de): Error: userdb(zigulle@zigulle.de) didn't return a home directory
Problem is exactly this. Deliver won't run unless you return "home" from user_query. I don't think this should be required if you're now using Sieve, so I guess I'll change this.. But since you want to use Sieve, the users' Sieve scripts are placed in their home directory, and deliver need to know where to find them.
Thanx for your fast aswer. Now I could fix it!!!
Am Mittwoch, 11. Oktober 2006 12:21 schrieb Timo Sirainen:
On Wed, 2006-10-11 at 09:18 +0200, Daniel Frickemeier wrote:
user_query = SELECT maildir, 1002 AS uid, 1004 AS gid FROM mailbox WHERE username = '%u' AND active = '1' ... deliver(zigulle@zigulle.de): Error: userdb(zigulle@zigulle.de) didn't return a home directory
Problem is exactly this. Deliver won't run unless you return "home" from user_query. I don't think this should be required if you're now using Sieve, so I guess I'll change this.. But since you want to use Sieve, the users' Sieve scripts are placed in their home directory, and deliver need to know where to find them.
I´m simply adding
SELECT maildir AS home,
into the query and the LDA delivery is ok. Now I have to check if the sieve plugin is working correctly.
-- Je mehr ich lerne, desto mehr weiß ich. Je mehr ich weiß, desto mehr vergesse ich. Je mehr ich vergesse, desto weniger weiß ich. Wozu also lernen?
Next Problem,
Am Mittwoch, 11. Oktober 2006 12:59 schrieb Daniel Frickemeier:
I´m simply adding
SELECT maildir AS home,
into the query and the LDA delivery is ok. Now I have to check if the sieve plugin is working correctly.
LDA is now working corectly, but LDA ist geting zigulle@zigulle.de as home. The virtual home for this Server is:
/home/virtual/zigulle.de/zigulle@zigulle.de
as described in the maildir-varialbe in dovecot.conf. So I think, that the sieve-plugin is looking in /zigulle@zigulle.de/.dovecot.sieve for the scripts, finding nothing and do nothing.
So is there any posibility to change the path of an users home for sieve?
cu Daniel
-- Kölsch ist kein Element der Menge Bier. Selbst wenn es nach 1000 Reinheitsge- boten gebraut wäre. -- Ein Glas Wasser entspricht strenggenommen auch dem Reinheitsgebot. Es ist dennoch nicht als Bier zu bezeichnen. Was weder die Amerikaner noch die Koelner zu stoeren scheint. (Juergen P. Meier in d.a.s.r)
On Wed, 2006-10-11 at 13:40 +0200, Daniel Frickemeier wrote:
Next Problem,
Am Mittwoch, 11. Oktober 2006 12:59 schrieb Daniel Frickemeier:
I´m simply adding
SELECT maildir AS home,
into the query and the LDA delivery is ok. Now I have to check if the sieve plugin is working correctly.
LDA is now working corectly, but LDA ist geting zigulle@zigulle.de as home. The virtual home for this Server is:
/home/virtual/zigulle.de/zigulle@zigulle.de
as described in the maildir-varialbe in dovecot.conf.
By maildir-variable I guess you mean default_mail_env?
How about changing your configuration like this:
user_query = select '/home/virtual/%Ld/%Lu' as home, ...
default_mail_env = maildir:%h
participants (2)
-
Daniel Frickemeier
-
Timo Sirainen