[Dovecot] Sendmail + deliver; silent errors.

Daryl Tester dt-dovecot at handcraftedcomputers.com.au
Fri Mar 19 08:34:13 EET 2010


Hi all.

I've got a bit of a peculiar issue here.  I'm running dovecot 1.2.9 on
an Ubuntu 9.10 box using Sendmail 8.14.3.  I've set up Sendmail similar
to <http://wiki.dovecot.org/LDA/Sendmail> except that 

 *)  dovecot's deliver is configured as my default local mailer, so
some of the flags for the Mailer definition had to be adjusted
accordingly.

 *)  The setuid users listed in the wiki kept result in setgid()
failures from deliver, so I've changed it to root:mail (mail being
sendmail's MDA group), with permissions as u+s,g+rx,o-rwx

When sendmail attempts delivery, I'm getting "deferred: deliver
failed with EX_TEMP", but nothing recorded in the log files.  I've
embarrassingly widened the permissions of /var/log/dovecot and the
files contained within to read/write everyone, just to ensure that
whomever it's running as has access, but the log files aren't updated.

The peculiar thing kicks in when I attempt to debug this.  So far I
have (amongst other things):

 *) Run deliver from the command line logged in as "mail".

 *) written a shell wrapper script to be able to confirm things
like the user ID that was invoking deliver.

 *) both in the shell script, and as an mailer definition in sendmail,
strace'd (using a setuid root binary) deliver to capture what it was
doing.

Whenever I do any of the above, deliver works perfectly, and appears
to log correctly.  It only appears to bork when no-one is watching it,
which is quite frustrating when trying to fix it.

Help?


Configuration of dovecot follows:

# 1.2.9: /etc/opt/dovecot-1.2.9/dovecot.conf
# OS: Linux 2.6.31-14-server x86_64 Ubuntu 9.10 ext3
base_dir: /var/run/dovecot-1.2.9/
log_path: /var/log/dovecot/dovecot.log
info_log_path: /var/log/dovecot/dovecot-info.log
protocols: pop3 imap imaps
ssl: no
disable_plaintext_auth: no
login_dir: /var/run/dovecot-1.2.9//login
login_executable(default): /opt/dovecot-1.2.9/libexec/dovecot/imap-login
login_executable(imap): /opt/dovecot-1.2.9/libexec/dovecot/imap-login
login_executable(pop3): /opt/dovecot-1.2.9/libexec/dovecot/pop3-login
mail_uid: vmail
mail_gid: vmail
mail_location: maildir:/vmail/spool/%u:LAYOUT=fs
mail_executable(default): /opt/dovecot-1.2.9/libexec/dovecot/imap
mail_executable(imap): /opt/dovecot-1.2.9/libexec/dovecot/imap
mail_executable(pop3): /opt/dovecot-1.2.9/libexec/dovecot/pop3
mail_plugin_dir(default): /opt/dovecot-1.2.9/lib/dovecot/imap
mail_plugin_dir(imap): /opt/dovecot-1.2.9/lib/dovecot/imap
mail_plugin_dir(pop3): /opt/dovecot-1.2.9/lib/dovecot/pop3
lda:
  postmaster_address: postmaster at handcraftedcomputers.com.au
  auth_socket_path: /var/run/dovecot-1.2.9/auth-master
auth default:
  verbose: yes
  passdb:
    driver: passwd-file
    args: /vmail/auth/passwd
  userdb:
    driver: static
    args: uid=vmail gid=vmail
  socket:
    type: listen
    master:
      path: /var/run/dovecot-1.2.9/auth-master
      mode: 384
      user: vmail
      group: vmail

-- 
Regards,
  Daryl Tester

Member of the Amalgamated Australian Association Against Apostrophe Abuse.
(formerly the 6A's - no, wait ...).


More information about the dovecot mailing list