Menu

#145 BUG in DSPAM?

v3.10.x
open-works-for-me
nobody
daemon (84)
5
2013-06-05
2012-02-21
Anonymous
No

Hi there,

today I was debugging some problems with DSPAM and I found this:

BUG in DSPAM. Please report this bug:
--> Skipping merged group spam: user [dspam-user] is already in merged group

I'm using DSPAM in daemon mode with PostgreSQL server - latest GIT version. Here is my configuration string: ./configure --prefix=/usr --sysconfdir=/etc --with-dspam-home=/var/dspam --with-logdir=/var/log --with-storage-driver=pgsql_drv --with-pgsql-includes=/usr/include/postgresql --enable-preferences-extension --enable-large-scale --enable-daemon --enable-virtual-users

My group file has only one line:
spam:merged:*

Here is a full debug from an example connection:
13440: [02/21/2012 11:17:40] DSPAM Instance Startup
13440: [02/21/2012 11:17:40] input args: dspam --deliver=innocent,spam
13440: [02/21/2012 11:17:40] pass-thru args:
13440: [02/21/2012 11:17:40] processing user [dspam-user]
13440: [02/21/2012 11:17:40] uid = 0, euid = 0, gid = 0, egid = 8
13440: [02/21/2012 11:17:40] loading preferences for user [dspam-user]
13440: [02/21/2012 11:17:40] _pgsql_drv_getpwnam: successful returning struct for name: [dspam-user]
13440: [02/21/2012 11:17:40] Loading preferences for uid 1655
13440: [02/21/2012 11:17:40] Loading preferences for uid 0
13440: [02/21/2012 11:17:40] Loading preferences for uid 0
13440: [02/21/2012 11:17:40] default preferences empty. reverting to dspam.conf preferences.
13440: [02/21/2012 11:17:40] Loading preferences from dspam.conf
13440: [02/21/2012 11:17:40] using /var/dspam/opt-in/[dspam-user].dspam as path
13440: [02/21/2012 11:17:40] using /var/dspam/opt-out/[dspam-user].nodspam as path
13440: [02/21/2012 11:17:40] BUG in DSPAM. Please report this bug:
13440: [02/21/2012 11:17:40] --> Skipping merged group spam: user [dspam-user] is already in merged group
13440: [02/21/2012 11:17:40] sedation level set to: 5
13440: [02/21/2012 11:17:40] _pgsql_drv_getpwnam: successful returning struct for name: [dspam-user]
13440: [02/21/2012 11:17:40] _pgsql_drv_getpwnam: returning cached name '[dspam-user]'
13440: [02/21/2012 11:17:42] Loading 3 BNR patterns
13440: [02/21/2012 11:17:42] _pgsql_drv_getpwnam: returning cached name '[dspam-user]'
13440: [02/21/2012 11:17:42] Whitelist threshold: 10
...
13440: [02/21/2012 11:17:42] Graham-Bayesian Probability: 0.000000 Samples: 15
13440: [02/21/2012 11:17:42] Burton-Bayesian Probability: 0.000000 Samples: 27
13440: [02/21/2012 11:17:42] no factors specified; using default
13440: [02/21/2012 11:17:42] Result Confidence: 0.99
13440: [02/21/2012 11:17:42] auto-whitelisting this message
13440: [02/21/2012 11:17:42] _pgsql_drv_getpwnam: returning cached name '[dspam-user]'
13440: [02/21/2012 11:17:42] Control: [10 10] [10 11] Delta: [0 1]
13440: [02/21/2012 11:17:42] total processing time: 2.46797s
13440: [02/21/2012 11:17:42] _pgsql_drv_getpwnam: returning cached name '[dspam-user]'
13440: [02/21/2012 11:17:42] saving signature as 4f436f46134401406812574
13440: [02/21/2012 11:17:42] _pgsql_drv_getpwnam: returning cached name '[dspam-user]'
13440: [02/21/2012 11:17:42] libdspam returned probability of 0.000000
13440: [02/21/2012 11:17:42] message result: NOT SPAM
13440: [02/21/2012 11:17:42] _pgsql_drv_getpwnam: returning cached name '[dspam-user]'
13440: [02/21/2012 11:17:42] delivering message
13440: [02/21/2012 11:17:42] Establishing connection to /var/imap/socket/lmtp:0
13440: [02/21/2012 11:17:42] Connection established
13440: [02/21/2012 11:17:42] DSPAM Instance Shutdown. Exit Code: 0

From time to time I am experiencing lots of "Broken pipe"s error messages in my sendmail daemon (sendmail <-> DSPAM). Then messages are not being sent - sendmail holds them in a queue. When I exclude DSPAM from my configuration, messages are sent directly to LMTP server and queue is emtied. Just after that I rollback the configuration to sendmail -> DSPAM -> LMTP server (Cyrus) and everything goes back to normal. I assume this "BUG" is not a cause of this problem. I will try to debug it soon.

Does this "BUG" can cause real problems?

Norbert

Discussion

  • Stevan Bajic

    Stevan Bajic - 2012-02-21

    > Does this "BUG" can cause real problems?

    Not really. It is more or less informational. The code is not doing any harm. Just printing that this (in theory) should not happen and therefore it must be a bug in DSPAM.

    I will need to look into that later.

    btw: Have you really named your DSPAM User "[dspam-user]"? Why? Why the brackets and especially why that dash?

     
  • Anonymous

    Anonymous - 2012-02-22

    Thanks I though so looking at the code...

    [dspam-user] is just a common reference to real user - I simply replace the real one with this. :)

     
  • Anonymous

    Anonymous - 2013-06-05
    • milestone: 2125675 --> v3.10.x
    • status: open --> open-works-for-me
     
  • Anonymous

    Anonymous - 2013-06-05

    Hi again Stevan,

    I had to examine in depth the problem with "BUG in DSPAM". It seems that in my configuration (take a look above again) it does matter a lot. I receive this error on every message that was addressed to more than one receipient on my system. From my short examination it seems that the agent context flag DAF_MERGED should not be used as agent context wide flag. As I understood from the code it supports just the logic implemented in ctx_init procedure and nothing more. But the agent context wide implementation is causing the problems as described above.
    When I add the code to reset the flag at the beggining of the ctx_init procedure system is working as expected. Please advise if I am on right track here...

    Code (dspam.c - ctx_init):
    ----
    int is_group_member_inoculation = 0;
    int is_group_member_classification = 0;
    int is_group_member_global = 0;
    int is_group_member_shared = 0;
    int is_group_member_merged = 0;
    char *group;
    char buffer[10240];

    // NDA FIX - clear DAF_MERGED from agent context flags
    ATX->flags &= ~DAF_MERGED;

    while (fgets (buffer, sizeof (buffer), file) != NULL)
    ----

    Thanks for all the support you provided so far for the community of DSPAM!

     

Log in to post a comment.