Setting up public mailboxes - user not found
Hi all,
This is the first time I use the dovecot mail list so I’m sorry if I forget something.
My problem is that for some reason I can get public mailboxes to work. I have setup the directory Public, the folders and the cur,tmp and new folder in them:
Public | |- .office3 | |- cur |- tmp |- new |- dovecot-acl
Here is my dovecot conf:
# 2.2.13: /etc/dovecot/dovecot.conf
# OS: Linux 3.14.32-xxxx-grs-ipv6-64 x86_64
auth_default_realm = xxx.com
auth_mechanisms = plain login
mail_gid = vmail
mail_home = /home/vmail/%d/%n
mail_location = maildir:~/Maildir
mail_plugins = acl
mail_uid = vmail
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date ihave
namespace {
list = yes
location = maildir:/home/vmail/xxx.com/Public:INDEXPVT=~/Maildir/Public
prefix = Public/
separator = /
subscriptions = yes
type = public
}
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
separator = /
type = private
}
passdb {
args = /etc/dovecot/dovecot-ldap.conf.ext
driver = ldap
}
plugin {
acl = vfile
sieve = ~/.dovecot.sieve
sieve_before = /etc/dovecot/sieve/dovecot.sieve
sieve_dir = ~/sieve
}
postmaster_address = postmaster@xxx.com
protocols = " imap lmtp sieve"
service auth {
unix_listener auth-client {
group = Debian-exim
mode = 0660
user = Debian-exim
}
}
service imap-login {
inet_listener imap {
port = 0
}
inet_listener imaps {
port = 993
ssl = yes
}
}
service lmtp {
unix_listener lmtp {
mode = 0666
}
}
ssl = required
ssl_cert =
The error I’m getting is that LMTP can’t deliver to office3@xxx.com because the user could not be found. (I’m using LDAP authentication for the users)
Mar 9 19:50:43 mail spamd[21021]: spamd: connection from localhost.localdomain [127.0.0.1]:56531 to port 783, fd 5 Mar 9 19:50:43 mail spamd[21021]: spamd: setuid to Debian-exim succeeded Mar 9 19:50:43 mail spamd[21021]: spamd: checking message FBFE5FE1-A3C3-4C3D-8BD9-1C2AAC90BE17@xxx.com for Debian-exim:107 Mar 9 19:50:44 mail spamd[21021]: spamd: clean message (-1.1/5.0) for Debian-exim:107 in 0.5 seconds, 1611 bytes. Mar 9 19:50:44 mail spamd[21021]: spamd: result: . -1 - BAYES_00,HTML_MESSAGE,RDNS_NONE,TVD_SPACE_RATIO scantime=0.5,size=1611,user=Debian-exim,uid=107,required_score=5.0,rhost=localhost.localdomain,raddr=127.0.0.1,rport=56531,mid=FBFE5FE1-A3C3-4C3D-8BD9-1C2AAC90BE17@xxx.com,bayes=0.000000,autolearn=no autolearn_force=no Mar 9 19:50:44 mail spamd[9510]: prefork: child states: II Mar 9 19:50:44 mail dovecot: lmtp(14554): Connect from local Mar 9 19:50:44 mail dovecot: auth: Debug: master in: USER#0111#011office3@xxx.com#011service=lmtp Mar 9 19:50:44 mail dovecot: auth: Debug: ldap(office3@xxx.com): user search: base=ou=people,dc=xxx,dc=com scope=subtree filter=(&(objectClass=person)(uid=office3)) fields=(all) Mar 9 19:50:44 mail dovecot: auth: Debug: ldap(office3@xxx.com): no fields returned by the server Mar 9 19:50:44 mail dovecot: auth: ldap(office3@xxx.com): unknown user Mar 9 19:50:44 mail dovecot: auth: Debug: userdb out: NOTFOUND#0111 Mar 9 19:50:44 mail dovecot: lmtp(14554): Disconnect from local: Successful quit
So as I see it LMTP tries to see if the user exists and fails because there is no such user (which is true, the LDAP object office3 has a different base).
I’m not sure but should Dovecot skip this and check the Public folder first before checking LDAP?
Another part of my setup is Exim4.
Here is the transport part: dovecot_lmtp: driver = lmtp socket = /var/run/dovecot/lmtp return_path_add #maximum number of deliveries per batch, default 1 batch_max = 200
And here is the auth part:
dovecot_login: driver = dovecot public_name = LOGIN server_socket = /var/run/dovecot/auth-client # setting server_set_id might break several headers in mails sent by authenticated smtp. So be careful. server_set_id = $auth1 .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS server_advertise_condition = ${if eq{$tls_in_cipher}{}{}{*}} .endif
dovecot_plain: driver = dovecot public_name = PLAIN server_socket = /var/run/dovecot/auth-client server_set_id = $auth1 .ifndef AUTH_SERVER_ALLOW_NOTLS_PASSWORDS server_advertise_condition = ${if eq{$tls_in_cipher}{}{}{*}} .endif
So any tips on how to fix this would be great.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Wed, 9 Mar 2016, Marti Markov wrote:
My problem is that for some reason I can get public mailboxes to work. I have setup the directory Public, the folders and the cur,tmp and new folder in them:
Public | |- .office3 | |- cur |- tmp |- new |- dovecot-acl
Mar 9 19:50:44 mail dovecot: auth: Debug: ldap(office3@xxx.com): user search: base=ou=people,dc=xxx,dc=com scope=subtree filter=(&(objectClass=person)(uid=office3)) fields=(all) Mar 9 19:50:44 mail dovecot: auth: Debug: ldap(office3@xxx.com): no fields returned by the server Mar 9 19:50:44 mail dovecot: auth: ldap(office3@xxx.com): unknown user Mar 9 19:50:44 mail dovecot: auth: Debug: userdb out: NOTFOUND#0111 Mar 9 19:50:44 mail dovecot: lmtp(14554): Disconnect from local: Successful quit
So as I see it LMTP tries to see if the user exists and fails because there is no such user (which is true, the LDAP object office3 has a different base).
I’m not sure but should Dovecot skip this and check the Public folder first before checking LDAP?
Dovecot LDA delivers to users.
So, IMHO, in this situation I would add another userdb{} of type passwd-file, which adds a fake user office3 and uses the Maildir .../Public/.office3 as INBOX. If that fails or turns out to be problematic, setup another complete new user home directory like all others and symlink cur and new to Public/.office3 (and tmp, if they reside on different mount points).
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1
iQEVAwUBVuEiDXz1H7kL/d9rAQLNpgf/f2h7xSzQmB/ywV8NkkTxc9sL7w70EPJK 2fUOcFo4vmW41iJKV38UKflq/SOSn9H1+44pi8kJUFu00g/x8DgV1SJVFF1J0teh r/wnC6Nhdoxhm3owcJ1nbxgQyAj8zCR1rBnkCqglYqZb+1+FbZMGUzAz1Yghfh5M c8dPJg8J8FtSh62OEkS6FXoHQ0LbLvZfluQfV8/0D8lv4ZkcmItnc+Hkd7VjefjX zmf5J5gg97c+NNf3WzIJoutg7ceLcBvIYO+MKow8RXjnlFTvSThKB/dJxaJVx294 Mpuq/rJ0mP60OBtGm59C2DHIqriOuiOjvg9L3a3Mh7sCv7OrbqxYmw== =zRdL -----END PGP SIGNATURE-----
Am 09.03.2016 um 20:02 schrieb Marti Markov:
Hi all,
This is the first time I use the dovecot mail list so I’m sorry if I forget something.
My problem is that for some reason I can get public mailboxes to work. I have setup the directory Public, the folders and the cur,tmp and new folder in them:
Public | |- .office3 | |- cur |- tmp |- new |- dovecot-acl
Here is my dovecot conf:
namespace { list = yes location = maildir:/home/vmail/xxx.com/Public:INDEXPVT=~/Maildir/Public prefix = Public/ separator = / subscriptions = yes type = public }
You can use a "normal" user who has a sieve script: require ... any filter if necessary fileinto "Public"; discard; ...
"Public" is your prefix I have several subfolder so I use: fileinto "Public/subfolder1";
You would have /home/vmail/xxx.com/Public/subfolder1 with cur new tmp and a file "dovecot-acl" containing anyone lrs
-- Burckhard Schmidt
participants (4)
-
Burckhard Schmidt
-
Chris
-
Marti Markov
-
Steffen Kaiser