I have been experimenting today with the g_spam_cmd today and believe I have found a bug. I had it working properly and then SurgeMail started rejecting messages that should have gone into the friends_pending (Spam) quarantine. As an example, see the logs below.In the first log entry, g_spam_cmd did return a code of 5, so it should have simply been tagged appropriately with the X-SpamCmd header. I have then created rules as per http://netwinsite.com/surgemail/help/spam.htm#external which should place the message into quarantine. Instead, it was simply rejected.You can also see several more rejections where g_spam_cmd returned 0 but SurgeMail still rejected the message citing g_spam_cmd as the reason. SurgeMail appears to have rejected hundreds of messages that should have simply been quarantined.2013-07-25 01:36:39.00:Info:-1439212656: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/33/q69466033.itm) returned code 52013-07-25 01:36:39.00:Info:-1439212656: scmd: Message submitted [69466033] Failed g_spam_cmd score caused rejection (cmd=5 aspam=7.8)2013-07-25 01:38:53.00:Info:-1290781808: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/56/q69466056.itm) returned code 02013-07-25 01:38:53.00:Info:-1290781808: scmd: Message submitted [69466056] Failed g_spam_cmd score caused rejection (cmd=0 aspam=1.8)2013-07-25 01:39:18.00:Info:-1291347056: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/62/q69466062.itm) returned code 02013-07-25 01:39:18..00:Info:-1291347056: scmd: Message submitted [69466062] Failed g_spam_cmd score caused rejection (cmd=0 aspam=4.6)2013-07-25 01:41:20.00:Info:-1291347056: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/74/q69466074.itm) returned code 02013-07-25 01:42:06.00:Info:-1291347056: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/77/q69466077.itm) returned code 02013-07-25 01:42:06.00:Info:-1291347056: scmd: Message submitted [69466077] Failed g_spam_cmd score caused rejection (cmd=0 aspam=5.4)2013-07-25 01:42:44.00:Info:-1290781808: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/82/q69466082.itm) returned code 02013-07-25 01:42:44.00:Info:-1290781808: scmd: Message submitted [69466082] Failed g_spam_cmd score caused rejection (cmd=0 aspam=6.2)2013-07-25 01:42:46.00:Info:-1280271472: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/84/q69466084.itm) returned code 02013-07-25 01:44:52.00:Info:-1280271472: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/96/q69466096.itm) returned code 02013-07-25 01:44:52.00:Info:-1280271472: scmd: Message submitted [69466096] Failed g_spam_cmd score caused rejection (cmd=0 aspam=0.6)2013-07-25 01:45:13.00:Info:-1320842352: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/95/q69466095.itm) returned code 02013-07-25 01:45:13.00:Info:-1320842352: scmd: Message submitted [69466095] Failed g_spam_cmd score caused rejection (cmd=0 aspam=6.5)The problem appears to be related to the g_spam_cmd_if configuration value. Initially, I did not have this set so g_spam_cmd was running on every message. Since the external scanner is an "expensive" process in terms of resources, I set g_spam_cmd_if to 8 so that the external spam scanner would only run if SurgeMail had already determined that the message was NOT spam. I believe this is when the invalid rejections started. If I clear the g_spam_cmd_if setting, everything seems to be OK (see logs below).2013-07-25 01:53:11.00:Info:-1392026736: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/62/q69466162.itm) returned code 02013-07-25 01:53:31.00:Info:-1392026736: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/63/q69466163.itm) returned code 52013-07-25 01:54:32.00:Info:-1280271472: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/71/q69466171.itm) returned code 02013-07-25 01:56:16.00:Info:-1291347056: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/80/q69466180.itm) returned code 02013-07-25 01:56:38.00:Info:-1320842352: g_spam_cmd: (/usr/local/surgemail/spamassassin_g_spam_cmd.pl /usr/local/surgemail/work/81/q69466181.itm) returned code 0As a workaround, I set g_spam_cmd_reject to 255. This also stopped the invalid rejections, but I do not believe it should be necessary.Jim LohiserImagine Net, Inc.
Last Message | Next Message