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 at 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 = </etc/dovecot/xxx.com.pem ssl_key = </etc/dovecot/private/xxx.private.pem ssl_key_password = yyyyyyy userdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } verbose_ssl = yes protocol lmtp { mail_plugins = acl sieve } protocol imap { mail_plugins = acl imap_acl } The error I?m getting is that LMTP can?t deliver to office3 at 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 at 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 at 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 at xxx.com#011service=lmtp Mar 9 19:50:44 mail dovecot: auth: Debug: ldap(office3 at 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 at xxx.com): no fields returned by the server Mar 9 19:50:44 mail dovecot: auth: ldap(office3 at 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 at 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 at xxx.com): no fields returned by the server > Mar 9 19:50:44 mail dovecot: auth: ldap(office3 at 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
Marti Markov wrote:> Hi all, > > This is the first time I use the dovecot mail list so I???m sorry if I > forget something.You could also use deliver: /usr/lib/dovecot/dovecot-lda -d mailadmin -m PublicFolder/test
Hey, I actually went with the method suggested by Steffen Kaiser of creating a separate userdb because I use LDAP and I have an OU which contains all the public mailboxes and was just easier. I setup the userdb like so: userdb { args = /etc/dovecot/dovecot-ldap-shared_mailboxes.conf.ext driver = ldap override_fields = mail=maildir:/home/vmail/Public/.%n } Now when I send an email to office3 at xxx.com I don?t get any errors and it delivers the message to the office3 at xxx.com: root at mail:~# ls /home/vmail/Public/.office3/new/ 1458427035.M781836P21781.mail.xxx.com,S=2571,W=2630 1458427705.M750112P23338.mail.xxx.com,S=2501,W=2559 But from any mail client I try I don?t seem to be able to list anything in the Public directory. Am I missing something in the configuration? Here is the public namespace configuration: namespace { list = yes location = maildir:/home/vmail/Public:INDEXPVT=~/Maildir/Public prefix = Public/ separator = / subscriptions = yes type = public }> On 17 Mar 2016, at 08:35, Burckhard Schmidt <bschmidt at cms.hu-berlin.de> wrote: > > hello Marti, > > Am 17.03.2016 um 06:18 schrieb Marti Markov: >> First of all thanks for the reply Burckhard. >> When you say: >>> You can use a "normal" user who has a sieve script: > > Normal user that's an account with one or more email aliasses. > So this "user" can receive emails like any other user. This I called "normal" user. But this ist not of interest in our case. > So you don't get an "user not found". > > Next you will add an appropriate email alias to the account if necessary (our accounts are cryptic). > > Now you have an account/user and you can write a sieve script for that user to deliver all emails into one public folder or into different folders. Public subfolders are possible too, if you like or are able to distinguish incomming emails. > > In your case it is not necessary to have an user/account "office3". This name you would only use in that sieve script with "fileinto". > > Regards! > > Burckhard > >> what would that user be in my case? office3? Because I don?t really see how it will solve the problem of getting the error 550 user not found when making the LDAP search. >> >>> On 10 Mar 2016, at 08:50, Burckhard Schmidt <bschmidt at cms.hu-berlin.de> wrote: >>> >>> 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 >> > > > -- > Mit freundlichen Gr??en --- Burckhard Schmidt > > Abteilung Systemsoftware und Kommunikation > ZE Computer- und Medienservice der Humboldt-Universit?t zu Berlin > Postanschrift: Unter den Linden 6, 10099 Berlin > Standort: Rudower Chaussee 26; 12489 Berlin > Tel.: +49-30-2093-70058 Fax: +49-30-2093-70199 > Mail: bschmidt at cms.hu-berlin.de <mailto:bschmidt at cms.hu-berlin.de>