[Dovecot] How to troubleshoot LDA or LMTP?

John Williams john.williams at otago.ac.nz
Mon Aug 5 12:28:14 EEST 2013


Please forgive me if these are silly questions.  I am a normal user, not
a system administrator.  I am using Dovecot as a kind of IMAP caching
proxy, i.e. reading IMAP mail via Gnus + Dovecot + Offlineimap.  I am
trying to enable sieve functionality.

*Desired behaviour* When Gnus (or whatever MUA) asks for new mail from
 Dovecot, that before Dovecot returns and answer, the sieve rules are
 executed. Please tell me if I completely misunderstand how the mail
 system works in this instance.

*Actual behaviour*  As far as I can tell, not only are the sieve rules
 not executed, but also neither LDA or LMTP is invoked.

*What works* Running the scripts manually via `sieve-filter` works
 fine.  The next time I read from my local dovecot server the mail is
 all in the desired place.

 Also, the LMTP service is running, listening on port 24.

*What doesn't work*  I thought the next step would be to execute
 dovecot-lda manually (as is suggested on the wiki and in numerous
 newsgroup posts), but I can't figure out how to do this. When I execute
 it as root and provide my non-root username via the -u option, it
 hangs.  I can see that it spawns a child process that executes as the
 non-root user (specified with the -u option).  So, could someone tell
 how to execute dovecot-lda manually please?

 Also, when does LMTP process messages?  When sending mail via SMTP, or
 when reading mail via IMAP?  I would prefer to use LMTP rather than
 LDA.


*My environment* Fedora 19 & sendmail.  Is any other information
 relevant, apart from the dovecot configuration?

Thank you,

John

.2.4: /etc/dovecot/dovecot.conf
# OS: Linux 3.10.4-300.fc19.x86_64 x86_64 Fedora release 19 (Schrödinger’s Cat) 
auth_socket_path = /var/run/dovecot/auth-userdb
debug_log_path = /var/log/dovecot-debug.log
disable_plaintext_auth = no
hostname = falcon.novoalexandrovsk.ru
info_log_path = /var/log/dovecot-info.log
lda_mailbox_autocreate = yes
lda_mailbox_autosubscribe = yes
login_greeting = Dovecot ready, folks!
mail_access_groups = mail
mail_debug = yes
mail_location = mbox:~/mail/mailboxes:DIRNAME=mBoX-MeSsAgEs:INDEX=~/mail/index:CONTROL=~/mail/control:INBOX=/var/spool/mail/%u
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
mbox_write_locks = fcntl
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 = 
}
passdb {
  driver = pam
}
plugin {
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/sieve
  sieve_global_dir = /var/lib/dovecot/sieve/global/
  sieve_global_path = /var/lib/dovecot/sieve/default.sieve
}
postmaster_address = johnfrombluff at gmail.com
protocols = imap lmtp sieve
service auth {
  unix_listener auth-userdb {
    mode = 0600
    user = mail
  }
}
service lmtp {
  executable = lmtp -L
  inet_listener lmtp {
    address = 192.168.0.101 127.0.0.1 ::1
    port = 24
  }
  user = mail
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
  process_min_avail = 1
  service_count = 1
  vsz_limit = 64 M
}
service managesieve {
  process_limit = 10
}
ssl = required
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem
ssl_key = </etc/pki/dovecot/private/dovecot.pem
userdb {
  driver = passwd
}
protocol lmtp {
  info_log_path = /var/log/dovecot-lmtp-info.log
  log_path = /var/log/dovecot-lmtp-debug.log
  mail_plugins = " sieve"
}
protocol lda {
  info_log_path = /var/log/dovecot-lda-info.log
  log_path = /var/log/dovecot-lda-errors.log
  mail_plugins = " sieve"
}
protocol sieve {
  mail_max_userip_connections = 10
  managesieve_implementation_string = Dovecot Pigeonhole, Asshole!
  managesieve_logout_format = bytes=%i/%o
  managesieve_max_compile_errors = 5
  managesieve_max_line_length = 65536
}




More information about the dovecot mailing list