Our setup is ok with Postfix / Dovecot. I just need to add dovecot LDA. I use the 1.0beta9 LDA Configuration: protocol lda { postmaster_address = postmaster@clm.net4all.ch #hostname #mail_plugins #mail_plugin_dir = /usr/lib/dovecot/imap #sendmail_path = /usr/lib/sendmail auth_socket_path = /var/run/dovecot/auth-master } auth default-socket { mechanisms = plain login passdb sql { args = /usr/local/dovecot-1.0-beta9/etc/dovecot-pgsql.conf } userdb sql { args = /usr/local/dovecot-1.0-beta8/etc/dovecot-pgsql.conf } socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = vmail group = mail } } user = dovecot count = 1 } Postfix configuration, like the dovecot LDA wiki page Master.cf: dovecot unix - n n - - pipe flags=DRhu user=mail:mail argv=/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver -d ${recipient} Main.cf default_destination_recipient_limit = 1 Log: Jun 15 19:15:43 mail2 postfix/qmgr[4226]: 31FA27FF2: from=<root@localhost.localdomain>, size=343, nrcpt=1 (queue active) Jun 15 19:15:43 mail2 dovecot: auth(default-socket): master in: USER^I1^Iinfo@lda.net4all.ch^Iservice=deliver Jun 15 19:15:43 mail2 dovecot: auth(default-socket): sql(info@lda.net4all.ch): SELECT '/var/spool/mail/'||home AS home, uid, gid FROM users WHERE userid = 'info@lda.net4all.ch' Jun 15 19:15:43 mail2 dovecot: auth(default-socket): master out: USER^I1^Iinfo@lda.net4all.ch^Ihome=/var/spool/mail/lda.net4all.ch/mails/info^Iuid=1999^Igid=1999 Jun 15 19:15:43 mail2 dovecot: auth(default-socket): Jun 15 19:15:43 mail2 postfix/pipe[4314]: 31FA27FF2: to=<info@lda.net4all.ch>, relay=dovecot, delay=0, status=bounced (Command died with status 89: "/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver") The status 89 is for default error ... so no more informations with this. Permision on deliver is setuid (we use a different UID per domain) mail2:/etc/dovecot# stat /usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver File: `/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver' Size: 2507575 Blocks: 4912 IO Block: 4096 fichier r?gulier Device: 805h/2053d Inode: 65010 Links: 1 Access: (6755/-rwsr-sr-x) Uid: ( 0/ root) Gid: ( 0/ root) Access: 2006-06-15 19:15:43.314434576 +0200 Modify: 2006-06-15 13:46:15.000000000 +0200 Change: 2006-06-15 19:18:32.821665560 +0200 Can anyone help me ? Thanks, -- Dominique Feyer Administrateur Syst?me Ch. de la Colline 5bis CH-1007 Lausanne dfeyer@net4all.ch
I have only postfix log (in syslog mail facility), no dovecot log from the LDA deliver binary (with mail_debug = yes), this is strange ... Jun 16 14:37:58 mail2 postfix/pickup[6014]: 5407F7FF3: uid=0 from=<root> Jun 16 14:37:58 mail2 postfix/cleanup[6073]: 5407F7FF3: message-id=<20060616123758.5407F7FF3@mail2.clm.net4all.ch> Jun 16 14:37:58 mail2 postfix/qmgr[6015]: 5407F7FF3: from=<root@localhost.localdomain>, size=326, nrcpt=1 (queue active) Jun 16 14:37:58 mail2 postfix/pipe[6076]: 5407F7FF3: to=<info@lda.net4all.ch>, relay=dovecot, delay=0, status=bounced (Command died with status 89: "/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver") Can i activate log for the LDA in the configuration file or deliver command argument in master.cf ? Thanks Le vendredi 16 juin 2006 ? 08:24 -0400, My BSD a ?crit :> On Thu, 15 Jun 2006 19:18:40 +0200 > Dominique Feyer <dfeyer@net4all.ch> wrote: > > > Our setup is ok with Postfix / Dovecot. > > > > I just need to add dovecot LDA. > > > > I use the 1.0beta9 > > > > LDA Configuration: > > > > protocol lda { > > postmaster_address = postmaster@clm.net4all.ch > > #hostname > > #mail_plugins > > #mail_plugin_dir = /usr/lib/dovecot/imap > > #sendmail_path = /usr/lib/sendmail > > auth_socket_path = /var/run/dovecot/auth-master > > } > > auth default-socket { > > mechanisms = plain login > > passdb sql { > > args = /usr/local/dovecot-1.0-beta9/etc/dovecot-pgsql.conf > > } > > userdb sql { > > args = /usr/local/dovecot-1.0-beta8/etc/dovecot-pgsql.conf > > } > > socket listen { > > master { > > path = /var/run/dovecot/auth-master > > mode = 0660 > > user = vmail > > group = mail > > } > > } > > user = dovecot > > count = 1 > > } > > > > Postfix configuration, like the dovecot LDA wiki page > > > > Master.cf: > > dovecot unix - n n - - pipe > > flags=DRhu user=mail:mail > > argv=/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver -d > > ${recipient} > > > > Main.cf > > default_destination_recipient_limit = 1 > > > > Log: > > > > Jun 15 19:15:43 mail2 postfix/qmgr[4226]: 31FA27FF2: > > from=<root@localhost.localdomain>, size=343, nrcpt=1 (queue active) > > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): master in: > > USER^I1^Iinfo@lda.net4all.ch^Iservice=deliver > > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): > > sql(info@lda.net4all.ch): SELECT '/var/spool/mail/'||home AS home, > > uid, gid FROM users WHERE userid = 'info@lda.net4all.ch' > > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): master out: > > USER^I1^Iinfo@lda.net4all.ch^Ihome=/var/spool/mail/lda.net4all.ch/mails/info^Iuid=1999^Igid=1999 > > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): > > Jun 15 19:15:43 mail2 postfix/pipe[4314]: 31FA27FF2: > > to=<info@lda.net4all.ch>, relay=dovecot, delay=0, status=bounced > > (Command died with status 89: > > "/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver") > > > > The status 89 is for default error ... so no more informations with > > this. > > > > Permision on deliver is setuid (we use a different UID per domain) > > mail2:/etc/dovecot# > > stat /usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver > > File: `/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver' > > Size: 2507575 Blocks: 4912 IO Block: 4096 fichier > > r?gulier > > Device: 805h/2053d Inode: 65010 Links: 1 > > Access: (6755/-rwsr-sr-x) Uid: ( 0/ root) Gid: ( 0/ > > root) Access: 2006-06-15 19:15:43.314434576 +0200 > > Modify: 2006-06-15 13:46:15.000000000 +0200 > > Change: 2006-06-15 19:18:32.821665560 +0200 > > > > Can anyone help me ? Thanks, > > > > -- > > Dominique Feyer > > Administrateur Syst?me > > Ch. de la Colline 5bis > > CH-1007 Lausanne > > dfeyer@net4all.ch > > > > > > What are the corresponding "dovecot" log entries? > > (I use exim and was finally able to get "deliver" working by studying > "dovecot" log entries.) >-- Dominique Feyer Administrateur Syst?me Ch. de la Colline 5bis CH-1007 Lausanne dfeyer@net4all.ch
Hi, Dominique Feyer wrote:> Our setup is ok with Postfix / Dovecot. > > I just need to add dovecot LDA. > > I use the 1.0beta9 > > LDA Configuration: > > protocol lda { > postmaster_address = postmaster@clm.net4all.ch > #hostname > #mail_plugins > #mail_plugin_dir = /usr/lib/dovecot/imap > #sendmail_path = /usr/lib/sendmail > auth_socket_path = /var/run/dovecot/auth-master > } > auth default-socket { > mechanisms = plain login > passdb sql { > args = /usr/local/dovecot-1.0-beta9/etc/dovecot-pgsql.conf > } > userdb sql { > args = /usr/local/dovecot-1.0-beta8/etc/dovecot-pgsql.conf > } > socket listen { > master { > path = /var/run/dovecot/auth-master > mode = 0660 > user = vmail > group = mail > } > } > user = dovecot > count = 1 > } > > Postfix configuration, like the dovecot LDA wiki page > > Master.cf: > dovecot unix - n n - - pipe > flags=DRhu user=mail:mail > argv=/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver -d > ${recipient} > > Main.cf > default_destination_recipient_limit = 1 > > Log: > > Jun 15 19:15:43 mail2 postfix/qmgr[4226]: 31FA27FF2: > from=<root@localhost.localdomain>, size=343, nrcpt=1 (queue active) > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): master in: > USER^I1^Iinfo@lda.net4all.ch^Iservice=deliver > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): > sql(info@lda.net4all.ch): SELECT '/var/spool/mail/'||home AS home, uid, > gid FROM users WHERE userid = 'info@lda.net4all.ch' > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): master out: > USER^I1^Iinfo@lda.net4all.ch^Ihome=/var/spool/mail/lda.net4all.ch/mails/info^Iuid=1999^Igid=1999 > Jun 15 19:15:43 mail2 dovecot: auth(default-socket): > Jun 15 19:15:43 mail2 postfix/pipe[4314]: 31FA27FF2: > to=<info@lda.net4all.ch>, relay=dovecot, delay=0, status=bounced > (Command died with status 89: > "/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver") > > The status 89 is for default error ... so no more informations with > this. > > Permision on deliver is setuid (we use a different UID per domain) > mail2:/etc/dovecot# > stat /usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver > File: `/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver' > Size: 2507575 Blocks: 4912 IO Block: 4096 fichier > r?gulier > Device: 805h/2053d Inode: 65010 Links: 1 > Access: (6755/-rwsr-sr-x) Uid: ( 0/ root) Gid: ( 0/ root) > Access: 2006-06-15 19:15:43.314434576 +0200 > Modify: 2006-06-15 13:46:15.000000000 +0200 > Change: 2006-06-15 19:18:32.821665560 +0200 > > Can anyone help me ? Thanks, >This settings works for me. ============= dovecot.conf: ================protocols = imap pop3 pop3s ssl_cert_file = /etc/dovecot/tls/mydomai.tld.cert ssl_key_file = /etc/dovecot/tls/mydomain.tld.key log_timestamp = "%Y-%m-%d %H:%M:%S " first_valid_uid = 111 #vmail user uid first_valid_gid = 111 #vmail group gid mail_extra_groups = mail default_mail_env = maildir:/space/vmail/%d/%n protocol imap { } protocol pop3 { pop3_uidl_format = %08Xv%08Xu } protocol lda { postmaster_address = postmaster@mydomain.tld auth_socket_path = /var/run/dovecot/dovecot-auth-master } auth default { mechanisms = plain socket listen { master { path = /var/run/dovecot/dovecot-auth-master mode = 0660 user = vmail # User running Dovecot LDA group = mail # Or alternatively mode 0660 + LDA user in this group } } passdb pam { } passdb sql { args = /etc/dovecot/dovecot-sql.conf } userdb passwd { } userdb sql { args = /etc/dovecot/dovecot-sql.conf } user = root } plugin { } ============= dovecot.conf: ================ ============= dovecot-sql.conf ================driver = mysql connect = host=127.0.0.1 port=3306 dbname=postfix user=postfix password=secret client_flags=0 default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' #maildir is "mydomain.tld/username" user_query = SELECT maildir, CONCAT('/space/vmail/',maildir) AS home, 111 AS uid, 111 AS gid FROM mailbox WHERE username = '%u' ============= dovecot-sql.conf ================ ============= postfix/main.cf ===============... virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_gid_maps = static:111 virtual_mailbox_base = /space/vmail virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 111 virtual_uid_maps = static:111 #virtual_transport = virtual virtual_transport = dovecot dovecot_destination_recipient_limit = 1 ... ============= postfix/main.cf =============== ============= postfix/master.cf ===============... # Dovecot LDA dovecot unix - n n - - pipe flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -d ${recipient} ... ============= postfix/master.cf =============== # ls -al /space/|grep vmail drwxrwx--- 3 vmail vmail 4096 2006-05-10 17:50 vmail # ls -al /space/vmail total 12 drwxrwx--- 3 vmail vmail 4096 2006-05-10 17:50 . drwxr-xr-x 7 root root 4096 2006-06-06 10:35 .. drwxrwx--- 7 vmail vmail 4096 2006-06-09 16:26 mydomain.tld Regards, Dumitru
Thanks. The log is really useful ;-) **** deliver(info@lda.net4all.ch): Fatal: Running as root isn't permitted **** So it's not possible acutally to use LDA to deliver mail with different UID/GID So I need the change all the owner for my mail storage ... update the DB and restart the service ... it's bad !!! I need a lots of downtime to change the owner of 80Go data storage. So beafore that, I need to test the dovecot-sieve plugin from CVS. Next month a lot of my customer are in holiday and the need auto responders ;-) I try the dovecot-sieve plugin from the CVS and I have this error when i start make (configure as no error): libsieve.a(script.o)(.text+0xa23): In function `sieve_script_load': /usr/src/dovecot-sieve/src/libsieve/script.c:435: undefined reference to `map_refresh' libsieve.a(script.o)(.text+0xaf0): In function `sieve_script_unload': /usr/src/dovecot-sieve/src/libsieve/script.c:462: undefined reference to `map_free' libsieve.a(sieve.o)(.text+0x1e6e): In function `verify_flag': /usr/src/dovecot-sieve/src/libsieve/sieve.y:951: undefined reference to `imparse_isatom' collect2: ld returned 1 exit status make[3]: *** [sievec] Erreur 1 make[3]: Leaving directory `/usr/src/dovecot-sieve/src/libsieve' make[2]: *** [all-recursive] Erreur 1 make[2]: Leaving directory `/usr/src/dovecot-sieve/src' make[1]: *** [all-recursive] Erreur 1 make[1]: Leaving directory `/usr/src/dovecot-sieve' make: *** [all-recursive-am] Erreur 2 I have the same error last week when I try to build dovecot-lda with sieve script support from the CVS. I use Debian Sarge. I think the macro imparse_isatom is from the cyrus-imapd project. I try to install cyrus-dec and cyrus21-dev with apt-get ... but always the same error. Do you have a idea ? Le vendredi 16 juin 2006 ? 10:44 -0400, My BSD a ?crit :> On Fri, 16 Jun 2006 14:44:51 +0200 > Dominique Feyer <dfeyer@net4all.ch> wrote: > > > I have only postfix log (in syslog mail facility), no dovecot log from > > the LDA deliver binary (with mail_debug = yes), this is strange ... > > > > Jun 16 14:37:58 mail2 postfix/pickup[6014]: 5407F7FF3: uid=0 > > from=<root> Jun 16 14:37:58 mail2 postfix/cleanup[6073]: 5407F7FF3: > > message-id=<20060616123758.5407F7FF3@mail2.clm.net4all.ch> > > Jun 16 14:37:58 mail2 postfix/qmgr[6015]: 5407F7FF3: > > from=<root@localhost.localdomain>, size=326, nrcpt=1 (queue active) > > Jun 16 14:37:58 mail2 postfix/pipe[6076]: 5407F7FF3: > > to=<info@lda.net4all.ch>, relay=dovecot, delay=0, status=bounced > > (Command died with status 89: > > "/usr/local/dovecot-1.0-beta9/libexec/dovecot/deliver") > > > > Can i activate log for the LDA in the configuration file or deliver > > command argument in master.cf ? > > > ... > > My dovecot setup logs to a file, settings below: > > ---------------------------------------------- > mail_debug = yes > log_path = /var/log/dovecot/dovecot > info_log_path = /var/log/dovecot/dovecot.info > ---------------------------------------------- > > Make sure that the socket user has write access to the file, otherwise > it won't work (and thinking of it, also make sure that the socket user > also has access to the socket itself -- that was one of my biggest > problems before I got it to work). > > You may also want to add the following until you get it working: > > ---------------------------------------------- > auth_verbose = yes > auth_debug = yes > auth_debug_passwords = yes > ---------------------------------------------- > > Good luck! >-- Dominique Feyer Administrateur Syst?me Ch. de la Colline 5bis CH-1007 Lausanne dfeyer@net4all.ch