You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Amish <am...@yahoo.com> on 2014/02/23 15:07:14 UTC

spamd weird logging to /var/log/messages

Hello,

I have recently upgraded to SpamAssassin v 3.4.0. (on Fedora 16 64bit)


Everything works fine but after upgrade I have started to see double logging.

1) normal logging to /var/log/maillog in proper format

2) same lines repeated in /var/log/messages BUT in weird fashion

In previous version logs did not appear in /var/log/messages.

I have not changed anything from previous version. Same configuration.


Spamd is started with these options (via systemctl)

SPAMDOPTIONS="-m 15 -x '--virtual-config-dir=/var/spool/spamassassin/%u' -u mailnull -H"



Example lines in /var/log/messages: (when spamd starts)


Feb 23 19:05:55 localhost spamd[27768]: Feb 23 19:05:55.229 [27768] info: spamd: server pid: 27768
Feb 23 19:05:55 localhost spamd[27768]: Feb 23 19:05:55.230 [27768] info: spamd: server successfully spawned child process, pid 27771
Feb 23 19:05:55 localhost spamd[27768]: Feb 23 19:05:55.232 [27768] info: spamd: server successfully spawned child process, pid 27772
Feb 23 19:05:55 localhost spamd[27768]: Feb 23 19:05:55.233 [27768] info: prefork: child states: IS
Feb 23 19:05:55 localhost spamd[27768]: Feb 23 19:05:55.234 [27768] info: prefork: child states: II


When mail is scanned for spam, it logs these: (in /var/log/messages)


Feb 23 19:07:30 localhost spamd[27768]: Feb 23 19:07:30.436 [27768] info: prefork: child states: II
Feb 23 19:07:30 localhost spamd[27768]: Feb 23 19:07:30.466 [27771] info: spamd: connection from localhost [::1]:59659 to port 783, fd 6
Feb 23 19:07:30 localhost spamd[27768]: Feb 23 19:07:30.467 [27771] info: spamd: using default config for incoming: /var/spool/spamassassin/incoming/user_prefs
Feb 23 19:07:30 localhost spamd[27768]: Feb 23 19:07:30.472 [27771] info: spamd: checking message <20...@xxx.com> for incoming:47
Feb 23 19:07:31 localhost spamd[27768]: Feb 23 19:07:31.700 [27771] info: spamd: clean message (1.1/5.0) for incoming:47 in 1.2 seconds, 7449 bytes.
Feb 23 19:07:31 localhost spamd[27768]: Feb 23 19:07:31.700 [27771] info: spamd: result: . 1 - HTML_MESSAGE,MIME_HTML_ONLY scantime=1.2,size=7449,user=incoming,uid=47,required_score=5.0,rhost=localhost,raddr=::1,rport=59659,mid=<20...@xxx.com>,autolearn=no autolearn_force=no



As it can be seen timestamps come twice (second time with miliseconds)
plus it also prints loglevel i.e. info


I have not changed anything in rsyslog.conf either. Lines are:


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

Any idea what is going on here? How to stop this?


Thanks in advance

Amish

Re: spamd weird logging to /var/log/messages

Posted by Martin Gregorie <ma...@gregorie.org>.
On Mon, 2014-02-24 at 19:44 +0800, Amish wrote:
> Version 3.4.0 is in rawhide. So you would not get
> the update unless its pushed to F20.
> 
OK. Thanks for the info.

Martin






Re: spamd weird logging to /var/log/messages

Posted by Amish <am...@yahoo.com>.
----- Original Message -----

From: Martin Gregorie <ma...@gregorie.org>


> On Mon, 2014-02-24 at 14:17 +0800, Amish wrote:
>> This was due to recent changes in Fedora service file.
>> It removed -d (daemonize) option from SPAMDOPTIONS
...
>> Adding -d option (i.e. reverting the change) fixes the problem.
 

> When did this change happen?


Version 3.4.0 is in rawhide. So you would not get
the update unless its pushed to F20.

I manually did rpmbuild using rawhide source.

Here is the commit which removed -d option
http://pkgs.fedoraproject.org/cgit/spamassassin.git/commit/?id=0ad081dcb5e476420e7e34e1d1887303f7009b5f



> Have you registered this in the Fedora bugzilla?

Yes I have added comment and partial revert fix
to related bug report.

https://bugzilla.redhat.com/show_bug.cgi?id=1065762

Lets see if its accepted.

Amish


Re: spamd weird logging to /var/log/messages

Posted by Martin Gregorie <ma...@gregorie.org>.
On Mon, 2014-02-24 at 14:17 +0800, Amish wrote:
> This was due to recent changes in Fedora service file.
> It removed -d (daemonize) option from SPAMDOPTIONS
> 
> Spamassassin without -d option enables stderr logging.
> (in addition to syslog logging)
> 
> This logs were redirected to syslog by systemctl.
> 
> Adding -d option (i.e. reverting the change) fixes the problem.
> 
When did this change happen?

I'm running Fedora 20. My last yum upgrade was on Saturday 22nd with the
previous upgrade a week earlier, but my system is still running SA
3.3.2, /etc/init.d/spamassassin is dated 07Jun2011 and has the -d option
set. Could the change you saw have been backed out before I did my last
upgrade?

Have you registered this in the Fedora bugzilla?

Martin





Re: spamd weird logging to /var/log/messages

Posted by Amish <am...@yahoo.com>.

Ok found a solution.

This was due to recent changes in Fedora service file.

It removed -d (daemonize) option from SPAMDOPTIONS

Spamassassin without -d option enables stderr logging.
(in addition to syslog logging)

This logs were redirected to syslog by systemctl.

Adding -d option (i.e. reverting the change) fixes the problem.

Amish


Original message:
From: Amish <am...@yahoo.com>

Hello,

I have recently upgraded to SpamAssassin v 3.4.0. (on Fedora 16 64bit)

Everything works fine but after upgrade I have started to see double logging.

1) normal logging to /var/log/maillog in proper format
2) same lines repeated in /var/log/messages BUT in weird fashion

Re: spamd weird logging to /var/log/messages

Posted by John Hardin <jh...@impsec.org>.
On Mon, 24 Feb 2014, Matus UHLAR - fantomas wrote:

>> On Sun, 23 Feb 2014, Amish wrote:
>> > *.info;mail.none;authpriv.none;cron.none                /var/log/messages
>> > mail.*                                                  -/var/log/maillog
>> > 
>> > Any idea what is going on here? How to stop this?
>
> On 23.02.14 18:03, John Hardin wrote:
>> Try reversing the order of those lines. I expect *.info appearing prior to 
>> mail.* is capturing mail.info
>
> No, this is not how syslog works. It logs to ANY destination that matches the
> facility and level.

OK. It's been ages since I've fiddled with syslog conf.

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
  634 days since the first successful private support mission to ISS (SpaceX)

Re: spamd weird logging to /var/log/messages

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
>On Sun, 23 Feb 2014, Amish wrote:
>>*.info;mail.none;authpriv.none;cron.none                /var/log/messages
>>mail.*                                                  -/var/log/maillog
>>
>>Any idea what is going on here? How to stop this?

On 23.02.14 18:03, John Hardin wrote:
>Try reversing the order of those lines. I expect *.info appearing 
>prior to mail.* is capturing mail.info

No, this is not how syslog works. It logs to ANY destination that matches the
facility and level. Also, "notify" matches any level notify ang hghet

...therefore "debug" matches any level, because it's the lowest level
possible. Facility "*" has logic, but level "*" has the same meaning as
"debug".

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
"The box said 'Requires Windows 95 or better', so I bought a Macintosh".

Re: spamd weird logging to /var/log/messages

Posted by John Hardin <jh...@impsec.org>.
On Sun, 23 Feb 2014, Amish wrote:

> *.info;mail.none;authpriv.none;cron.none                /var/log/messages
> mail.*                                                  -/var/log/maillog
>
> Any idea what is going on here? How to stop this?

Try reversing the order of those lines. I expect *.info appearing prior to 
mail.* is capturing mail.info

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   You are in a maze of twisty little protocols,
   all written by Microsoft.
----------------------------------------------------------------------
  633 days since the first successful private support mission to ISS (SpaceX)