SpamD Package Needs Testers



  • GeekGod has taken up the bounty project for the spamd package and he has much of the work done.  For those of you who have been wanting a spam filtering solution, this is your chance to start testing and submitting bug reports so that we can make this package the best it can be.  This is a bounty project so this isn't a place for feature requests (or demands) but if you're interested in testing this package, your bug reports will be very appreciated.



  • Apr 17 22:57:53 spamlogd[38752]: exiting
    Apr 17 22:57:53 spamlogd[38752]: exiting
    Apr 17 22:57:44 spamlogd[38691]: exiting
    Apr 17 22:57:44 spamlogd[38691]: exiting
    Apr 17 22:57:34 spamlogd[38621]: exiting
    Apr 17 22:57:34 spamlogd[38621]: exiting
    Apr 17 22:57:23 spamlogd[7250]: exiting
    Apr 17 22:57:23 spamlogd[7250]: exiting
    Apr 17 22:57:23 spamlogd[7273]: exiting
    Apr 17 22:57:23 spamlogd[7273]: exiting

    service not started.

    external sources
    prov name: OpenBsd Traplist 
    type: blacklist
    desc: test
    rej msg: you are on http://www.openbsd.org/spamd/traplist.gz
    method: url
    url: url http://www.openbsd.org/spamd/traplist.gz

    settings: pfsense, 700, 800, x, 15, 4, 864, 10, 1, 1, 450, null, x

    svc not started, not tested.



  • Show the contents of /usr/local/etc/spamd.conf and /usr/local/etc/rc.d/spamd.sh

    Also run each command on a shell and report back:

    /usr/local/sbin/spamd-setup -d &
    /sbin/pflogd &
    /usr/local/libexec/spamd  -G 5:4:864 -g -b 127.0.0.1 &
    /usr/local/libexec/spamlogd



  • Just fixed a few issues, please uninstall and reinstall the package using the reinstall package button on the installed packages screen.



  • ok …

    i did the reinstall, some above ... and
    system logs show

    Apr 17 18:38:15 spamlogd[27859]: exiting
    Apr 17 18:38:15 spamlogd[27859]: exiting
    Apr 17 18:38:09 spamlogd[27635]: exiting

    an trick
    there are not spamd.conf on /usr/local/etc/spamd only spamd.conf.sample and rename to spamd.conf don´t change anything

    other thing …

    /usr/local/libexec/spamd  -G 15:4:864 -n "Dhix Networks Mail" -c 800 -B 700 -w 1 -r 450 -b 127.0.0.1 &

    this line is in /usr/local/etc/rc.d/spamd.sh and the -r parameter is not reconized ...

    /usr/local/libexec/spamd -G 15:4:864 -n "Dhix Networks Mail" -c 800 -B 700 -w 1 -r 450 -b 127.0.0.1 &
    [1] 30746

    spamd: illegal option – r

    usage: spamd [-45bdv] [-B maxblack] [-c maxcon] [-G passtime:greyexp:whiteexp]
            [-h hostname] [-l address] [-M address] [-n name] [-p port]
            [-S secs] [-s secs] [-w window] [-Y synctarget] [-y synclisten]
            [-t table_no] [-m mode]

    then i changed to -m and it starts



  • You need to click save on the settings screen to create the .conf file.

    -r option fixed.



  • Seems to be working fine here so far.

    The service needs to be restarted when anything is changed on the settings page. Could we have a button (similar to SquidGuard) to reset the service on the spamd pages?

    Could we also have the option to see current whitelist, blacklist etc.?

    Adding the external sources doesn't appear to update the counter in the SpamD database page (at the bottom of the page there is a counter for the number of entries in the database) - I assumed the entries from the external sources would be added to the local database?

    These are suggestions more than anything. Great work on the package. Very much appreciated.



  • Using an alias in the NextMTA field doesn't appear to work (I have surrounded in quotes as per the instructions). If you tell me the command to view the logs I will tell you the exact error that spamd says (it has vanished from the web view of the log).

    Putting in the IP works fine.



  • The service does restart after changes:

    mwexec("/usr/local/etc/rc.d/spamd.sh stop");
    mwexec("/usr/local/etc/rc.d/spamd.sh start");

    Still need to convert the crontab code over to the new format.  Will do so shortly.



  • @blueivy:

    Using an alias in the NextMTA field doesn't appear to work (I have surrounded in quotes as per the instructions). If you tell me the command to view the logs I will tell you the exact error that spamd says (it has vanished from the web view of the log).

    Putting in the IP works fine.

    Look in /tmp/rules.debug



  • @sullrich:

    The service does restart after changes:

    mwexec("/usr/local/etc/rc.d/spamd.sh stop");
    mwexec("/usr/local/etc/rc.d/spamd.sh start");

    Still need to convert the crontab code over to the new format.  Will do so shortly.

    To get the NextMTA to change first of all from what I had {SBSr} to what I needed {SBS} (I made a typo) resulted in the same error in the logs still mentioning {SBSr}. I restarted the service and the error was being reported with the correct alias.

    When I changed from {SBS} to the actual IP address the error was still shown in the logs with {SBS}. The way I fixed both of these was to manually restart the service.



  • other log …
    Apr 17 19:13:39 spamlogd[38948]: Can not open db /var/db/spamd: No such file or directory



  • @blueivy:

    To get the NextMTA to change first of all from what I had {SBSr} to what I needed {SBS} (I made a typo) resulted in the same error in the logs still mentioning {SBSr}. I restarted the service and the error was being reported with the correct alias.

    When I changed from {SBS} to the actual IP address the error was still shown in the logs with {SBS}. The way I fixed both of these was to manually restart the service.

    Aha.  Fix coming up shortly…



  • ops error in package 4.3.3
    when hiting save button
    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pkg/spamd.inc:1) in /usr/local/www/pkg_edit.php on line 35



  • @dhipo:

    ops error in package 4.3.3
    when hiting save button
    Warning: Cannot modify header information - headers already sent by (output started at /usr/local/pkg/spamd.inc:1) in /usr/local/www/pkg_edit.php on line 35

    Just fixed, thanks.



  • Lets keep this thread to bug reports only.  Only folks who are contributing to the bounty will have a voice for feature additions for obvious reasons and I would like to keep that in the other bounty thread.  Thanks.



  • Change NextMTA back to {SBS} and got the error:

    ===
    php: : There were error(s) loading the rules: no IP address found for SBS /tmp/rules.debug:44: could not parse host specification pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [44]: rdr pass on re1 proto tcp from <spamd-white>to port smtp -> {SBS} port smtp

    SBS is an alias. Changing to the IP address works fine (and the service doesn't appear to need restarted this time).</spamd-white>



  • @blueivy:

    Cahnge NextMTA back to {SBS} and got the error:

    php: : There were error(s) loading the rules: no IP address found for SBS /tmp/rules.debug:44: could not parse host specification pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [44]: rdr pass on re1 proto tcp from <spamd-white>to port smtp -> {SBS} port smtp

    SBS is an alias.

    Changing to the IP address works fine (and the service doesn't appear to need restarted this time).</spamd-white>

    Show me the header of /tmp/rules.debug where the aliases are set.  you should see something mentioning SBS near the top.



  • @sullrich:

    Show me the header of /tmp/rules.debug where the aliases are set.  you should see something mentioning SBS near the top.

    ===

    System Aliases

    loopback = "{ lo0 }"
    lan = "{ re0  }"
    wan = "{ re1  }"
    enc0 = "{ enc0 }"

    User Aliases

    SBS = "{ 192.168.10.10 }"



  • For kicks, add another ip to the alias.  Does the problem go away?



  • @sullrich:

    For kicks, add another ip to the alias.  Does the problem go away?

    Afraid not:

    ===
    php: : There were error(s) loading the rules: no IP address found for SBS /tmp/rules.debug:44: could not parse host specification pfctl: Syntax error in config file: pf rules not loaded - The line in question reads [44]: rdr pass on re1 proto tcp from <spamd-white>to port smtp -> {SBS} port smtp

    SBS = "{ 192.168.10.10 192.168.10.101 }"

    ===</spamd-white>



  • Not quite understanding this one.  It works here:

    mailservers = "{ 10.0.0.25 10.0.0.26 }"
    rdr pass on le1 proto tcp from <spamd-white>to port smtp -> {mailservers} port
    smtp

    pfctl -f /tmp/rules.debug

    #</spamd-white>



  • Actually I am not too sure the {} business is correct.  Try changing your alias to $aliasname.    $SBS



  • @sullrich:

    Actually I am not too sure the {} business is correct.  Try changing your alias to $aliasname.    $SBS

    That fixed it :-)

    Need to change the instructions on the settings page and it's all done!

    Thanks for that!



  • New changes on their way.  Reinstall in about 5 minutes.



  • Make that another 5, found a small other problem and bounced the version.



  • I have turned on greylisting of connections and tested it from a few clients using Telnet to port 25 on cmd.exe (from Windows).

    From each client it looks like they connection is being treated as blacklisted (blacklisted connections stutter for the entire conversation rtather than the first 109 that greylisted connections do).

    I have also followed the rules and connected (through telnet again to port 25) and then waited for the default 25 minutes before connecting again. I understand that in this case the connecting IP should be whitelisted but it's not, it continues to be chatted to like it's a blacklisted connection (stutter the whole way through the conversation).

    The settings tab has been left at it's default settings with the exception of the NextMTA and greylisting.

    Any suggestions?



  • Yeah, /var/db/spamd is not being created.  I am researching it.  Gotta run for the evening but will look into it tomorrow.  If someone beats me to the solution, please post it!



  • The /var/db/spamd problem has been resolved.    After 5 minutes from this posting reinstall the package and please test.



  • i today test long time spamd and we long time not received any mail, any mail conn no accepted..
    after spamd removed. (sorry log cleared, test prev. 4-5hours)

    i think smtp connection no expired added after graylist or tracking..



  • @sullrich:

    The /var/db/spamd problem has been resolved.    After 5 minutes from this posting reinstall the package and please test.

    Seems to be working so far - will have to wait the obligatory 25 minutes to see if the greys move to the white. However non-blacklisted server are now only being stuttered for 10 second and they are appearing in the SpamD Database tab as grey.

    Will update you. Fingers crossed.



  • @ugur:

    i today test long time spamd and we long time not received any mail, any mail conn no accepted..
    after spamd removed. (sorry log cleared, test prev. 4-5hours)

    i think smtp connection no expired added after graylist or tracking..

    Prior to the release of just an hour or so ago it didn't work. Reinstall the package and greylist tracking should be working.



  • Then you are not running the latest version as i just commited fixes an hour ago.  You have not been loved long time.  Reinstall and long time test again.



  • @blueivy:

    @sullrich:

    The /var/db/spamd problem has been resolved.    After 5 minutes from this posting reinstall the package and please test.

    Seems to be working so far - will have to wait the obligatory 25 minutes to see if the greys move to the white. However non-blacklisted server are now only being stuttered for 10 second and they are appearing in the SpamD Database tab as grey.

    Will update you. Fingers crossed.

    Good deal.  Thank you for your clear and detailed reports.



  • @ugur:

    i today test long time spamd and we long time not received any mail, any mail conn no accepted..
    after spamd removed. (sorry log cleared, test prev. 4-5hours)

    i think smtp connection no expired added after graylist or tracking..

    long time = 5hour and i use 1.2-RELEASE built on Sun Feb 24 17:04:58 EST 2008, sorry, fair enough.



  • I think you are not reading us correctly.  The fix was commited ONE hour ago.  So your 5 hour test did NOT include the fix.



  • @sullrich:

    @blueivy:

    @sullrich:

    The /var/db/spamd problem has been resolved.    After 5 minutes from this posting reinstall the package and please test.

    Seems to be working so far - will have to wait the obligatory 25 minutes to see if the greys move to the white. However non-blacklisted server are now only being stuttered for 10 second and they are appearing in the SpamD Database tab as grey.

    Will update you. Fingers crossed.

    Good deal.  Thank you for your clear and detailed reports.

    Greys are moving to Whites and Black's are being blocked … excellent work. Fantastic!

    The SpamD Database tab is a bit messy and the headers don't correspond with the columns (for example the Attempts column has entries such as 1208560605 in it and what I assume is the real Attempts column has no header and values such as 0 and 1 in it). This doesn't affect the package itself but I thought I would point it out as nothing else is broken :-)

    Again, good work.



  • No problem-o.  I need to get my mail account setup shortly and forwarding to do some more tests.  I am definitely not done fixing / improving the package.

    Thanks for testing!



  • I've been composing this message for several hours while fighting fires around here.  Please forgive me if you've fixed some of these things since I started.

    Bugs found so far:

    Once I added a few traplist entries I noticed that on the SpamD Database tab, the icons for blacklist and spamtrap are not displaying.

    spamd.conf:
       the symlink needs to be in /usr/local/etc/spamd/ rather than /usr/local/etc.

    The SpamD External Sources tab adds entries similar to :

    test:
               :black:
               :msg="you are rejected":
               :method=http:
               :http:
               :file=www.openbsd.org/spamd/traplist.gz:

    The documentation does not show the :http: entry.  My edits last night were geared toward removing the ":http:" lines.

    Wierd, today I'm not getting the warning message when I start "/usr/local/libexec/spamd -d -v" manually even with those lines.

    The all entry seems to be not generating correctly.  This is what is generated:

    all:
           :whitelist:blacklist:nixspam:uatraps:test:

    This is what should be generated, assuming you want "blacklist" to override "whitelist" entries:

    all:
           :nixspam:whitelist:uatraps:whitelist:test:whitelist:blacklist

    If you want "whitelist" to override the "blacklist" entries:

    all:
           :nixspam:whitelist:uatraps:whitelist:test:whitelist:blacklist:whitelist

    I would prefer to rename "whitelist" to something like "local-overrides" or "local-whitelist", and "blacklist" to "local-blacklist", just to avoid confusion when discussing having whitelist "whitelist" override entries in blacklist "blacklist".   Probably not terribly important in the grand scheme of things.



  • @lambert:

    I've been composing this message for several hours while fighting fires around here.  Please forgive me if you've fixed some of these things since I started.

    Bugs found so far:

    Once I added a few traplist entries I noticed that on the SpamD Database tab, the icons for blacklist and spamtrap are not displaying.

    spamd.conf:
       the symlink needs to be in /usr/local/etc/spamd/ rather than /usr/local/etc.

    The SpamD External Sources tab adds entries similar to :

    test:
               :black:
               :msg="you are rejected":
               :method=http:
               :http:
               :file=www.openbsd.org/spamd/traplist.gz:

    The documentation does not show the :http: entry.  My edits last night were geared toward removing the ":http:" lines.

    Wierd, today I'm not getting the warning message when I start "/usr/local/libexec/spamd -d -v" manually even with those lines.

    The all entry seems to be not generating correctly.  This is what is generated:

    all:
           :whitelist:blacklist:nixspam:uatraps:test:

    This is what should be generated, assuming you want "blacklist" to override "whitelist" entries:

    all:
           :nixspam:whitelist:uatraps:whitelist:test:whitelist:blacklist

    If you want "whitelist" to override the "blacklist" entries:

    all:
           :nixspam:whitelist:uatraps:whitelist:test:whitelist:blacklist:whitelist

    I would prefer to rename "whitelist" to something like "local-overrides" or "local-whitelist", and "blacklist" to "local-blacklist", just to avoid confusion when discussing having whitelist "whitelist" override entries in blacklist "blacklist".   Probably not terribly important in the grand scheme of things.

    As far as I know every one of these are fixed.  Please reinstall and test again and report back further issues.


Log in to reply