[Dovecot] Double logging problem

Nikolaos Milas nmilas at admin.noa.gr
Thu Aug 5 17:46:13 EEST 2010


  Hi,

I have a relatively new installation with LDAP and Postfix, running 
smoothly on CentOS but it logs dovecot messages both in 
/var/log/messages and in /var/log/dovecot.log.

I have configured it to log in /var/log/dovecot.log (with 
syslog_facility: local1 and a respective line in syslog.conf, see below) 
but it also logs in /var/log/messages. As a result, I would expect it to 
only log into /var/log/dovecot.log.

Can someone suggest why this happens and help me stop logging dovecot 
messages in /var/log/messages ? Could it be because the following 
directive (in syslog.conf) does not capture dovecot messages to exclude 
them?
     *.info;mail.none;authpriv.none;cron.none                
/var/log/messages

Could I use something like (in syslog.conf):

     *.info;mail.none;authpriv.none;cron.none;dovecot.none 
                /var/log/messages

to capture dovecot messages and *exclude* them from /var/log/messages ? 
I am not sure if syslog understands "dovecot.none". Please explain how 
this could be done.

Here is the configuration (I've changed real domain name with example.com):

# dovecot --version
1.2.11

# dovecot -n

    # 1.2.11: /etc/dovecot.conf
    # OS: Linux 2.6.18-194.3.1.el5.centos.plus x86_64 CentOS release 5.5
    (Final)
    syslog_facility: local1
    ssl_ca_file: /etc/pki/CA/certs/cert-xxx.pem
    ssl_cert_file: /etc/pki/CA/certs/cert-xxx.pem
    ssl_key_file: /etc/pki/CA/private/key-xxx.pem
    login_dir: /var/run/dovecot/login
    login_executable(default): /usr/libexec/dovecot/imap-login
    login_executable(imap): /usr/libexec/dovecot/imap-login
    login_executable(pop3): /usr/libexec/dovecot/pop3-login
    mail_max_userip_connections(default): 10
    mail_max_userip_connections(imap): 10
    mail_max_userip_connections(pop3): 3
    mail_location: maildir:~/Maildir/
    mail_executable(default): /usr/libexec/dovecot/imap
    mail_executable(imap): /usr/libexec/dovecot/imap
    mail_executable(pop3): /usr/libexec/dovecot/pop3
    mail_plugins(default): quota imap_quota
    mail_plugins(imap): quota imap_quota
    mail_plugins(pop3): quota
    mail_plugin_dir(default): /usr/lib64/dovecot/imap
    mail_plugin_dir(imap): /usr/lib64/dovecot/imap
    mail_plugin_dir(pop3): /usr/lib64/dovecot/pop3
    imap_client_workarounds(default): delay-newmail outlook-idle
    netscape-eoh
    imap_client_workarounds(imap): delay-newmail outlook-idle netscape-eoh
    imap_client_workarounds(pop3):
    pop3_client_workarounds(default):
    pop3_client_workarounds(imap):
    pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
    lda:
       postmaster_address: postmaster at example.com
    auth default:
       mechanisms: plain login
       username_format: %Lu
       verbose: yes
       debug: yes
       passdb:
         driver: ldap
         args: /etc/dovecot-ldap.conf
       userdb:
         driver: static
         args: uid=500 gid=500 home=/home/vmail/%u
       socket:
         type: listen
         client:
           path: /var/spool/postfix/private/auth
           mode: 432
           user: postfix
           group: postfix
    plugin:
       quota: maildir:User quota
       quota_rule: *:storage=307200
       quota_warning: storage=75%% /opt/mail.sh 75 %u


# grep -v '^ *\(#.*\)\?$' /etc/dovecot-ldap.conf

    hosts = ldap.example.com
    tls = yes
    base = ou=people, dc=example, dc=com
    scope = subtree
    ldap_version = 3
    auth_bind = yes
    pass_attrs = uid=user,userPassword=password
    auth_bind_userdn = uid=%u,ou=people,dc=example,dc=com
    pass_filter = (uid=%u)

And the content of /etc/syslog.conf

# cat /etc/syslog.conf

    # Log all kernel messages to the console.
    # Logging much else clutters up the screen.
    #kern.*                                                 /dev/console

    # Log anything (except mail) of level info or higher.
    # Don't log private authentication messages!
    *.info;mail.none;authpriv.none;cron.none               
    /var/log/messages

    # The authpriv file has restricted access.
    authpriv.*                                              /var/log/secure

    # Log all the mail messages in one place.
    mail.*                                                 
    -/var/log/maillog


    # Log cron stuff
    cron.*                                                  /var/log/cron

    # Everybody gets emergency messages
    *.emerg                                                 *

    # Save news errors of level crit and higher in a special file.
    uucp,news.crit                                          /var/log/spooler

    # Save boot messages also to boot.log
    local7.*                                               
    /var/log/boot.log

    # Dovecot messages will be using local1
    local1.*                                               
    /var/log/dovecot.log

    #local2.*                                               /var/log/php.log

    local3.*                                               
    /var/log/sympa.log

Thanks,
Nick Milas
Greece

P.S. I sent this message earlier (a few hours ago), but I didn't see it 
coming in the dovecot list, so I've decided to send it again.



More information about the dovecot mailing list