Unknown euid and egid, wrong mail directory

Michael Agbaglo byteshifter at shifted-bytes.de
Sat Jan 30 22:51:53 EET 2021


Hi!


Trying to set up dovecot for local accounts and virtual users, sending
test mail fails: dovecot sees a permission problem in /home but the mail
should go to /srv/mail/example.net/alice.

"euid=1001(<unknown>) egid=1001(<unknown>)" 1001 doesn't not exist in
/etc/passwd - Where does it come from?


M.


root at broccoli:~# doveconf -n
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.5.7.2 ()
# OS: Linux 5.4.0-65-generic x86_64 Ubuntu 20.04.2 LTS
# Hostname: broccoli.example.net
mail_home = /srv/mail/%d/%n
mail_location = maildir:~/Maildir
mail_privileged_group = mail
namespace {
  list = children
  location = maildir:%%h/Maildir:INDEXPVT=~/Maildir/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
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 {
  driver = pam
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocols = " imap lmtp"
service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0600
    user = postfix
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
ssl = required
ssl_cert = </etc/ssl/certs/ssl-cert-snakeoil.pem
ssl_client_ca_dir = /etc/ssl/certs
ssl_dh = # hidden, use -P to show it
ssl_key = # hidden, use -P to show it
ssl_min_protocol = TLSv1.2
userdb {
  driver = passwd
}
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
userdb {
  args = uid=vmail gid=vmail home=/srv/mail/%d/%n
  driver = static
}
root at broccoli:~# id postfix
uid=116(postfix) gid=124(postfix) groups=124(postfix)
root at broccoli:~# id dovecot
uid=114(dovecot) gid=122(dovecot) groups=122(dovecot)
root at broccoli:~# sendmail alice at example.net < /etc/issue.net
root at broccoli:~# tail /var/log/mail.log
Jan 30 21:31:47 broccoli postfix/pickup[4067]: 22AE117AA82: uid=0
from=<root>
Jan 30 21:31:47 broccoli postfix/cleanup[35091]: 22AE117AA82:
message-id=<20210130203147.22AE117AA82 at broccoli.example.net>
Jan 30 21:31:47 broccoli postfix/qmgr[854]: 22AE117AA82:
from=<root at broccoli.example.net>, size=335, nrcpt=1 (queue active)
Jan 30 21:31:47 broccoli dovecot: lmtp(35094): Connect from local
Jan 30 21:31:47 broccoli dovecot:
lmtp(alice at example.net)<35094><xGMOCjPCFWAWiQAAfCPMuA>: Error:
mkdir(/home/alice/Maildir) failed: Permission denied
(euid=1001(<unknown>) egid=1001(<unknown>) missing +w perm: /home, dir
owned by 0:0 mode=0755)
Jan 30 21:31:47 broccoli dovecot:
lmtp(alice at example.net)<35094><xGMOCjPCFWAWiQAAfCPMuA>: Error:
mkdir(/home/alice/Maildir) failed: Permission denied
(euid=1001(<unknown>) egid=1001(<unknown>) missing +w perm: /home, dir
owned by 0:0 mode=0755)
Jan 30 21:31:47 broccoli dovecot:
lmtp(alice at example.net)<35094><xGMOCjPCFWAWiQAAfCPMuA>: Error:
lmtp-server: conn unix:pid=35093,uid=116 [1]: rcpt alice at example.net:
Mailbox INBOX: Failed to autocreate mailbox: Internal error occurred.
Refer to server log for more information. [2021-01-30 21:31:47]
Jan 30 21:31:47 broccoli dovecot:
lmtp(alice at example.net)<35094><xGMOCjPCFWAWiQAAfCPMuA>:
msgid=<20210130203147.22AE117AA82 at broccoli.example.net>: save failed to
open mailbox INBOX: Mailbox INBOX: Failed to autocreate mailbox:
Internal error occurred. Refer to server log for more information.
[2021-01-30 21:31:47]
Jan 30 21:31:47 broccoli dovecot: lmtp(35094): Disconnect from local:
Client has quit the connection (state=READY)
Jan 30 21:31:47 broccoli postfix/lmtp[35093]: 22AE117AA82:
to=<alice at example.net>,
relay=broccoli.example.net[private/dovecot-lmtp], delay=0.07,
delays=0.04/0.01/0/0.02, dsn=4.2.0, status=deferred (host
broccoli.example.net[private/dovecot-lmtp] said: 451 4.2.0
<alice at example.net> Internal error occurred. Refer to server log for
more information. [2021-01-30 21:31:47] (in reply to end of DATA command))



More information about the dovecot mailing list