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 = postmas...@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 offi...@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-1c2aac90b...@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-1c2aac90b...@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#011offi...@xxx.com#011service=lmtp
Mar  9 19:50:44 mail dovecot: auth: Debug: ldap(offi...@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(offi...@xxx.com): no fields 
returned by the server
Mar  9 19:50:44 mail dovecot: auth: ldap(offi...@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.

Reply via email to