Cyrus IMAP syslog issue

Hello,

after installing standard mail server with Yast (Postfix+Cyrus+LDAP) everyphing works OK except just one annoying thing: Cyrus makes a lot of IMAP logs in /var/log/mssages.
Acording to Cyrus IMAP doc : Project Cyrus it makes logs with “local6” syslog facility.
I have tried to add in /etc/rsyslog.conf

if     ($syslogfacility-text == 'local6')   \
then   -/var/log/imap
&       ~

after resstart rcsyslog restart it still adds logs in /var/log/messages instead of /var/log/imap.

please help

I’m no expert but I think you’ve made a few errors,

if ($syslogfacility-text == ‘local6’) \ then -/var/log/imap & ~
~/var/log/imap <— need to use absolute path ~/var/ doesn’t compute.
Likewise "~ "

I think you should have added
local6.debug /var/log/imapd.log

Then create the log file for imapd by typing touch /var/log/imapd.log.

Cyrus IMAP configuration

this is not ~ but - and this is standard rsyslog format. you can see other examples by checking /etc/rsyslog.txt for example for firewall file.

Hello, as it is still not working with syslog facility ‘local6’, finally I did it by analysing $programname:


if      ($programname contains 'imap')  or \
        ($programname contains 'cyrus')  \
then   -/var/log/imap
&       ~

On 2011-04-23 13:06, isemionov wrote:
>
> Hello, as it is still not working with syslog facility ‘local6’,
> finally I did it by analysing $programname:
>
> Code:
> --------------------
>
> if ($programname contains ‘imap’) or
> ($programname contains ‘cyrus’)
> then -/var/log/imap
> & ~
>
> --------------------

Is it not using facility “mail”? All mail related logs go to the mail log.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

hello, in rsyslog.conf there is a configuration by default for mail facility, but unfortunately Cyrus IMAP do not use it…
in /var/log/mail I get postfix,amavis,clamd messages only.

On 2011-04-23 19:36, isemionov wrote:

> hello, in rsyslog.conf there is a configuration by default for mail
> facility, but unfortunately Cyrus IMAP do not use it…
> in /var/log/mail I get postfix,amavis,clamd messages only.

Then cyrus must have a configuration somewhere for how to do the logs. I
don’t use cyrus, but in dovecot there is this:

Code:

Syslog facility to use if you’re logging to syslog. Usually if you don’t

want to use “mail”, you’ll use local0…local7. Also other standard

facilities are supported.

#syslog_facility = mail

Cyrus surely has something similar.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

As I can see, in Cyrus IMAP syslog facility can be indicated only at compiling time and I don’t know what was indicated in standard openSUSE package.
But I have found:


syslog_prefix: <none>
String to be prepended to the process name in syslog entries.

I will try to play with it.

On 2011-04-26 12:36, isemionov wrote:
>
> As I can see, in Cyrus IMAP syslog facility can be indicated only at
> compiling time and I don’t know what was indicated in standard openSUSE
> package.

Ah, curious. It could be found in the spec file, I suppose. I’ve never used
cyrus.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

Hello! Thanks to your advice I have checked package changelog and have found:

  • Adjusted documentation to reflect the correct syslog facility
    that the packages are build with (“daemon” instead of “local6”)

i use now daemon name and it’s working ok, thanks

Almost a year later but just met this problem myself so thanks for your work.

Do not forget to add an imapd log rotate file to /etc/logrotate.d else you will have a monster growing in /var/log.

Thanks, Peter