[Dovecot] Sieve, and logging.

Scott Sharkey ssharkey at linuxunlimited.com
Mon Sep 8 17:54:04 EEST 2008


Hi All,

Relatively new to Dovecot - converting from courier-imap.  So far, I've 
got it working with virtual users (postfixadmin tables), and it seems to 
be working.  I'm trying to get sieve working.  It's not, so I tried 
turning up the logging, and putting it into a separate log file to get 
it out of the syslog for now.  I can get the main dovecot to log, but
I cannot get any log out of dovecot-deliver.  I am thinking of replacing
the dovecot-deliver with a shell script to see if it's even being called.


Suggestions welcome!

-Scott

Logs and other relevant info follows:

.# 1.1.2: /etc/dovecot/dovecot.conf
log_path: /var/log/dovecot.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps pop3s managesieve
ssl_ca_file: /etc/ssl/certs/ca.crt
ssl_cert_file: /etc/ssl/certs/mail.linuxunlimited.com.crt
ssl_key_file: /etc/ssl/private/mail.linuxunlimited.com.key
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
login_greeting_capability(default): yes
login_greeting_capability(imap): yes
login_greeting_capability(pop3): no
login_greeting_capability(managesieve): no
first_valid_uid: 2000
mail_privileged_group: mail
mail_location: maildir:/home/virtual/%d/%n/Maildir
mail_debug: yes
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
imap_client_workarounds(default): outlook-idle tb-extra-mailbox-sep
imap_client_workarounds(imap): outlook-idle tb-extra-mailbox-sep
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls
pop3_client_workarounds(managesieve):
sieve_storage(default):
sieve_storage(imap):
sieve_storage(pop3):
sieve_storage(managesieve): /home/virtual/%d/%n/sieve
sieve(default):
sieve(imap):
sieve(pop3):
sieve(managesieve): ~/.dovecot.sieve
auth default:
   mechanisms: plain login
   user: nobody
   passdb:
     driver: pam
   passdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   userdb:
     driver: passwd
   userdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   socket:
     type: listen
     client:
       path: /var/spool/postfix/private/auth
       mode: 432
       user: postfix
       group: postfix
     master:
       path: /var/run/dovecot/auth-master
       mode: 432
       user: vmail
       group: vmail
plugin:
   sieve: /home/virtual/%d/%n/sieve

------------------------------------------------------------------------
# 1.1.2: /etc/dovecot/dovecot-sql.conf
driver = mysql
connect = host=127.0.0.1 dbname=mail user=postfixadmin password=xxxxxxxx
default_pass_scheme = MD5-CRYPT
password_query = SELECT password FROM mailbox WHERE username = '%u' AND 
active = 1
user_query = SELECT maildir, 2000 AS uid, 2000 AS gid FROM mailbox WHERE 
username = '%u' AND active = 1

------------------------------------------------------------------------
Directories:

/home:

-rwxrwxrwx  1 root     root        0 2008-09-07 23:06 dovecot-deliver.log
drwxrwxrwx  2 root     root     4096 2008-09-07 22:41 sieve
drwxrwx---  8 vmail    vmail    4096 2008-08-27 22:26 virtual

/home/sieve:

-rw-r--r-- 1 root root  353 2008-09-07 22:41 global_rules.sieve
-rw-r--r-- 1 root root  388 2008-09-07 23:22 global_rules.sievec

/home/sieve/global_rules.sieve:

require ["fileinto"];
require ["imapflags"];
if header :contains "Subject" "TestSPAM" {
   setflag "\\Seen";
   fileinto "Junk";
   stop;
}


------------------------------------------------------------------------
Section of postfix main.cf

virtual_transport = dovecot

# limit dovecot service to one at a time...
dovecot_destination_recipient_limit = 1

local_transport = virtual
transport_maps = proxy:mysql:/etc/postfix/mysql_transport_map.cf


------------------------------------------------------------------------
Section of postfix master.cf

# Dovecot Local Delivery Agent
dovecot   unix  -       n       n       -       -       pipe
   flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f 
${sender} -d ${recipient}


------------------------------------------------------------------------
dovecot.log

dovecot: 2008-09-07 23:02:49 Info: Dovecot v1.1.2 starting up
dovecot: 2008-09-07 23:02:50 Info: auth-worker(default): mysql: 
Connected to 127.0.0.1 (mail)
dovecot: 2008-09-07 23:03:25 Info: auth-worker(default): mysql: 
Connected to 127.0.0.1 (mail)
dovecot: 2008-09-07 23:03:25 Info: auth-worker(default): mysql: 
Connected to 127.0.0.1 (mail)
dovecot: 2008-09-07 23:03:27 Error: auth-worker(default): 
pam(ssharkey at linuxunlimited.com,24.192.79.39): pam_authenticate() 
failed: User not known to the underlying authentication module
dovecot: 2008-09-07 23:03:27 Info: auth-worker(default): mysql: 
Connected to 127.0.0.1 (mail)


More information about the dovecot mailing list