Hello,
using dovecot with postfix with mysql. Some domains have alias. Local delivery is realized over lmtp.
When lmtp delivery to aliased domains, it takes bad mail_location - it takes aliased instead real domain, so lmtp is creating domain and user directory. Lmtp doesn't make sql lookup. I need lmtp delivery to real domain and i don't want to create symlinks.
mail_location = maildir:/home/mail/%d/%n/Maildir real domain: domain1.com aliased domain: domain2.com
rcpt: user@domain2.com
lmtp deliver message to /home/mail/domain2.com/user/Maildir instead /home/mail/domain1.com/user/Maildir
-- Lampa
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 20 Sep 2013, Lampa wrote:
using dovecot with postfix with mysql. Some domains have alias. Local delivery is realized over lmtp.
When lmtp delivery to aliased domains, it takes bad mail_location - it takes aliased instead real domain, so lmtp is creating domain and user directory. Lmtp doesn't make sql lookup. I need lmtp delivery to real domain and i don't want to create symlinks.
mail_location = maildir:/home/mail/%d/%n/Maildir real domain: domain1.com aliased domain: domain2.com
rcpt: user@domain2.com
lmtp deliver message to /home/mail/domain2.com/user/Maildir instead /home/mail/domain1.com/user/Maildir
without doveconf -n and, in this case, postfix configuration, nobody can really help you. But:
Postfix seems to deliver the message to recipient user@domain2.com via LMTP. Dovecot verifies user@domain2.com as valid. How should Dovecot know that user@domain2.com is user@domain1.com ?
So, either: a) reconfigure postfix to rewrite user@domain2.com into user@domain1.com before the message is passed to LTMP, or
b) have you Dovecot userdb rewrite the user. Return the file "user" with the correct domain.
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkE3h13r2wJMiz2NAQL2Twf9FL1TQfjgCSbqu5bxrE4ZL8KLgSjD74U8 XNSM8RHPAtNWqXuCreYt6Qg9SMjICkus6ymISbk6+c/zWj1HPIp0JonD0IYepZ+X EN18YMiBH5GhaSuyfBCVZEPRXJuKgNVqeZauyRL5sYwnTT/rLD4nxrbSzE+eWJwg fPiONQ8jj3w0veER0qHc3Zi1knWsiLYr3uAPiAGrZizwH5gUIEVkVph8/u9kAhAi alOc4vwaJ+CJJO0L/aBHfZOkgRB4bIuY+Jv8g1q2lwIS0b9kjTcpKf/6F5VgxFva qwV4FsyUPA+Bb/qSt9v5aeVjn6ekHZFRQNgvcRBj6Oi7ax3G8D3XIQ== =PIp+ -----END PGP SIGNATURE-----
Hello,
a) i think not necessary because of b) b) yes password_query and user_query always returns rewrited domain (returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Fri, 20 Sep 2013, Lampa wrote:
using dovecot with postfix with mysql. Some domains have alias. Local
delivery is realized over lmtp.
When lmtp delivery to aliased domains, it takes bad mail_location - it takes aliased instead real domain, so lmtp is creating domain and user directory. Lmtp doesn't make sql lookup. I need lmtp delivery to real domain and i don't want to create symlinks.
mail_location = maildir:/home/mail/%d/%n/**Maildir real domain: domain1.com aliased domain: domain2.com
rcpt: user@domain2.com
lmtp deliver message to /home/mail/domain2.com/user/**Maildir<http://domain2.com/user/Maildir>instead /home/mail/domain1.com/user/**Maildir <http://domain1.com/user/Maildir>
without doveconf -n and, in this case, postfix configuration, nobody can really help you. But:
Postfix seems to deliver the message to recipient user@domain2.com via LMTP. Dovecot verifies user@domain2.com as valid. How should Dovecot know that user@domain2.com is user@domain1.com ?
So, either: a) reconfigure postfix to rewrite user@domain2.com into user@domain1.combefore the message is passed to LTMP, or
b) have you Dovecot userdb rewrite the user. Return the file "user" with the correct domain.
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkE3h13r2wJMiz2NAQL2Tw**f9FL1TQfjgCSbqu5bxrE4ZL8KLgSjD**74U8 XNSM8RHPAtNWqXuCreYt6Qg9SMjICk**us6ymISbk6+c/**zWj1HPIp0JonD0IYepZ+X EN18YMiBH5GhaSuyfBCVZEPRXJuKgN**VqeZauyRL5sYwnTT/rLD4nxrbSzE+**eWJwg fPiONQ8jj3w0veER0qHc3Zi1knWsiL**Yr3uAPiAGrZizwH5gUIEVkVph8/**u9kAhAi alOc4vwaJ+CJJO0L/**aBHfZOkgRB4bIuY+**Jv8g1q2lwIS0b9kjTcpKf/**6F5VgxFva qwV4FsyUPA+Bb/**qSt9v5aeVjn6ekHZFRQNgvcRBj6Oi7**ax3G8D3XIQ== =PIp+ -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
a) i think not necessary because of b) b) yes password_query and user_query always returns rewrited domain (returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
What's your /etc/dovecot/dovecot-sql.conf.ext ?
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFPRF3r2wJMiz2NAQKydgf9GRWttd8azegc0CelpofrFZotbCXZa4r9 5PqkKShwNWMB0qj+maVo9Wm4wTkIEAKAqC2oExkNDNkErwUVaBGQClx6TcQmDum2 PcjEsFMEK2nsmlhv3HvfcIhMvKexgesPefWvLf+RsfUT1/ClOgdgaNTGxYIfGelp 5s/Z9DzH65U65ngWYyCmydHkRoAkUf+tMqw874hgGkAgaY9ZYApDx9yGmpQkmJ1t Q0VWGCnCa8V5h3pHigucWlKtGsg3/deK0fh6XVsKqjTe0W51MdbXq8Lc39VoPm4P KW4YJVMgavRipBXOfVzs2mE1ikxF8MwhCNRfLO3c/DBd6924/X774A== =wOak -----END PGP SIGNATURE-----
driver = mysql
password_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, u.heslo AS password, CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS userdb_home, 111 AS userdb_uid, 114 AS userdb_gid, u.quota AS userdb_quota_rule, 'Trash:ignore' AS userdb_quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
user_query = SELECT CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS home, 111 AS uid, 114 AS gid, u.quota AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
a) i think not necessary because of b)
b) yes password_query and user_query always returns rewrited domain (returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
What's your /etc/dovecot/dovecot-sql.conf.**ext ?
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFPRF3r2wJMiz2NAQKydg**f9GRWttd8azegc0CelpofrFZotbCXZ**a4r9 5PqkKShwNWMB0qj+**maVo9Wm4wTkIEAKAqC2oExkNDNkErw**UVaBGQClx6TcQmDum2 PcjEsFMEK2nsmlhv3HvfcIhMvKexge**sPefWvLf+RsfUT1/**ClOgdgaNTGxYIfGelp 5s/**Z9DzH65U65ngWYyCmydHkRoAkUf+**tMqw874hgGkAgaY9ZYApDx9yGmpQkm**J1t Q0VWGCnCa8V5h3pHigucWlKtGsg3/**deK0fh6XVsKqjTe0W51MdbXq8Lc39V**oPm4P KW4YJVMgavRipBXOfVzs2mE1ikxF8M**whCNRfLO3c/DBd6924/X774A== =wOak -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
Date: Tue, 24 Sep 2013 10:42:41 +0200 From: Lampa <lampacz+dovecot@gmail.com> To: dovecot@dovecot.org Subject: Re: [Dovecot] Fwd: lmtp
driver = mysql
password_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, u.heslo AS password, CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS userdb_home, 111 AS userdb_uid, 114 AS userdb_gid, u.quota AS userdb_quota_rule, 'Trash:ignore' AS userdb_quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
user_query = SELECT CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS home, 111 AS uid, 114 AS gid, u.quota AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
Dunno, if that applies in your situation, but the user_query does not return "user", hence, "doveadm user -u <user@domain2.com>" should return domain2.com as domain. If this applies to LMTP as well, you could try, because there will be no password query before to fill the prefetch userdb.
user_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, ... as above
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
a) i think not necessary because of b)
b) yes password_query and user_query always returns rewrited domain (returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
What's your /etc/dovecot/dovecot-sql.conf.**ext ?
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFPRF3r2wJMiz2NAQKydg**f9GRWttd8azegc0CelpofrFZotbCXZ**a4r9 5PqkKShwNWMB0qj+**maVo9Wm4wTkIEAKAqC2oExkNDNkErw**UVaBGQClx6TcQmDum2 PcjEsFMEK2nsmlhv3HvfcIhMvKexge**sPefWvLf+RsfUT1/**ClOgdgaNTGxYIfGelp 5s/**Z9DzH65U65ngWYyCmydHkRoAkUf+**tMqw874hgGkAgaY9ZYApDx9yGmpQkm**J1t Q0VWGCnCa8V5h3pHigucWlKtGsg3/**deK0fh6XVsKqjTe0W51MdbXq8Lc39V**oPm4P KW4YJVMgavRipBXOfVzs2mE1ikxF8M**whCNRfLO3c/DBd6924/X774A== =wOak -----END PGP SIGNATURE-----
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFTK13r2wJMiz2NAQK0+gf/YGFvZQNrZGCKEwU+jRjyXtBeQRBD/AHB JgP2TD0hPnqWdR10ad5BJI++oMmLMm9sDOzgBiTmDw1NgYGomVLcXslgkkxLgKHw 5IJw3Pa28HwdKa6SWAScAbvPffLipOPNjzR5c/h5VtakImR8I0V2jAqg7uBuiSlO LFQSeYIiyNheLZ+vtl1GDV3XPbzRoxNezuQwwYELuGmvAijA/2ZUng52Z055+Pm1 LQlYWSXw3WZZjxmNRriAcBDNd7tok6iBJO4RMdcDcPriRm4ojl9y4kc6vHYGjSTr BFg/d5qxamwSPa6gra03b02BZ/hMPBRfmlDekmomWuru0sC2ZUr+xg== =Q8vZ -----END PGP SIGNATURE-----
Hello,
is thought that home is enough to delivery for LDA/LMTP. On old version was using LDA and works ok.
Added user to user_query and we will see if helps.
BTW doveadm user -u <user@domain2.com> is right command ?
doveadm user -u <user@domain2.com>: -bash: syntax error near unexpected token `newline'
doveadm user -u user@domain2.com user: invalid option -- 'u' doveadm user [-a <userdb socket path>] [-x <auth info>] [-f field] [-m] <user mask> [...]
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
Date: Tue, 24 Sep 2013 10:42:41 +0200
From: Lampa <lampacz+dovecot@gmail.com> To: dovecot@dovecot.org Subject: Re: [Dovecot] Fwd: lmtp
driver = mysql
password_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, u.heslo AS password, CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS userdb_home, 111 AS userdb_uid, 114 AS userdb_gid, u.quota AS userdb_quota_rule, 'Trash:ignore' AS userdb_quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
user_query = SELECT CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS home, 111 AS uid, 114 AS gid, u.quota AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
Dunno, if that applies in your situation, but the user_query does not return "user", hence, "doveadm user -u <user@domain2.com>" should return domain2.com as domain. If this applies to LMTP as well, you could try, because there will be no password query before to fill the prefetch userdb.
user_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, ... as above
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de**>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
a) i think not necessary because of b)
b) yes password_query and user_query always returns rewrited domain (returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
What's your /etc/dovecot/dovecot-sql.conf.****ext ?
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFPRF3r2wJMiz2NAQKydg******f9GRWttd8azegc0CelpofrFZotbCXZ** **a4r9 5PqkKShwNWMB0qj+****maVo9Wm4wTkIEAKAqC2oExkNDNkErw****UVaBGQClx6TcQmDum2 PcjEsFMEK2nsmlhv3HvfcIhMvKexge****sPefWvLf+RsfUT1/****ClOgdgaNTGxYIfGelp 5s/****Z9DzH65U65ngWYyCmydHkRoAkUf+****tMqw874hgGkAgaY9ZYApDx9yGmpQkm** **J1t Q0VWGCnCa8V5h3pHigucWlKtGsg3/******deK0fh6XVsKqjTe0W51MdbXq8Lc39V** **oPm4P KW4YJVMgavRipBXOfVzs2mE1ikxF8M****whCNRfLO3c/DBd6924/X774A== =wOak -----END PGP SIGNATURE-----
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFTK13r2wJMiz2NAQK0+**gf/YGFvZQNrZGCKEwU+**jRjyXtBeQRBD/AHB JgP2TD0hPnqWdR10ad5BJI++**oMmLMm9sDOzgBiTmDw1NgYGomVLcXs**lgkkxLgKHw 5IJw3Pa28HwdKa6SWAScAbvPffLipO**PNjzR5c/**h5VtakImR8I0V2jAqg7uBuiSlO LFQSeYIiyNheLZ+**vtl1GDV3XPbzRoxNezuQwwYELuGmvA**ijA/2ZUng52Z055+Pm1 LQlYWSXw3WZZjxmNRriAcBDNd7tok6**iBJO4RMdcDcPriRm4ojl9y4kc6vHYG**jSTr BFg/d5qxamwSPa6gra03b02BZ/**hMPBRfmlDekmomWuru0sC2ZUr+xg== =Q8vZ -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
is thought that home is enough to delivery for LDA/LMTP. On old version was using LDA and works ok.
You use:
mail_location = maildir:/home/mail/%d/%n/Maildir
and return no mail field in the SQL query. Therefore you depend on a correctly set "%d".
Added user to user_query and we will see if helps.
So, you could also return "mail" :-)
BTW doveadm user -u <user@domain2.com> is right command ?
doveadm user -u <user@domain2.com>: -bash: syntax error near unexpected token `newline'
Well, the angle brackets are usually placeholder markers, such as <auth info> below, but
doveadm user -u user@domain2.com user: invalid option -- 'u' doveadm user [-a <userdb socket path>] [-x <auth info>] [-f field] [-m] <user mask> [...]
you are right, -u is not correct with this particular command, hence:
doveadm user -u user@domain2.com
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
Date: Tue, 24 Sep 2013 10:42:41 +0200
From: Lampa <lampacz+dovecot@gmail.com> To: dovecot@dovecot.org Subject: Re: [Dovecot] Fwd: lmtp
driver = mysql
password_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, u.heslo AS password, CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS userdb_home, 111 AS userdb_uid, 114 AS userdb_gid, u.quota AS userdb_quota_rule, 'Trash:ignore' AS userdb_quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
user_query = SELECT CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS home, 111 AS uid, 114 AS gid, u.quota AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
Dunno, if that applies in your situation, but the user_query does not return "user", hence, "doveadm user -u <user@domain2.com>" should return domain2.com as domain. If this applies to LMTP as well, you could try, because there will be no password query before to fill the prefetch userdb.
user_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, ... as above
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de**>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
a) i think not necessary because of b)
b) yes password_query and user_query always returns rewrited domain (returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
What's your /etc/dovecot/dovecot-sql.conf.****ext ?
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFPRF3r2wJMiz2NAQKydg******f9GRWttd8azegc0CelpofrFZotbCXZ** **a4r9 5PqkKShwNWMB0qj+****maVo9Wm4wTkIEAKAqC2oExkNDNkErw****UVaBGQClx6TcQmDum2 PcjEsFMEK2nsmlhv3HvfcIhMvKexge****sPefWvLf+RsfUT1/****ClOgdgaNTGxYIfGelp 5s/****Z9DzH65U65ngWYyCmydHkRoAkUf+****tMqw874hgGkAgaY9ZYApDx9yGmpQkm** **J1t Q0VWGCnCa8V5h3pHigucWlKtGsg3/******deK0fh6XVsKqjTe0W51MdbXq8Lc39V** **oPm4P KW4YJVMgavRipBXOfVzs2mE1ikxF8M****whCNRfLO3c/DBd6924/X774A== =wOak -----END PGP SIGNATURE-----
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFTK13r2wJMiz2NAQK0+**gf/YGFvZQNrZGCKEwU+**jRjyXtBeQRBD/AHB JgP2TD0hPnqWdR10ad5BJI++**oMmLMm9sDOzgBiTmDw1NgYGomVLcXs**lgkkxLgKHw 5IJw3Pa28HwdKa6SWAScAbvPffLipO**PNjzR5c/**h5VtakImR8I0V2jAqg7uBuiSlO LFQSeYIiyNheLZ+**vtl1GDV3XPbzRoxNezuQwwYELuGmvA**ijA/2ZUng52Z055+Pm1 LQlYWSXw3WZZjxmNRriAcBDNd7tok6**iBJO4RMdcDcPriRm4ojl9y4kc6vHYG**jSTr BFg/d5qxamwSPa6gra03b02BZ/**hMPBRfmlDekmomWuru0sC2ZUr+xg== =Q8vZ -----END PGP SIGNATURE-----
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkF/kl3r2wJMiz2NAQLQYgf/XjwEk6K/FicasCcbIISenK1bsTYRmkkZ ckF3ZR7kr+VZXsdWKFWdrEq+cuIkZpti054I+hRQOwp3vBPWyERvio/2mTUhRl67 RBDwd3vSnn3v4qWDc6q5RvWG3sw+nPKk0Xh+gsyYZ7I24DfXG4jOlxhUn4bw72pA ArrHgdxiEwBHmBL8q8jncZr9dMjZ9LPPh6tIb3zCxHlX/I5lMzwE3CG2G7lDRFWI Rz6i6oUlzSeuoG/ui7YxzGxXtxmjGns+2+3Aiwf8hcvgLmXbg3q09nngE2POoAaf fCOELv/pBBhBIZk2vZcWknttzzKgCQBwIRZkgPs1RROMeGG76HghCA== =IyiP -----END PGP SIGNATURE-----
After home to user and password query, log contains weird messages
2013-09-24T14:15:38.704140+02:00 server dovecot: imap(user@domain.com): Error: stat(/home/mail/domain.com/user/.dovecot.lda-dupes/tmp) failed: Not a directory 2013-09-24T14:15:38.724371+02:00 server dovecot: imap(user@domain.com): Error: stat(/home/mail/domain.com/user/.dovecot.svbin/tmp) failed: Not a directory
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
is thought that home is enough to delivery for LDA/LMTP. On old version
was using LDA and works ok.
You use:
mail_location = maildir:/home/mail/%d/%n/**Maildir
and return no mail field in the SQL query. Therefore you depend on a correctly set "%d".
Added user to user_query and we will see if helps.
So, you could also return "mail" :-)
BTW doveadm user -u <user@domain2.com> is right command ?
doveadm user -u <user@domain2.com>: -bash: syntax error near unexpected token `newline'
Well, the angle brackets are usually placeholder markers, such as <auth info> below, but
doveadm user -u user@domain2.com
user: invalid option -- 'u' doveadm user [-a <userdb socket path>] [-x <auth info>] [-f field] [-m] <user mask> [...]
you are right, -u is not correct with this particular command, hence:
doveadm user -u user@domain2.com
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de**>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
Date: Tue, 24 Sep 2013 10:42:41 +0200
From: Lampa <lampacz+dovecot@gmail.com> To: dovecot@dovecot.org Subject: Re: [Dovecot] Fwd: lmtp
driver = mysql
password_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, u.heslo AS password, CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS userdb_home, 111 AS userdb_uid, 114 AS userdb_gid, u.quota AS userdb_quota_rule, 'Trash:ignore' AS userdb_quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2
0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
user_query = SELECT CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS home, 111 AS uid, 114 AS gid, u.quota AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
Dunno, if that applies in your situation, but the user_query does not return "user", hence, "doveadm user -u <user@domain2.com>" should return domain2.com as domain. If this applies to LMTP as well, you could try, because there will be no password query before to fill the prefetch userdb.
user_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, ... as above
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de****>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
a) i think not necessary because of b)
b) yes password_query and user_query always returns rewrited domain
(returns main domain, not aliased domain)
configs: http://pastebin.com/PuZZZ5Pg http://pastebin.com/eJrp769z
What's your /etc/dovecot/dovecot-sql.conf.******ext ?
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFPRF3r2wJMiz2NAQKydg**********f9GRWttd8azegc0CelpofrFZotbCXZ
**a4r9 5PqkKShwNWMB0qj+******maVo9Wm4wTkIEAKAqC2oExkNDNkErw** ****UVaBGQClx6TcQmDum2 PcjEsFMEK2nsmlhv3HvfcIhMvKexge******sPefWvLf+RsfUT1/****** ClOgdgaNTGxYIfGelp 5s/******Z9DzH65U65ngWYyCmydHkRoAkUf+******** tMqw874hgGkAgaY9ZYApDx9yGmpQkm**** **J1t Q0VWGCnCa8V5h3pHigucWlKtGsg3/**********deK0fh6XVsKqjTe0W51MdbXq8Lc39V*
**oPm4P KW4YJVMgavRipBXOfVzs2mE1ikxF8M******whCNRfLO3c/DBd6924/X774A== =wOak -----END PGP SIGNATURE-----
- -- Steffen Kaiser
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkFTK13r2wJMiz2NAQK0+****gf/YGFvZQNrZGCKEwU+****jRjyXtBeQRBD/AHB JgP2TD0hPnqWdR10ad5BJI++****oMmLMm9sDOzgBiTmDw1NgYGomVLcXs****lgkkxLgKHw 5IJw3Pa28HwdKa6SWAScAbvPffLipO****PNjzR5c/****h5VtakImR8I0V2jAqg7uBuiSlO LFQSeYIiyNheLZ+****vtl1GDV3XPbzRoxNezuQwwYELuGmvA****ijA/2ZUng52Z055+Pm1 LQlYWSXw3WZZjxmNRriAcBDNd7tok6******iBJO4RMdcDcPriRm4ojl9y4kc6vHYG** **jSTr BFg/d5qxamwSPa6gra03b02BZ/****hMPBRfmlDekmomWuru0sC2ZUr+xg== =Q8vZ -----END PGP SIGNATURE-----
- -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux)
iQEVAwUBUkF/**kl3r2wJMiz2NAQLQYgf/XjwEk6K/**FicasCcbIISenK1bsTYRmkkZ ckF3ZR7kr+VZXsdWKFWdrEq+**cuIkZpti054I+**hRQOwp3vBPWyERvio/2mTUhRl67 RBDwd3vSnn3v4qWDc6q5RvWG3sw+**nPKk0Xh+**gsyYZ7I24DfXG4jOlxhUn4bw72pA ArrHgdxiEwBHmBL8q8jncZr9dMjZ9L**PPh6tIb3zCxHlX/**I5lMzwE3CG2G7lDRFWI Rz6i6oUlzSeuoG/**ui7YxzGxXtxmjGns+2+**3Aiwf8hcvgLmXbg3q09nngE2POoAaf fCOELv/**pBBhBIZk2vZcWknttzzKgCQBwIRZkg**Ps1RROMeGG76HghCA== =IyiP -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Lampa wrote:
After home to user and password query, log contains weird messages
2013-09-24T14:15:38.704140+02:00 server dovecot: imap(user@domain.com): Error: stat(/home/mail/domain.com/user/.dovecot.lda-dupes/tmp) failed: Not a directory 2013-09-24T14:15:38.724371+02:00 server dovecot: imap(user@domain.com): Error: stat(/home/mail/domain.com/user/.dovecot.svbin/tmp) failed: Not a directory
How does your /etc/dovecot/dovecot-sql.conf.ext looks now? Did you changed something else?
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de>
On Tue, 24 Sep 2013, Lampa wrote:
is thought that home is enough to delivery for LDA/LMTP. On old version
was using LDA and works ok.
You use:
mail_location = maildir:/home/mail/%d/%n/**Maildir
and return no mail field in the SQL query. Therefore you depend on a correctly set "%d".
Added user to user_query and we will see if helps.
So, you could also return "mail" :-)
BTW doveadm user -u <user@domain2.com> is right command ?
doveadm user -u <user@domain2.com>: -bash: syntax error near unexpected token `newline'
Well, the angle brackets are usually placeholder markers, such as <auth info> below, but
doveadm user -u user@domain2.com
user: invalid option -- 'u' doveadm user [-a <userdb socket path>] [-x <auth info>] [-f field] [-m] <user mask> [...]
you are right, -u is not correct with this particular command, hence:
doveadm user -u user@domain2.com
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de**>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, 24 Sep 2013, Lampa wrote:
Date: Tue, 24 Sep 2013 10:42:41 +0200
From: Lampa <lampacz+dovecot@gmail.com> To: dovecot@dovecot.org Subject: Re: [Dovecot] Fwd: lmtp
driver = mysql
password_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, u.heslo AS password, CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS userdb_home, 111 AS userdb_uid, 114 AS userdb_gid, u.quota AS userdb_quota_rule, 'Trash:ignore' AS userdb_quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
user_query = SELECT CONCAT('/home/mail/', d.domena, '/', u.uzivatel) AS home, 111 AS uid, 114 AS gid, u.quota AS quota_rule, 'Trash:ignore' AS quota_rule2 FROM uzivatele AS u JOIN domeny AS d ON d.id = u.domeny_id WHERE u.domeny_id = (SELECT a.domeny_id_realna FROM domeny_aliasy AS a JOIN domeny AS d ON d.id = a.domeny_id_alias JOIN domeny AS dd ON dd.id = a.domeny_id_realna WHERE d.domena = '%d' AND d.priznak & 2 = 2 AND d.priznak & 1 = 0 AND dd.priznak & 1 = 0 UNION SELECT id FROM domeny WHERE domena = '%d' AND priznak & 2 = 0 AND priznak & 1 = 0) AND u.uzivatel = '%n' AND u.priznak & 1 = 0
Dunno, if that applies in your situation, but the user_query does not return "user", hence, "doveadm user -u <user@domain2.com>" should return domain2.com as domain. If this applies to LMTP as well, you could try, because there will be no password query before to fill the prefetch userdb.
user_query = SELECT CONCAT(u.uzivatel, '@', d.domena) AS user, ... as above
2013/9/24 Steffen Kaiser <skdovecot@smail.inf.fh-brs.de****>
-----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1 > > On Tue, 24 Sep 2013, Lampa wrote: > > a) i think not necessary because of b) > > b) yes password_query and user_query always returns > rewrited domain >> (returns main domain, not aliased domain) >> >> configs: http://pastebin.com/PuZZZ5Pg >> http://pastebin.com/eJrp769z >> >> >> What's your /etc/dovecot/dovecot-sql.conf.******ext >> ? > > > > > - -- Steffen Kaiser >
Steffen Kaiser
H Bonn-Rhein-Sieg | e-mail: Steffen.Kaiser@H-BRS.DE FB Informatik | Grantham-Allee 20 | phone : +49 2241/865-203 53757 Sankt Augustin | Germany - Deutschland | fax : +49 2241/865-8203
Steffen -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Darwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/
iQEVAwUBUkGQ0F3r2wJMiz2NAQJeTwf7B/gz2z/RQ5i6mk++XRQRy2coOJpU0CUL /sZdV2UxqDZCMoHjjcUCQvCUZVB6TCiOer7nvulAQxsV3cQ9fRvnAHGW8GCqrNUr GQ5FyGqBhrt3LdPD8fhMpFoUKo1Yi4pOzFOG3VXy9+oo5YAbM+ad71kwtqetV0CK CP28/JEveWjhWW0dAAB0giOzyujINu5hrWUvWpikCbInQ+sqpD3CJwajh9Tq6gh2 9C/F1cqHgUsTeCqOTsfGTEJfXTVtQgqlInXn9ljwdmPTeiqWp3BXKph+XINYZSMK 6KgK7WexdeNM48qx0EWry9VAHY4aL8jA6IQciIkJCO546NsYTWkjLQ== =1jE2 -----END PGP SIGNATURE-----
participants (3)
-
Lampa
-
Steffen
-
Steffen Kaiser