HOW TO: Install Spamassassin For Windows and SPAMD service

This section contains user-submitted tutorials.
User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2015-04-27 11:13

This tutorial is a re-publish of a tutorial already on this forum, but simplified for clarity). It's aim is to install Spamassassin and its service for running in connection with the default integration with Hmailserver.

It is a simple procedure that should only take 5 minutes.

1, Download SpamassassinForWindows from Jam Software here: http://www.jam-software.com/spamassassin/index.shtml

2, Run the install of this software: I will assume defaults for all installation locations for this tutorial.
NOTE: You may need to switch off your firewall during this install so that it can auto update to latest spam rules during install. It will then create some firewall rules for you. Then switch firewall back on. If it has not added such exceptions itself as necessary, add the following programs (from the Spamassassin program directory) to the Firewall Exceptions (for PRIVATE network only). Failure to allow this program exception will result in failed updates (a) and service connection by Hmailserver (b):-
  • a) SA-UPDATE.EXE
    b) SPAMD.EXE
3, Download 'NSSM Service Manager' (service installer) from: http://nssm.cc/download/?page=download
and save the unzipped folder to a disk location where you will run it from permanently (perhaps within program files directory if you wish).

! DO NOT MOVE THE NSSM PROGRAM FROM THIS LOCATION ONCE INSTALLED AS ITS AVAILABILITY IS REQUIRED FOR THE RESULTANT SERVICE TO RUN !

4, Within CMD prompt, CD to the "win64" directory of NSSM location (although they do claim that running win32 version on 64bit OS should still be ok):

5, Install the spamassassin service with this command:
nssm install

and using the onscreen prompts enter (copy) the following:

Version 2.15 (without GUI):
application/path: %ProgramFiles%\jam software\spamassassin for windows\spamd.exe <---- your spamassassin program with full path
options/arguments: -l -s "c:\path to\spamd.log" --round-robin --timeout-child=85 <---change the log path to wherever you wish to locate it **
service name: spamassassin <<----- However you want the service to be identified as.
Example with GUI (Version 2.24):
Untitled.png
(You may choose to write something meaningful in the 'Description' on the DETAILS tab for displaying in the Windows Services control panel.)

Hint: I chose the Hmailserver Log directory ("%ProgramFiles(x86)%\hMailServer\Logs") as a consolidated logs directory so I specified it as the store for my Spamd.log file (c:\path to\spamd.log above).

6, You may wish to modify the 'spamassassin' service via services.msc and set the Recovery options to “Restart the service” for the 1st 2 recovery
failures - although I have not yet found it ever fails (not that I would know - I have it to restart if it does. :roll: )

7, HMS should now be enabled to use Spamassassin: hmailserver / settings / Anti Spam / SpamAssassin Tab - and tick/enable. The default port should be left at 783.

That's it.

Additional Info/advice

Spamassassin requires definition updates (almost daily) just like an AV software. This is achieved by running the following command:

Code: Select all

net stop spamassassin
sa-update.exe -v --nogpg --channelfile UpdateChannels.txt
net start spamassassin
You should include this command daily either by your regular housekeeping backup script or by Task Scheduler not forgetting to refer to the correct path.

** UPDATE: It has also been claimed that the "--round-robin" parameter is no longer needed and actually best to be left out to ensure trouble free and optimal operation in 3.4 onwards. However, with its inclusion I see no error or obvious drawback.

You may now choose how to use the Spamassassin scores. In Hmailserver you have the option to 'Use score from Spamassassin' (in the Spamassassin tab) or to simply assign a positive SA result a particular score of your own. There is no right or wrong, just personal preference. (My personal setup follows this post....)
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2015-04-27 11:35

My recommendation of implementing and handling scores

Here I detail MY implemented scoring method. I find it is very effective as I rarely receive genuine spam emails that has not been removed or identified as [spam] and moved to trash. It is a slightly 'alternative' method but for me it works.

1, I use the default Spamassassin update definitions. In addition, add/ensure this is in your LOCAL.CF (found in %ProgramFiles(x86)%\JAM Software\SpamAssassin for Windows\etc\spamassassin):

Code: Select all

report_safe 0
add_header all Report _REPORT_ *
score DRUGS_ERECTILE 10

# Add *****SPAM***** to the Subject header of spam e-mails
#
rewrite_header Subject [_HITS_]

# Set the threshold at which a message is considered spam (default: 5.0)
#
required_score 3.0
2, Set a GLOBAL RULE:

Name: "ExternalScore7"
if:
X-Spam-Level (custom header) ...contains..... *******
<<-- 7 asterix
action:
Move to IMAP Folder...... Trash
(or whatever your normal trash folder is on your accounts (you may choose a dedicated 'Spam' folder instead). Alternatively you can simply 'DELETE EMAIL' but that never gives you chance to review.)

Note: I also have an additional IF clause as
OR
Subject REGULAR EXPRESSION (?i:^Virus found:.*$)


this works to also remove any emails being found to contain malware by the inbound Antivirus check.

3, Anti Spam settings in HMS:

Code: Select all

ANTISPAM

GENERAL                              SPAM TESTS              Score   SPAMASSASSIN
  Spam Mark:                  5       Use SPF:            True - 3    Use Spamassassin:    True
  Add X-HmailServer-Spam:     True    Check HELO host:    True - 2    Hostname:       127.0.0.1
  Add X-HmailServer-Reason:   True    Check MX records:   True - 2    Port:                 783
  Add X-HmailServer-Subject:  True    Verify DKIM:       False - 5    Use SA score: False -   5
              Subject Text: "[SPAM]"
  Spam delete threshold: 8         Maximum message size: 2048

GREYLISTING:
  Greylisting:  False

DNSBL ENTRIES:
                  zen.spamhaus.org      Score: 5     Result: 127.0.0.2-8|127.0.0.10-11
                    bl.spamcop.net      Score: 3     Result: 127.0.0.2
            b.barracudacentral.org      Score: 2     Result: 127.0.0.2
     hostkarma.junkemailfilter.com      Score: 2     Result: 127.0.0.2|127.0.0.4
           bl.spameatingmonkey.net      Score: 2     Result: 127.0.0.2-3
                   cbl.abuseat.org      Score: 2     Result: 127.0.0.2

SURBL ENTRIES:
                   multi.surbl.org      Score: 3
-----------------------------------------------------------------------------------------------
Generated by HMSSettingsDiagnostics v1.48, Hmailserver Forum.


IN ADDITION TO using Spamassassin and the above scoring system, I also operate a DISPOSABLE ADDRESS system to minimise the risk of 'real' account addresses getting in the hands of unwanted spamming lists; should an address given ends up being abused it is simply blacklisted and emails will never be received to that address again (and no setting up of the email addresses is required). This keeps the real account Inboxes clean and the reliance on Spamassassin at a minimum. You can implement it using this script: viewtopic.php?f=20&t=29306

For explanation (of this alternative method):

It works like this: if spamassassin scores over 3 it will consider it spam and apply the score in the subject eg "[3.4]..". HMS will also see SA has called it spam and therefore will mark it spam (scoring it internally as '5') with an additional "[SPAM]" eg so subject now reads "[SPAM] [3.4]..." This helps you see the score and how definitive it is. See the attached screenshot:
Untitled.png
HMS will then apply its own further checks. If it finds any itself another (minimum of) 2 will be added internally (making 7). If it hits 8 with its tests it will simply be deleted without a trace.

If, however, HMS doesnt score it any more, and it's only SA that marked it and if SA scored it 7 or more it will simply be deleted/moved to Trash/Spam folder to give you chance to see it. (The above included screenshot is from the Trash folder and shows such cases).

If it was marked as Spam by SA but did not reach either SA 7 or HMS 8 it will remain in your mail just marked as spam ("[SPAM] [4.5] Subject....") and requiring review. I RARELY get this situation.

In essence I get a clean sheet or mostly positive spams being deleted and the inbox remains clean.

NOTE:

If you have or are regularly receiving Apple, Paypal, iTunes or Amazon Account "reset your account" phishing emails, or regular "Buy your Louis Vuitton handbags" or "Rayban Sunglasses", I also have a an effective custom rule that eliminates them too - just let me know.

This completes my total Spamassassin/Spam scoring setup. It works for me! Feel free to use it as suggestion, hint or 'what not to do' (if thats the way you feel.) :-)

For reference:

Code: Select all

28/03/2017 09:38:46   Hmailserver: 5.6.6-B2383

IP: 127.0.0.1 - 127.0.0.1     Priority: 15     Name: My computer

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:  False                              Antivirus:   True
     IMAP:   True                              SSL/TLS:    False

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       - False
     Local To External    -  True              Local To External    - False
     External To Local    - False           
     External To External - False           


IP: 0.0.0.0 - 255.255.255.255     Priority: 10     Name: Internet

  Allow connections                         Other
     SMTP:   True                              Antispam :   True
     POP3:  False                              Antivirus:   True
     IMAP:   True                              SSL/TLS:    False

  Allow Deliveries from                     Require Authentication from
     Local To Local       -  True              Local To Local       -  True
     Local To External    -  True              Local To External    -  True
     External To Local    -  True              External To Local    - False
     External To External - False           


------------------------------------------------------
AUTOBANNED Local Addresses:
    No entries

-----------------------------------------------------------------------------------------------

AUTOBAN
  Autoban Enabled: True       Max invalid logon attempts:      2
                              Minutes Before Reset:         1500  (25.00 hours, 1.04 days)
                              Minutes to Autoban:          10140  (169.00 hours, 7.04 days)

There is a total of 3 auto-ban IP ranges.
-----------------------------------------------------------------------------------------------

INCOMING RELAYS
    No entries

-----------------------------------------------------------------------------------------------

ANTISPAM

GENERAL                              SPAM TESTS              Score   SPAMASSASSIN
  Spam Mark:                  5       Use SPF:            True - 3    Use Spamassassin:    True
  Add X-HmailServer-Spam:     True    Check HELO host:    True - 2    Hostname:       127.0.0.1
  Add X-HmailServer-Reason:   True    Check MX records:   True - 2    Port:                 783
  Add X-HmailServer-Subject:  True    Verify DKIM:       False - 5    Use SA score: False -   5
              Subject Text: "[SPAM]"
  Spam delete threshold: 8         Maximum message size: 2048

GREYLISTING:
  Greylisting:  False

DNSBL ENTRIES:
                  zen.spamhaus.org      Score: 5     Result: 127.0.0.2-8|127.0.0.10-11
                    bl.spamcop.net      Score: 3     Result: 127.0.0.2
              zz.countries.nerd.dk      Score: 5     Result: 127.0.0.158|127.0.2.131|127.0.2.198
            b.barracudacentral.org      Score: 2     Result: 127.0.0.2
     hostkarma.junkemailfilter.com      Score: 2     Result: 127.0.0.2|127.0.0.4
           bl.spameatingmonkey.net      Score: 2     Result: 127.0.0.2-3
                   cbl.abuseat.org      Score: 2     Result: 127.0.0.2

SURBL ENTRIES:
                   multi.surbl.org      Score: 3
-----------------------------------------------------------------------------------------------

WHITELISTING
    No entries
-----------------------------------------------------------------------------------------------

ANTIVIRUS

GENERAL:
  When found - Delete Attachments.

  Max Message Size: 26214
     CLAM AV:   True       Hostname: localhost    Port: 3310
     CLAMWIN:   False
     CUSTOMAV:  False

  Block Attachments: True
               *.7z              
               *.bat             Batch processing file
               *.cmd             Command file for Windows NT
               *.com             Command
               *.cpl             Windows Control Panel extension
               *.csh             CSH script
               *.docm            Macro enabled Office
               *.dotm            Macro enabled Office
               *.exe             Executable file
               *.inf             Setup file
               *.lnk             Windows link file
               *.msg             .msg message files
               *.msi             Windows Installer file
               *.msp             Windows Installer patch
               *.pif             
               *.reg             Registration key
               *.scf             Windows Explorer command
               *.scr             Windows Screen saver
               *.vbs             
               *.xlsm            Macro enabled Office
               *.xltm            Macro enabled Office
               *.zip             
               .js               JavaScript
-----------------------------------------------------------------------------------------------

SSL/TLS
             SSL 3.0 :  False
             TLS 1.0 :  False
             TLS 1.1 :   True
             TLS 1.2 :   True                Verify Remote SSL/TLS Certs:   True
SslCipherList  :

ECDHE-RSA-AES128-GCM-SHA256     - ECDHE-ECDSA-AES128-GCM-SHA256   - ECDHE-RSA-AES256-GCM-SHA384     
ECDHE-ECDSA-AES256-GCM-SHA384   - DHE-RSA-AES128-GCM-SHA256       - DHE-DSS-AES128-GCM-SHA256       
kEDH+AESGCM                     - ECDHE-RSA-AES128-SHA256         - ECDHE-ECDSA-AES128-SHA256       
ECDHE-RSA-AES128-SHA            - ECDHE-ECDSA-AES128-SHA          - ECDHE-RSA-AES256-SHA384         
ECDHE-ECDSA-AES256-SHA384       - ECDHE-RSA-AES256-SHA            - ECDHE-ECDSA-AES256-SHA          
DHE-RSA-AES128-SHA256           - DHE-RSA-AES128-SHA              - DHE-DSS-AES128-SHA256           
DHE-RSA-AES256-SHA256           - DHE-DSS-AES256-SHA              - DHE-RSA-AES256-SHA              
AES128-GCM-SHA256               - AES256-GCM-SHA384               - ECDHE-RSA-RC4-SHA               
ECDHE-ECDSA-RC4-SHA             - AES128                          - AES256                          
RC4-SHA                         - HIGH                            - !aNULL                          
!eNULL                          - !EXPORT                         - !DES                            
!3DES                           - !MD5                            - !PSK;                           
-----------------------------------------------------------------------------------------------

TCPIP PORTS                                         Connection Sec
               0.0.0.0         / 25    / SMTP   -   None
               0.0.0.0         / 110   / POP3   -   None
               0.0.0.0         / 143   / IMAP   -   None
               0.0.0.0         / 587   / SMTP   -   None
-----------------------------------------------------------------------------------------------

LOGGING      Logging Enabled: True

  Paths:-   Current:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_2017-03-28.log
            Error:    C:\Program Files (x86)\hMailServer\Logs\ERROR_hmailserver_2017-03-28.log
            Event:    C:\Program Files (x86)\hMailServer\Logs\hmailserver_events.log
            Awstats:  C:\Program Files (x86)\hMailServer\Logs\hmailserver_awstats.log
                        APPLICATION -    True
                        SMTP        -    True
                        POP3        -      .
                        IMAP        -      .
                        TCPIP       -      .
                        DEBUG       -      .
                        AWSTATS     -      .
-----------------------------------------------------------------------------------------------

SYSTEM TESTS

Database type: MySQL

IPv6 support is available in operating system.

Backup directory D:\Backup\hMailserver is writable.

Relative message paths are stored in the database for all messages.

-----------------------------------------------------------------------------------------------

Generated by HMSSettingsDiagnostics v1.48, Hmailserver Forum.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by SorenR » 2015-06-29 22:51

A plugin worth looking at...

https://github.com/eilandert/Botnet.pm
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2015-10-08 11:15

In addition to my setup (above) I also use some custom rules that were once written and maintained by KOPIS.COM (written buy a man who made it his mission to tackle spam: http://khopis.com/wiki/Anti-spam). Unfortunately, the author/website of the rules (khopesh.com) is no longer active so updates to these rule definitions no longer happen (and consequently I have removed his references to the update channel of SA). However, I still have in place and use the last edition of his rules and they are very much active in scoring my Spam.

I find them useful and if you wish to continue to follow my recommendation of this thread to achieve similar results then I attach them to this post.

* OPEN the attached 3.003000.zip, and save the contents in to the equivalent of:
  • C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\3.004000
(where '3.00400' is the folder holding the default "updates_spamassassin_org" CF and subfolder). If it helps see screenshot to how it should look:
3.004000.PNG
That's it, you now have my full setup for spamassassin and I remain more or less spam free.
Attachments
3.004000.zip
(18.1 KiB) Downloaded 3834 times
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

adsmart101
New user
New user
Posts: 1
Joined: 2015-12-26 22:53

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by adsmart101 » 2015-12-26 23:02

Can you help me configure spamassassin so that it also marks the body of email with the various scores from the different categories? I think it would be cool and informative to know why spamassassin classified a certain email as spam. I thought it could do this.

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2015-12-26 23:14

If you add
add_header all Report _REPORT_ *

in to the LOCAL.CF then out gives all the headers and scores. (use my version as posted)
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

sart
New user
New user
Posts: 10
Joined: 2015-05-27 11:44

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by sart » 2016-01-25 14:30

How to make log rotate for spamd.log?

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-01-25 14:38

Write BAT file or include a section in your nightly housekeeping script that stops the spamassassin service, renames the current spamd.log, then restarts the service (a new spamd.log will then be created). You should be stopping and restarting the service every night anyway in order to perform a daily 'sa-update' of definitions.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

MarHMS
Normal user
Normal user
Posts: 136
Joined: 2015-12-11 17:10

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by MarHMS » 2016-02-03 18:26

jimimaseye wrote:...

Code: Select all

report_safe 0
add_header all Report _REPORT_ *
score DRUGS_ERECTILE 10

# Add *****SPAM***** to the Subject header of spam e-mails
#
rewrite_header Subject [_HITS_]

# Set the threshold at which a message is considered spam (default: 5.0)
#
required_score 3.0
...
Should I overwrite my local.cf file:

Code: Select all

# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
#
###########################################################################

#   Add *****SPAM***** to the Subject header of spam e-mails
#
# rewrite_header Subject *****SPAM*****


#   Save spam messages as a message/rfc822 MIME attachment instead of
#   modifying the original message (0: off, 2: use text/plain instead)
#
# report_safe 1


#   Set which networks or hosts are considered 'trusted' by your mail
#   server (i.e. not spammers)
#
# trusted_networks 212.17.35.


#   Set file-locking method (flock is not safe over NFS, but is faster)
#
# lock_method flock


#   Set the threshold at which a message is considered spam (default: 5.0)
#
# required_score 5.0


#   Use Bayesian classifier (default: 1)
#
# use_bayes 1


#   Bayesian classifier auto-learning (default: 1)
#
# bayes_auto_learn 1


#   Set headers which may provide inappropriate cues to the Bayesian
#   classifier
#
# bayes_ignore_header X-Bogosity
# bayes_ignore_header X-Spam-Flag
# bayes_ignore_header X-Spam-Status


#   Some shortcircuiting, if the plugin is enabled
# 
ifplugin Mail::SpamAssassin::Plugin::Shortcircuit
#
#   default: strongly-whitelisted mails are *really* whitelisted now, if the
#   shortcircuiting plugin is active, causing early exit to save CPU load.
#   Uncomment to turn this on
#
# shortcircuit USER_IN_WHITELIST       on
# shortcircuit USER_IN_DEF_WHITELIST   on
# shortcircuit USER_IN_ALL_SPAM_TO     on
# shortcircuit SUBJECT_IN_WHITELIST    on

#   the opposite; blacklisted mails can also save CPU
#
# shortcircuit USER_IN_BLACKLIST       on
# shortcircuit USER_IN_BLACKLIST_TO    on
# shortcircuit SUBJECT_IN_BLACKLIST    on

#   if you have taken the time to correctly specify your "trusted_networks",
#   this is another good way to save CPU
#
# shortcircuit ALL_TRUSTED             on

#   and a well-trained bayes DB can save running rules, too
#
# shortcircuit BAYES_99                spam
# shortcircuit BAYES_00                ham

endif # Mail::SpamAssassin::Plugin::Shortcircuit
If no, then should just append it to the code?

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-02-03 19:26

Your existing file (which is default) consists mainly of REMMED lines (with # at the start.) That makes it effectively an empty file. You only need to copy in to you file (at the top, for example) the same lines that I have in mine (that are not remmed).

So yes, just append to the top of yours.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

MarHMS
Normal user
Normal user
Posts: 136
Joined: 2015-12-11 17:10

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by MarHMS » 2016-02-03 19:46

jimimaseye wrote:Your existing file (which is default) consists mainly of REMMED lines (with # at the start.) That makes it effectively an empty file. You only need to copy in to you file (at the top, for example) the same lines that I have in mine (that are not remmed).

So yes, just append to the top of yours.
Okay. Thanks a lot.

sart
New user
New user
Posts: 10
Joined: 2015-05-27 11:44

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by sart » 2016-02-17 11:29

jimimaseye wrote:Write BAT file or include a section in your nightly housekeeping script that stops the spamassassin service, renames the current spamd.log, then restarts the service (a new spamd.log will then be created). You should be stopping and restarting the service every night anyway in order to perform a daily 'sa-update' of definitions.
thank you
i change sa-update.bat

Code: Select all

net stop spamassasin
sa-update.exe -v -V -D --nogpg --channelfile UpdateChannels.txt
ren D:\SpamAssassin\logs\spamd.log spamd-%date:~-4,4%-%date:~-7,2%-%date:~-10,2%-%time:~-11,2%-%time:~-8,2%-%time:~-5,2%.log
net start spamassasin

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-02-17 11:43

Good. And why not zip/compress the archived log file too (it will compress to 10% the size saving 90% space).

Hint: look in the hmailserver/bin directory and you will find 7za.exe which is the commandline 7-Zip program. And here is a script I (could) use in my daily housekeeping script to compress hmailserver logs:

Code: Select all

FOR /F "eol=; eol=[ tokens=1,2* delims==" %%i in ('findstr /b /l /i "Logfolder"= "%programfiles(x86)%\hMailServer\Bin\hmailserver.ini"') DO set Logpath=%%~j

"%programfiles(x86)%\hMailServer\Bin\7za" a -t7z "%Logpath%\Logs.7z" -uq0 "%Logpath%\hmailserver_????-*.log" -xr!*.7z
del "%Logpath%"\hmailserver_????-*.log
Youll figure it out (the 2nd line does the compressing).

Youre welcome. :wink:
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Whatsek
New user
New user
Posts: 4
Joined: 2008-01-26 01:12

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by Whatsek » 2016-02-25 11:57

Thank you for this guide!

I had a problem in the renaming script, if the time is for example 09:00, the leading zero is missing, so there is a space in the file name, and renaming fails.
So I changed the script a little bit:

Code: Select all

net stop spamassassin
sa-update.exe -v --nogpg --channelfile UpdateChannels.txt
set hr=%time:~0,2%
if "%hr:~0,1%" equ " " set hr=0%hr:~1,1%
ren "C:\Program Files (x86)\hMailServer\Logs\spamd.log" spamd-%date:~-4,4%-%date:~-7,2%-%date:~-10,2%-%hr:~-11,2%-%time:~-8,2%-%time:~-5,2%.log"
net start spamassassin


I added the two lines, and changed the hour variable in %hr

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-03-29 23:36

ok. Tailoring to suit your individual needs is not forbidden. :wink: :mrgreen:
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

comp1mp
Normal user
Normal user
Posts: 36
Joined: 2013-11-26 03:51

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by comp1mp » 2016-04-01 06:00

What version of nssm did you use? I can't get this to work with 2.2.4.

The service installs but upon starting it immediately pauses.
nssm1.png
nssm2.png

spamd.exe is giving a return code of 2 in event logs.

Also are you running the 32 bit version of SpamAssassin?

Thanks,
Matthew

comp1mp
Normal user
Normal user
Posts: 36
Joined: 2013-11-26 03:51

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by comp1mp » 2016-04-01 15:06

Sorry, here are the specs.
Windows Server 2008 R2 Standard (x64)
Spam Assassin for Windows 3.4.1.36 (x64)
NSSM 2.24 (x64)

comp1mp
Normal user
Normal user
Posts: 36
Joined: 2013-11-26 03:51

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by comp1mp » 2016-04-01 17:03

I figured this out.

The --round-robin flag causes a runtime exception in version 3.4.1
3.4.1 is the current (and only) version for download on Jam's site.
This occurs in both the 32x and 64x builds.
Omitting the flag solves the problem.

There are earlier versions available for download from sites like CNET, Tucows etc.
I downloaded the version form CNET which is 3.4.0, and --round-robin did not cause an exception.
Be careful though, the CNET version shows version 3.4.0-rc5 when executed in the commmand line.
Be sure you are using a production release.

So the question is, why use the --round-robin flag? My understanding is this flag is to utilize the pre-apache fork algorithm for child process management. Presumably, using the flag would prevent the service from scaling properly. From my reading, the new algorithm was written to resolve this issue.

Jimimaseye, do you know something through experience which leads you to use this flag?

Also, many thanks for posting your score handling implementation. I look forward to using it!

Please update the tutorial to reflect what I have learned.

Matthew

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2016-04-06 08:46

I never used the --round-robin option, as far as i know it is an ancient feature that uses more system resources on the system running it
--round-robin

By default, spamd will attempt to keep a small number of "hot" child processes as busy as possible, and keep any others as idle as possible, using something similar to the Apache httpd server scaling algorithm. This is accomplished by the master process coordinating the activities of the children. This switch will disable this scaling algorithm, and the behaviour seen in the 3.0.x versions will be used instead, where all processes receive an equal load and no scaling takes place.
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-04-17 10:53

comp1mp wrote:I figured this out.

The --round-robin flag causes a runtime exception in version 3.4.1
3.4.1 is the current (and only) version for download on Jam's site.
This occurs in both the 32x and 64x builds.
Omitting the flag solves the problem.
I have just made note to this in the first post detailing the installation.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-05-04 10:31

comp1mp wrote:I figured this out.

The --round-robin flag causes a runtime exception in version 3.4.1
3.4.1 is the current (and only) version for download on Jam's site.
I have just downloaded and tested the latest version of 3.4.1 using my installation instructions in this HOW TO guide including the -round-robin flag. I see no such errors. viewtopic.php?f=22&p=185847#p185847
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

itsmesri
Normal user
Normal user
Posts: 59
Joined: 2014-11-07 08:30

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by itsmesri » 2016-06-02 07:18

I have done everything except below global rule, Where to set this? Please provide me location and where.

Code: Select all

2, Set a GLOBAL RULE:

Name: "ExternalScore7"
if:
X-Spam-Level (custom header) ...contains..... ******* <<-- 7 asterix
action:
Move to IMAP Folder...... Trash (or whatever your normal trash folder is on your accounts (you may choose a dedicated 'Spam' folder instead). Alternatively you can simply 'DELETE EMAIL' but that never gives you chance to review.)

Note: I also have an additional IF clause as
OR
Subject REGULAR EXPRESSION (?i:^Virus found:.*$)

this works to also remove any emails being found to contain malware by the inbound Antivirus check.
One more thing when I test SpamAssassin, I am seeing MISSING_DATE,
MISSING_HEADERS,MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE .. Was the test correct

Code: Select all

X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on COWBOYS
X-Spam-Flag: YES
X-Spam-Level: **************************************************
X-Spam-Status: Yes, score=1004.5 required=3.0 tests=GTUBE,MISSING_DATE,
MISSING_HEADERS,MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE,NO_RECEIVED,
NO_RELAYS,TVD_SPACE_RATIO autolearn=no autolearn_force=no version=3.4.1

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by mattg » 2016-06-02 10:14

itsmesri wrote:I have done everything except below global rule, Where to set this?
Er, in the main rules section in the admin gui.
Not in the accounts >> rules
itsmesri wrote:One more thing when I test SpamAssassin, I am seeing MISSING_DATE,
MISSING_HEADERS,MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE .. Was the test correct

Code: Select all

X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on COWBOYS
X-Spam-Flag: YES
X-Spam-Level: **************************************************
X-Spam-Status: Yes, score=1004.5 required=3.0 tests=GTUBE,MISSING_DATE,
MISSING_HEADERS,MISSING_MID,MISSING_SUBJECT,NO_HEADERS_MESSAGE,NO_RECEIVED,
NO_RELAYS,TVD_SPACE_RATIO autolearn=no autolearn_force=no version=3.4.1
Yes, that is the point of the test.

That shows that the test worked.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

BananaAcid
New user
New user
Posts: 2
Joined: 2016-06-09 16:28

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by BananaAcid » 2016-06-09 16:34

Thats how i setted up the update as a windows scheduler task:

created: C:\ProgramData\SpamAssassin
-> that's also where i added .\logs\ to be saved

C:\ProgramData\SpamAssassin\update.cmd

Code: Select all

@echo off
cd "C:\Program Files\SpamAssassin for Windows"
net stop spamassassin
sa-update.exe -v --nogpg --channelfile UpdateChannels.txt
net start spamassassin
C:\ProgramData\SpamAssassin\install_update_task.cmd

Code: Select all

@echo off
echo installing spamassassin update task

rem  be admin - no sudo, so do 'su'
Net user administrator /active:yes

rem  setup
SchTasks /Create /SC DAILY /TN "SpamAssassin Update" /TR "cmd /c C:\ProgramData\SpamAssassin\update.cmd" /ST 03:00

rem  test
SchTasks /TN "SpamAssassin Update"

pause

Zeni
New user
New user
Posts: 12
Joined: 2013-08-05 18:19

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by Zeni » 2016-06-21 14:02

As instructed, I downloaded SpamAssasin for windows 3.41 from http://www.jam-software.com/spamassassin/index.shtml.
Funny question is that I cannot find any install or setup file. :roll: :roll:

I am using Windows Server 2012. There are some executing files such as spamassasin.exe, spamd.exe, spamc.exe etc. but clicking these only open a cmd windows and nothing else happens. :shock: :shock:

Can someone please guide me how to install SpamAssasin for windows 3.41?

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by SorenR » 2016-06-21 14:29

SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-06-21 15:08

Zeni wrote:As instructed, I downloaded SpamAssasin for windows 3.41 from http://www.jam-software.com/spamassassin/index.shtml.
Funny question is that I cannot find any install or setup file. :roll: :roll:

I am using Windows Server 2012. There are some executing files such as spamassasin.exe, spamd.exe, spamc.exe etc. but clicking these only open a cmd windows and nothing else happens. :shock: :shock:

Can someone please guide me how to install SpamAssasin for windows 3.41?
http://www.jam-software.com/spamassassin/download.shtml

Select your system. It then offers an EXE (as well as a ZIP) install executable.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Zeni
New user
New user
Posts: 12
Joined: 2013-08-05 18:19

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by Zeni » 2016-06-22 16:31

Thanks to all. With the help of answers and of course the direction by jimimaseye I am finally able to install and run SpamAssasin and use it with hmailServer. What a relief, hope to get rid of all those spams.

MrGadget
Normal user
Normal user
Posts: 44
Joined: 2011-10-23 23:47
Location: Midwest USA

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by MrGadget » 2016-07-18 18:23

Adding this because it caught me out....

Make sure in HMS Settings > Advanced > IP Ranges you have Anti-Spam checked for the appropriate ranges.

Mrj
New user
New user
Posts: 1
Joined: 2016-09-24 11:29

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by Mrj » 2016-09-24 11:34

Same problem as Zeni.
I downloaded the exe version as directed by Jimimayasey.
Reviewed JAM's manual on "Installation" which says run the "Setup" file.
But there is NO SETUP FILE in the entire directory for the Spamassassin.
What's the deal???

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2016-09-24 19:11

The answer is above.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

bluepen61
New user
New user
Posts: 1
Joined: 2010-04-24 15:42

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by bluepen61 » 2017-07-09 15:44

comp1mp wrote:What version of nssm did you use? I can't get this to work with 2.2.4.

The service installs but upon starting it immediately pauses.
nssm1.png
nssm2.png


spamd.exe is giving a return code of 2 in event logs.

Also are you running the 32 bit version of SpamAssassin?

Thanks,
Matthew
I have been running SpamAssassin for quite some time on my windows 10 pro pc and this error cropped up on 4/13/2017. I just discovered it this week after my e-mail account began getting flooded with spam. On 4/13 a slew of Microsoft Updates were applied. Any suggestions?

Btw, I tried uninstalling and reinstalling both the program and the spamd service. Neither fixed it.

I am running 64 bit.

Edit:
I fixed it by uninstalling the service, then updating nssm to 101, then reinstalling the service. Works!!

John
Last edited by bluepen61 on 2017-07-09 15:56, edited 1 time in total.

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2017-07-09 15:51

See the previous posters solution: viewtopic.php?p=184866#p184866

He suggests its related to 'round-robin' but I was unable to produce it.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

planck
New user
New user
Posts: 28
Joined: 2016-07-02 13:05

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by planck » 2020-12-17 23:30

Hi there,

I installed exactly as described above.

But when I turn on spam assassin on hmailserver and click on test, i get:

-----

The directory name is invalid.


ExceptionType: IOException
HelpLine:
Message: The directory name is invalid.

Source: mscorlib
StackTrace: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.__Error.WinIOError()
at System.IO.Path.GetTempFileName()
at hMailServer.Administrator.ucAntiSpam.buttonTest_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
TargetSite: Void WinIOError(Int32, System.String)

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by mattg » 2020-12-18 00:10

run this and post the results
viewtopic.php?f=20&t=30914

ALSO, where have you installed spamassassin
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

planck
New user
New user
Posts: 28
Joined: 2016-07-02 13:05

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by planck » 2020-12-31 21:03

Hi,

I have installed SpamAssassin in the default dir:

"C:\Program Files\JAM Software\SpamAssassin for Windows"

The service seems to be running, but I still get that error.

Thanks
Alex

planck
New user
New user
Posts: 28
Joined: 2016-07-02 13:05

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by planck » 2020-12-31 21:06

When I run that script i get:

---------------------------
Windows Script Host
---------------------------
Script: C:\Users\Administrator\Desktop\HMSSettingsDiagnostics.vbs
Line: 50
Char: 4
Error: Path not found
Code: 800A004C
Source: Microsoft VBScript runtime error

---------------------------
OK
---------------------------

planck
New user
New user
Posts: 28
Joined: 2016-07-02 13:05

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by planck » 2020-12-31 21:18

I rebooted the server and everything is fixed :)

Happy new year.
Alex

User avatar
ap44
New user
New user
Posts: 16
Joined: 2018-07-28 13:30
Location: Germany

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by ap44 » 2021-01-10 16:39

jimimaseye wrote:
2015-04-27 11:13

Spamassassin requires definition updates (almost daily) just like an AV software. This is achieved by running the following command:

Code: Select all

net stop spamassassin
sa-update.exe -v --nogpg --channelfile UpdateChannels.txt
net start spamassassin
You should include this command daily either by your regular housekeeping backup script or by Task Scheduler not forgetting to refer to the correct path.
Is it important that for the time of the update, the service is stopped?
In my script I stop the service after the updates, so that it is down for a shorter time. Does this make sense?

Code: Select all

sa-update.exe -v --nogpg --channelfile UpdateChannels.txt
net stop spamassassin
net start spamassassin
hMailServer-5.7.0-B2604-x64 (MariaDB 10.8.x), SpamAssassin in productive use :D
"SENT: Too many invalid commands. Bye!" :mrgreen:

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by SorenR » 2021-01-10 17:10

This should be sufficient.

Code: Select all

sa-update.exe -v --nogpg --channelfile UpdateChannels.txt
net stop spamassassin && net start spamassassin
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

planck
New user
New user
Posts: 28
Joined: 2016-07-02 13:05

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by planck » 2021-05-28 13:05

Hi all,

I have set up SpamAssassin as described in the first few posts in this thread.

However, it doesn't seem to work. I still receive the same spam as before. What has changed is that SOME spam (not all) includes the score in the subject, f.e. [3.4].

Is this a misconfiguration or...?

Thanks
Alex

planck
New user
New user
Posts: 28
Joined: 2016-07-02 13:05

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by planck » 2021-05-28 13:14

Here's an example that happened just now. This is clearly spam, and Mail on MacOS also identified it as spam:

Fri May 28 14:10:16 2021 [-4644] info: spamd: processing message <lbh8yjpbvjuikfih-01xyn7v045oxr3de-b3fe-13b9@wifibuds.us> for (unknown):0
Fri May 28 14:10:18 2021 [-4644] info: spamd: clean message (2.6/3.0) for (unknown):0 in 2.0 seconds, 7733 bytes.
Fri May 28 14:10:18 2021 [-4644] info: spamd: result: . 2 - BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK,URIBL_ABUSE_SURBL,URIBL_BLOCKED scantime=2.0,size=7733,user=(unknown),uid=0,required_score=3.0,rhost=NTL-mail,raddr=127.0.0.1,rport=49887,mid=<lbh8yjpbvjuikfih-01xyn7v045oxr3de-b3fe-13b9@wifibuds.us>,bayes=0.000000,autolearn=no autolearn_force=no

User avatar
jimimaseye
Moderator
Moderator
Posts: 10053
Joined: 2011-09-08 17:48

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by jimimaseye » 2021-05-28 13:35

That very much looks like it is working.

You have a score.
You have Spamassassin headers

ergo, Spamassassin is installed and operating.

The Score is depending on Spamassassin rules (that header shows -2 but you havent pasted the full report).

You might want to review viewtopic.php?t=36118
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

palinka
Senior user
Senior user
Posts: 4455
Joined: 2017-09-12 17:57

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by palinka » 2021-05-28 15:32

Also have a look at this thread for training spamassassin: https://hmailserver.com/forum/viewtopic ... 20&t=26866

User avatar
coax
Normal user
Normal user
Posts: 80
Joined: 2016-12-22 16:35
Location: Croatia
Contact:

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by coax » 2021-10-23 14:18

Has anyone updated SpamAssassin for Windows to version 3.4.4? It works, but when learning HAM/SPAM I get additional error registryboundaries: no tlds defined, need to run sa-update:

Code: Select all

...
Learned tokens from 10 message(s) (10 message(s) examined)

config: registryboundaries: no tlds defined, need to run sa-update
config: registryboundaries: no tlds defined, need to run sa-update
...
Running sa-update does not fix the issue. In SA changelog for version 3.4.3 there's an entry about this:

Code: Select all

- RegistryBoundaries did not load 20_aux_tlds.cf properly in older versions. 
  Old hardcoded list is now removed and RB will print "no tlds defined, need
  to run sa-update" unless it can find list from config files.
I have that file (20_aux_tlds.cf) in my updates folder already.

My local.cf file:

Code: Select all

required_score 3.0
report_safe 0
remove_header ham Level
remove_header ham Status
report_hostname [MASKED]

use_bayes 1
bayes_path C:\Users\Administrator\.spamassassin\bayes
bayes_auto_learn 0
bayes_ignore_header X-Spam-Flag
bayes_ignore_header X-Spam-Status

# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
# Only a small subset of options are listed below
...
Any help appreciated.
hMailServer web-interface redesign: https://www.hmailserver.com/forum/viewtopic.php?t=30713
Get alert when queue has 100+ messages: https://www.hmailserver.com/forum/viewtopic.php?t=31345

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 14:48

Hi coax,
I get exactly the same when using sa-learn, but not when using spamc -L (spamd must be configured to run with --allow-tell for this to work)
-L learn type
Send message to spamd for learning. The learn type can be either spam, ham or forget. The exitcode for spamc will be set to 5 if the message was learned, or 6 if it was already learned.
Note that the spamd must run with the --allow-tell option for this to work
Maybe you should file a inquiry/bug report to JAM, from past experience i know they will definitely respond
https://customers.jam-software.de/conta ... cle_no=410
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 15:31

As far as i understand, all Jams compiled SA executable's use the paths configured in path.config, my best guess, with the change introduced in SA 3.4.3 as noted by you earlier sa-learn doesn't know where to locate the updates folder, so perhaps sa-learn is compiled not knowing to look in path.config for location
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by katip » 2021-10-23 15:34

coax wrote:
2021-10-23 14:18
Has anyone updated SpamAssassin for Windows to version 3.4.4? It works, but when learning HAM/SPAM I get additional error registryboundaries: no tlds defined, need to run sa-update:

Code: Select all

...
Learned tokens from 10 message(s) (10 message(s) examined)

config: registryboundaries: no tlds defined, need to run sa-update
config: registryboundaries: no tlds defined, need to run sa-update
...
using here (version.txt):

Code: Select all

SpamAssassin for Windows: 3.4.4.42
Apache SpamAssassin: 3.4.4
never seen that error. batch file:

Code: Select all

echo %DATE% %TIME% - START >> C:\sa\Logs\sa-learn.log
echo SPAM: >> C:\sa\Logs\sa-learn.log
C:\sa\sa-learn.exe --use-ignores --max-size 0 --D --siteconfigpath="C:\sa\etc\spamassassin" --dbpath="C:\Windows\System32\config\systemprofile\.spamassassin\bayes" --spam "c:\SA\err\spam" >> C:\sa\Logs\sa-learn.log
echo HAM: >> C:\sa\Logs\sa-learn.log
C:\sa\sa-learn.exe --use-ignores --max-size 0 --D --siteconfigpath="C:\sa\etc\spamassassin" --dbpath="C:\Windows\System32\config\systemprofile\.spamassassin\bayes" --ham "c:\SA\err\ham" >> C:\sa\Logs\sa-learn.log
C:\sa\sa-learn.exe --siteconfigpath="C:\sa\etc\spamassassin" --dbpath="C:\Windows\System32\config\systemprofile\.spamassassin\bayes" --sync
del C:\sa\err\SPAM\*.* /Q
del C:\sa\err\HAM\*.* /Q
echo %DATE% %TIME% - END >> C:\sa\Logs\sa-learn.log
echo ================================================================ >> C:\sa\Logs\sa-learn.log
an output from this morning:

Code: Select all

================================================================ 
Sat 10/23/2021  8:20:10.12 - START 
SPAM: 
Learned tokens from 1 message(s) (1 message(s) examined)
HAM: 
Learned tokens from 0 message(s) (0 message(s) examined)
Sat 10/23/2021  8:20:19.97 - END 
================================================================ 
--siteconfigpath="C:\sa\etc\spamassassin" ??
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by SorenR » 2021-10-23 16:45

RvdH wrote:
2021-10-23 15:31
As far as i understand, all Jams compiled SA executable's use the paths configured in path.config, my best guess, with the change introduced in SA 3.4.3 as noted by you earlier sa-learn doesn't know where to locate the updates folder, so perhaps sa-learn is compiled not knowing to look in path.config for location
It never really did... My initial post in SpamAssassin Bootcamp (sa-learn) train BAYES ( 7 years ago ) specifies "--siteconfigpath=" for sa-learn ...

viewtopic.php?f=20&t=26866&p=164777&hil ... th#p164777
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 17:06

SorenR wrote:
2021-10-23 16:45
RvdH wrote:
2021-10-23 15:31
As far as i understand, all Jams compiled SA executable's use the paths configured in path.config, my best guess, with the change introduced in SA 3.4.3 as noted by you earlier sa-learn doesn't know where to locate the updates folder, so perhaps sa-learn is compiled not knowing to look in path.config for location
It never really did... My initial post in SpamAssassin Bootcamp (sa-learn) train BAYES ( 7 years ago ) specifies "--siteconfigpath=" for sa-learn ...

viewtopic.php?f=20&t=26866&p=164777&hil ... th#p164777
Except including/missing --siteconfigpath parameter seems to have nothing to do with this error and was just a suggestion by Katip, i get that error with and without --siteconfigpath :!: :?:

Not to mention 20_aux_tlds.cf is located in a different folder anyway, eg: C:\Program Files\JAM Software\SpamAssassin for Windows\share\3.004004\updates_spamassassin_org or C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\3.004004\updates_spamassassin_org
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 17:50

SorenR wrote:
2021-10-23 16:45
It never really did... My initial post in SpamAssassin Bootcamp (sa-learn) train BAYES ( 7 years ago ) specifies "--siteconfigpath=" for sa-learn ...

viewtopic.php?f=20&t=26866&p=164777&hil ... th#p164777
Please explain why it finds all my custom .cf files and custom local.cf settings when running

Code: Select all

sa-learn --debug --spam "E:\Email\Spam"
(eg: without --siteconfigpath parameter)
Oct 23 17:40:51.660 [9132] dbg: logger: adding facilities: all
Oct 23 17:40:51.660 [9132] dbg: logger: logging level is DBG
Oct 23 17:40:51.660 [9132] dbg: generic: SpamAssassin version 3.4.4
Oct 23 17:40:51.660 [9132] dbg: generic: Perl 5.030000, PREFIX=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\runtime, DEF_RULES_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\spamassassin, LOCAL_RULES_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin, LOCAL_STATE_DIR=..\share
Oct 23 17:40:51.660 [9132] dbg: config: timing enabled
Oct 23 17:40:51.660 [9132] dbg: config: score set 0 chosen.
Oct 23 17:40:51.663 [9132] dbg: util: running in taint mode? no
Oct 23 17:40:51.663 [9132] dbg: util: defining getpwuid() wrapper using 'unknown' as username
Oct 23 17:40:51.665 [9132] dbg: config: using "C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin" for site rules pre files
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/init.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/local.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v310.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v312.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v320.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v330.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v340.pre
Oct 23 17:40:51.666 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v341.pre
Oct 23 17:40:51.667 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v342.pre
Oct 23 17:40:51.667 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/v343.pre
Oct 23 17:40:51.667 [9132] dbg: config: using "C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\spamassassin" for sys rules pre files
Oct 23 17:40:51.667 [9132] dbg: config: using "C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\spamassassin" for default rules dir
Oct 23 17:40:51.667 [9132] dbg: config: using "C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin" for site rules dir
Oct 23 17:40:51.669 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/21_barracuda.cf
Oct 23 17:40:51.669 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/21_extra_dnsbl.cf
Oct 23 17:40:51.669 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/21_spamrats_dnsbl.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/70_blacklist.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/71_whitelist_from.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/71_whitelist_from_dkim.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/71_whitelist_from_spf.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/72_whitelist_auth.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/72_whitelist_auth_banking.cf
Oct 23 17:40:51.670 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/72_whitelist_auth_be_cities.cf
Oct 23 17:40:51.671 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/72_whitelist_auth_nl_cities.cf
Oct 23 17:40:51.671 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/72_whitelist_auth_nl_minbzk.cf
Oct 23 17:40:51.671 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/80_localphishing.cf
Oct 23 17:40:51.671 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/80_phishing.cf
Oct 23 17:40:51.671 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/81_spf_softfail.cf
Oct 23 17:40:51.671 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/99_misc.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/99_no_russian_mail.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/DecodeShortURLs.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/FMBLA.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/HashBL.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/OLEVBMacro.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/Phishing.cf
Oct 23 17:40:51.672 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/RelayCountry.cf
Oct 23 17:40:51.673 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/contact.cf
Oct 23 17:40:51.673 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/countries.nerd.dk.cf
Oct 23 17:40:51.673 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/iXhash2.cf
Oct 23 17:40:51.673 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/jam_virus_bounce_rules.cf
Oct 23 17:40:51.673 [9132] dbg: config: read file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/local.cf
Oct 23 17:40:51.676 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayCountry from @INC
Oct 23 17:40:51.677 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::URIDNSBL from @INC
Oct 23 17:40:51.681 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::Hashcash from @INC
Oct 23 17:40:51.686 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::SPF from @INC
Oct 23 17:40:51.690 [9132] dbg: config: fixed relative path: C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin/iXhash2.pm
Oct 23 17:40:51.690 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::iXhash2 from C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin\iXhash2.pm
Oct 23 17:40:51.694 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::OLEVBMacro from @INC
Oct 23 17:40:51.749 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::Razor2 from @INC
Oct 23 17:40:51.795 [9132] dbg: razor2: razor2 is available, version 2.84
Oct 23 17:40:51.795 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::SpamCop from @INC
Oct 23 17:40:51.865 [9132] dbg: reporter: network tests on, attempting SpamCop
Oct 23 17:40:51.866 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::AutoLearnThreshold from @INC
Oct 23 17:40:51.867 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::TextCat from @INC
Oct 23 17:40:51.868 [9132] dbg: textcat: loading languages file C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\spamassassin/languages
Oct 23 17:40:51.891 [9132] dbg: textcat: loaded 73 language models
Oct 23 17:40:51.893 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::WhiteListSubject from @INC
Oct 23 17:40:51.894 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::MIMEHeader from @INC
Oct 23 17:40:51.895 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::ReplaceTags from @INC
Oct 23 17:40:51.896 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::DKIM from @INC
Oct 23 17:40:51.900 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::Check from @INC
Oct 23 17:40:51.906 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::HTTPSMismatch from @INC
Oct 23 17:40:51.907 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::URIDetail from @INC
Oct 23 17:40:51.908 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::Shortcircuit from @INC
Oct 23 17:40:51.909 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::Bayes from @INC
Oct 23 17:40:51.918 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::BodyEval from @INC
Oct 23 17:40:51.920 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::DNSEval from @INC
Oct 23 17:40:51.923 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::HTMLEval from @INC
Oct 23 17:40:51.925 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::HeaderEval from @INC
Oct 23 17:40:51.931 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::MIMEEval from @INC
Oct 23 17:40:51.934 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::RelayEval from @INC
Oct 23 17:40:51.936 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::URIEval from @INC
Oct 23 17:40:51.937 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::WLBLEval from @INC
Oct 23 17:40:51.940 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::VBounce from @INC
Oct 23 17:40:51.940 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::ASN from @INC
Oct 23 17:40:51.942 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::ImageInfo from @INC
Oct 23 17:40:51.944 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::FreeMail from @INC
Oct 23 17:40:51.948 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::AskDNS from @INC
Oct 23 17:40:51.952 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::TxRep from @INC
Oct 23 17:40:51.957 [9132] dbg: TxRep: new object created
Oct 23 17:40:51.957 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::HashBL from @INC
Oct 23 17:40:51.961 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::FromNameSpoof from @INC
Oct 23 17:40:51.963 [9132] dbg: plugin: loading Mail::SpamAssassin::Plugin::Phishing from @INC
Oct 23 17:40:51.965 [9132] dbg: shortcircuit: adding RCVD_IN_ZEN_LASTEXTERNAL using abbreviation spam
Oct 23 17:40:51.996 [9132] dbg: shortcircuit: adding EU_BUSINESS_REGISTER using abbreviation spam
Oct 23 17:40:51.997 [9132] dbg: shortcircuit: adding WBLIST using abbreviation spam
Oct 23 17:40:52.000 [9132] dbg: shortcircuit: adding VP_TRUSTED using abbreviation ham
Oct 23 17:40:52.036 [9132] dbg: config: not allowing user rules!
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for URI_IN_RU
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for MIMEPART_NAME_RU
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for HDR_CYR
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for HDR_CCTLD_RU
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for CONTENT_CYR_UTF8
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for HDR_ADDR_CYR_UTF8
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for VBOUNCE_BODY_DETECT
Oct 23 17:40:52.039 [9132] dbg: config: warning: no description set for NEWDOMAIN_FMBLA_URIBL
Oct 23 17:40:52.039 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::ReplaceTags=HASH(0x4612b84) implements 'finish_parsing_start', priority 0
Oct 23 17:40:52.047 [9132] dbg: rules: __DNSHOSTINGPHISH_1 merged duplicates: __PHISH_FROM_SIDN_1
Oct 23 17:40:52.047 [9132] dbg: rules: __HRD_RECIPIENT_RU merged duplicates: __HRD_SENDER_RU
Oct 23 17:40:52.047 [9132] dbg: config: finish parsing
config: registryboundaries: no tlds defined, need to run sa-update
Oct 23 17:40:52.050 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::ReplaceTags=HASH(0x4612b84) implements 'finish_parsing_end', priority 0
Oct 23 17:40:52.050 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::FreeMail=HASH(0x3aa4d34) implements 'finish_parsing_end', priority 0
Oct 23 17:40:52.050 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::HashBL=HASH(0x3aa51b4) implements 'finish_parsing_end', priority 0
Oct 23 17:40:52.050 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Phishing=HASH(0x48c4ccc) implements 'finish_parsing_end', priority 0
Oct 23 17:40:52.051 [9132] dbg: replacetags: replacing tags
Oct 23 17:40:52.051 [9132] dbg: FreeMail: no freemail_domains entries defined, disabling plugin
Oct 23 17:40:52.237 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c) implements 'learner_new', priority 0
Oct 23 17:40:52.237 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::TxRep=HASH(0x3aa4f74) implements 'learner_new', priority 0
Oct 23 17:40:52.237 [9132] dbg: bayes: learner_new self=Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c), bayes_store_module=Mail::SpamAssassin::BayesStore::DBM
Oct 23 17:40:52.247 [9132] dbg: bayes: learner_new: got store=Mail::SpamAssassin::BayesStore::DBM=HASH(0x48cb2fc)
Oct 23 17:40:52.248 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c) implements 'learner_is_scan_available', priority 0
Oct 23 17:40:52.248 [9132] dbg: bayes: tie-ing to DB file R/O C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes_toks
Oct 23 17:40:52.248 [9132] dbg: bayes: tie-ing to DB file R/O C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes_seen
Oct 23 17:40:52.249 [9132] dbg: bayes: found bayes db version 3
Oct 23 17:40:52.249 [9132] dbg: bayes: opportunistic call attempt skipped, found fresh running expire magic token
Oct 23 17:40:52.249 [9132] dbg: config: score set 3 chosen.
Oct 23 17:40:52.256 [9132] dbg: dns: EDNS, UDP payload size 4096
Oct 23 17:40:52.256 [9132] dbg: dns: servers set by config to: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.256 [9132] dbg: dns: nameservers set to 127.0.0.1, ::1
Oct 23 17:40:52.256 [9132] dbg: dns: using socket module: IO::Socket::IP version 0.39
Oct 23 17:40:52.256 [9132] dbg: dns: is Net::DNS::Resolver available? yes
Oct 23 17:40:52.256 [9132] dbg: dns: Net::DNS version: 1.2
Oct 23 17:40:52.256 [9132] dbg: sa-learn: spamtest initialized
Oct 23 17:40:52.257 [9132] dbg: learn: initializing learner
Oct 23 17:40:52.257 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c) implements 'learner_sync', priority 0
Oct 23 17:40:52.257 [9132] dbg: bayes: bayes journal sync starting
Oct 23 17:40:52.257 [9132] dbg: locker: safe_lock: trying to get lock on C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes with 0 retries
Oct 23 17:40:52.258 [9132] dbg: locker: safe_lock: link to C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes.lock: sysopen ok
Oct 23 17:40:52.258 [9132] dbg: bayes: tie-ing to DB file R/W C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes_toks
Oct 23 17:40:52.259 [9132] dbg: bayes: tie-ing to DB file R/W C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes_seen
Oct 23 17:40:52.259 [9132] dbg: bayes: found bayes db version 3
Oct 23 17:40:52.260 [9132] dbg: locker: refresh_lock: refresh C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes.lock
Oct 23 17:40:52.262 [9132] dbg: bayes: synced databases from journal in 0 seconds: 81 unique entries (81 total entries)
Oct 23 17:40:52.263 [9132] dbg: bayes: bayes journal sync completed
Oct 23 17:40:52.263 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c) implements 'learner_expire_old_training', priority 0
Oct 23 17:40:52.263 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::TxRep=HASH(0x3aa4f74) implements 'learner_expire_old_training', priority 0
Oct 23 17:40:52.263 [9132] dbg: bayes: expiry starting
Oct 23 17:40:52.263 [9132] dbg: locker: refresh_lock: refresh C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes.lock
Oct 23 17:40:52.263 [9132] dbg: locker: refresh_lock: refresh C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes.lock
Oct 23 17:40:52.263 [9132] dbg: bayes: DB expiry: tokens in DB: 131332, Expiry max size: 150000, Oldest atime: 1628489972, Newest atime: 1635003436, Last expire: 1634019277, Current time: 1635003652
Oct 23 17:40:52.263 [9132] dbg: bayes: expiry completed
Oct 23 17:40:52.263 [9132] dbg: TxRep: expiry not implemented yet
Oct 23 17:40:52.264 [9132] dbg: archive-iterator: _set_default_message_selection_opts After: Scanprob[1], want_date[0], cache[0], from_regex[^From \S+ ?(\S\S\S \S\S\S .?\d .?\d:\d\d:\d\d \d{4}|.?\d-\d\d-\d{4}_\d\d:\d\d:\d\d_)]
Oct 23 17:40:52.264 [9132] dbg: config: time limit 300.0 s
Oct 23 17:40:52.265 [9132] dbg: message: line ending changed to CRLF
Oct 23 17:40:52.265 [9132] dbg: message: main message type: text/plain
Oct 23 17:40:52.265 [9132] dbg: markup: removing markup
Oct 23 17:40:52.266 [9132] dbg: config: time limit 300.0 s
Oct 23 17:40:52.266 [9132] dbg: message: line ending changed to CRLF
Oct 23 17:40:52.267 [9132] dbg: message: main message type: text/plain
Oct 23 17:40:52.267 [9132] dbg: message: ---- MIME PARSER START ----
Oct 23 17:40:52.267 [9132] dbg: message: parsing normal part
Oct 23 17:40:52.267 [9132] dbg: message: storing a body to memory
Oct 23 17:40:52.267 [9132] dbg: message: ---- MIME PARSER END ----
Oct 23 17:40:52.267 [9132] dbg: learn: learning spam
Oct 23 17:40:52.267 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c) implements 'learn_message', priority 0
Oct 23 17:40:52.267 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::TxRep=HASH(0x3aa4f74) implements 'learn_message', priority 0
Oct 23 17:40:52.267 [9132] dbg: check: pms new, time limit in 299.999 s
Oct 23 17:40:52.270 [9132] dbg: received-header: parsed as [ ip=209.85.128.66 rdns=mail-wm1-f66.google.com helo=mail-wm1-f66.google.com by=mail.hetcollectief.nl ident= envfrom= intl=0 id= auth= msa=0 ]
Oct 23 17:40:52.271 [9132] dbg: netset: trusted_networks lookup on 209.85.128.66, 38 networks, result: 0, 0.680 ms
Oct 23 17:40:52.271 [9132] dbg: received-header: relay 209.85.128.66 trusted? no internal? no msa? no
Oct 23 17:40:52.283 [9132] dbg: received-header: parsed as [ ip=102.64.213.251 rdns= helo=!192.168.1.76! by=smtp.gmail.com ident= envfrom= intl=0 id=73sm5045850wmb.40.2021.10.15.06.13.19 auth=ESMTPSA msa=0 ]
Oct 23 17:40:52.283 [9132] dbg: received-header: relay 102.64.213.251 trusted? no internal? no msa? no
Oct 23 17:40:52.283 [9132] dbg: metadata: X-Spam-Relays-Trusted:
Oct 23 17:40:52.283 [9132] dbg: metadata: X-Spam-Relays-Untrusted: [ ip=209.85.128.66 rdns=mail-wm1-f66.google.com helo=mail-wm1-f66.google.com by=mail.hetcollectief.nl ident= envfrom= intl=0 id= auth= msa=0 ] [ ip=102.64.213.251 rdns= helo=!192.168.1.76! by=smtp.gmail.com ident= envfrom= intl=0 id=73sm5045850wmb.40.2021.10.15.06.13.19 auth=ESMTPSA msa=0 ]
Oct 23 17:40:52.283 [9132] dbg: metadata: X-Spam-Relays-Internal:
Oct 23 17:40:52.283 [9132] dbg: metadata: X-Spam-Relays-External: [ ip=209.85.128.66 rdns=mail-wm1-f66.google.com helo=mail-wm1-f66.google.com by=mail.hetcollectief.nl ident= envfrom= intl=0 id= auth= msa=0 ] [ ip=102.64.213.251 rdns= helo=!192.168.1.76! by=smtp.gmail.com ident= envfrom= intl=0 id=73sm5045850wmb.40.2021.10.15.06.13.19 auth=ESMTPSA msa=0 ]
Oct 23 17:40:52.283 [9132] dbg: check: tagrun - tag RELAYSUNTRUSTEDREVIP is now ready, value: ARY:[66.128.85.209,251.213.64.102]
Oct 23 17:40:52.284 [9132] dbg: check: tagrun - tag RELAYSEXTERNALREVIP is now ready, value: ARY:[66.128.85.209,251.213.64.102]
Oct 23 17:40:52.284 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::RelayCountry=HASH(0x3ccfba4) implements 'extract_metadata', priority 0
Oct 23 17:40:52.284 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::TextCat=HASH(0x462a47c) implements 'extract_metadata', priority 0
Oct 23 17:40:52.529 [9132] dbg: metadata: RelayCountry: Using database: GeoIP2 GeoLite2 Country database / Tue Oct 12 14:37:54 2021
Oct 23 17:40:52.559 [9132] dbg: metadata: X-Relay-Countries: US TG
Oct 23 17:40:52.559 [9132] dbg: check: tagrun - tag RELAYCOUNTRY is now ready, value: ARY:[US,TG]
Oct 23 17:40:52.559 [9132] dbg: metadata: X-Relay-Countries-External: US TG
Oct 23 17:40:52.559 [9132] dbg: check: tagrun - tag RELAYCOUNTRYEXT is now ready, value: ARY:[US,TG]
Oct 23 17:40:52.559 [9132] dbg: metadata: X-Relay-Countries-Auth:
Oct 23 17:40:52.559 [9132] dbg: check: tagrun - tag RELAYCOUNTRYAUTH is now ready, value: ARY:[]
Oct 23 17:40:52.559 [9132] dbg: metadata: X-Relay-Countries-All: US TG
Oct 23 17:40:52.559 [9132] dbg: check: tagrun - tag RELAYCOUNTRYALL is now ready, value: ARY:[US,TG]
Oct 23 17:40:52.559 [9132] dbg: message: decoding quoted-printable
Oct 23 17:40:52.559 [9132] dbg: textcat: message too short for language analysis
Oct 23 17:40:52.559 [9132] dbg: textcat: X-Languages: "", X-Languages-Length: 179
Oct 23 17:40:52.560 [9132] dbg: uri: canonicalizing domainkeys uri: domainkeys:gmail.com
Oct 23 17:40:52.560 [9132] dbg: uri: cleaned uri: domainkeys:gmail.com
Oct 23 17:40:52.561 [9132] dbg: locker: refresh_lock: refresh C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes.lock
Oct 23 17:40:52.561 [9132] dbg: bayes: e0c6bd5f7ffe425e54b5be6c24832842965d23ac@sa_generated already learnt correctly, not learning twice
Oct 23 17:40:52.561 [9132] dbg: TxRep: learning a message
Oct 23 17:40:52.561 [9132] dbg: check: pms new, time limit in 299.705 s
Oct 23 17:40:52.561 [9132] dbg: message: X-Envelope-From header found after 1 or more Received lines, cannot trust envelope-from
Oct 23 17:40:52.561 [9132] dbg: check: tagrun - tag AUTHORDOMAIN is now ready, value: gmail.com
Oct 23 17:40:52.561 [9132] dbg: check: tagrun - tag RELAYSTRUSTED is now ready, value:
Oct 23 17:40:52.561 [9132] dbg: check: tagrun - tag RELAYSUNTRUSTED is now ready, value: [ ip=209.85.128.66 rdns=mail-wm1-f66.google.com helo=mail-wm1-f66.google.com by=mail.hetcollectief.nl ident= envfrom= intl=0 id= auth= msa=0 ] [ ip=102.64.213.251 rdns= helo=!192.168.1.76! by=smtp.gmail.com ident= envfrom= intl=0 id=73sm5045850wmb.40.2021.10.15.06.13.19 auth=ESMTPSA msa=0 ]
Oct 23 17:40:52.561 [9132] dbg: check: tagrun - tag RELAYSINTERNAL is now ready, value:
Oct 23 17:40:52.562 [9132] dbg: check: tagrun - tag RELAYSEXTERNAL is now ready, value: [ ip=209.85.128.66 rdns=mail-wm1-f66.google.com helo=mail-wm1-f66.google.com by=mail.hetcollectief.nl ident= envfrom= intl=0 id= auth= msa=0 ] [ ip=102.64.213.251 rdns= helo=!192.168.1.76! by=smtp.gmail.com ident= envfrom= intl=0 id=73sm5045850wmb.40.2021.10.15.06.13.19 auth=ESMTPSA msa=0 ]
Oct 23 17:40:52.562 [9132] dbg: check: tagrun - tag LANGUAGES is now ready, value:
Oct 23 17:40:52.562 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cd2d24) implements 'parsed_metadata', priority 0
Oct 23 17:40:52.562 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::iXhash2=HASH(0x3dfe37c) implements 'parsed_metadata', priority 0
Oct 23 17:40:52.562 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Shortcircuit=HASH(0x48012bc) implements 'parsed_metadata', priority 0
Oct 23 17:40:52.562 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::ASN=HASH(0x48e30ec) implements 'parsed_metadata', priority 0
Oct 23 17:40:52.562 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::AskDNS=HASH(0x3aa4f8c) implements 'parsed_metadata', priority 0
Oct 23 17:40:52.562 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::FromNameSpoof=HASH(0x48ca6cc) implements 'parsed_metadata', priority 0
Oct 23 17:40:52.562 [9132] dbg: dns: clear_resolver
Oct 23 17:40:52.563 [9132] dbg: dns: EDNS, UDP payload size 4096
Oct 23 17:40:52.563 [9132] dbg: dns: nameservers set to 127.0.0.1, ::1
Oct 23 17:40:52.563 [9132] dbg: dns: using socket module: IO::Socket::IP version 0.39
Oct 23 17:40:52.563 [9132] dbg: dns: is Net::DNS::Resolver available? yes
Oct 23 17:40:52.563 [9132] dbg: dns: Net::DNS version: 1.2
Oct 23 17:40:52.563 [9132] dbg: dns: dns_available set to yes in config file, skipping test
Oct 23 17:40:52.563 [9132] dbg: uri: canonicalizing domainkeys uri: domainkeys:gmail.com
Oct 23 17:40:52.563 [9132] dbg: uri: cleaned uri: domainkeys:gmail.com
Oct 23 17:40:52.563 [9132] dbg: check: tagrun - tag URIHOSTS is now ready, value: ARY:[]
Oct 23 17:40:52.563 [9132] dbg: check: tagrun - tag URIDOMAINS is now ready, value: ARY:[]
Oct 23 17:40:52.564 [9132] dbg: iXhash2: hash method #1: feae4a199c5407bf5e99ad63216d68f0
Oct 23 17:40:52.564 [9132] dbg: iXhash2: hash method #2: aa644fc19e4fbffb456569e084ff0092
Oct 23 17:40:52.568 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.568 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.568 [9132] dbg: dns: connect_sock, resolver: yes
Oct 23 17:40:52.569 [9132] dbg: dns: 64512 configured local ports for DNS queries
Oct 23 17:40:52.569 [9132] dbg: dns: LocalAddr: [0.0.0.0]:61556, name server: [127.0.0.1]:53, module IO::Socket::IP
Oct 23 17:40:52.570 [9132] dbg: dns: resolver socket rx buffer size is 65536 bytes, local port 61556
Oct 23 17:40:52.570 [9132] dbg: dns: providing a callback for id: 2366/IN/A/feae4a199c5407bf5e99ad63216d68f0.ix.dnsbl.manitu.net
Oct 23 17:40:52.570 [9132] dbg: async: starting: IXHASH-A, IXHASH:ix.dnsbl.manitu.net.:feae4a199c5407bf5e99ad63216d68f0 (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.570 [9132] dbg: dns: NIXSPAM_IXHASH lookup start
Oct 23 17:40:52.570 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.570 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.571 [9132] dbg: dns: providing a callback for id: 3107/IN/A/aa644fc19e4fbffb456569e084ff0092.ix.dnsbl.manitu.net
Oct 23 17:40:52.571 [9132] dbg: async: starting: IXHASH-A, IXHASH:ix.dnsbl.manitu.net.:aa644fc19e4fbffb456569e084ff0092 (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.571 [9132] dbg: dns: NIXSPAM_IXHASH lookup start
Oct 23 17:40:52.571 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.571 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.571 [9132] dbg: dns: providing a callback for id: 2512/IN/A/feae4a199c5407bf5e99ad63216d68f0.generic.ixhash.net
Oct 23 17:40:52.571 [9132] dbg: async: starting: IXHASH-A, IXHASH:generic.ixhash.net.:feae4a199c5407bf5e99ad63216d68f0 (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.571 [9132] dbg: dns: GENERIC_IXHASH lookup start
Oct 23 17:40:52.571 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.571 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.571 [9132] dbg: dns: providing a callback for id: 17268/IN/A/aa644fc19e4fbffb456569e084ff0092.generic.ixhash.net
Oct 23 17:40:52.572 [9132] dbg: async: starting: IXHASH-A, IXHASH:generic.ixhash.net.:aa644fc19e4fbffb456569e084ff0092 (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.572 [9132] dbg: dns: GENERIC_IXHASH lookup start
Oct 23 17:40:52.572 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.572 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.572 [9132] dbg: dns: providing a callback for id: 61297/IN/A/feae4a199c5407bf5e99ad63216d68f0.ix.fmb.la
Oct 23 17:40:52.572 [9132] dbg: async: starting: IXHASH-A, IXHASH:ix.fmb.la.:feae4a199c5407bf5e99ad63216d68f0 (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.572 [9132] dbg: dns: FMBLA_IXHASH lookup start
Oct 23 17:40:52.572 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.572 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.572 [9132] dbg: dns: providing a callback for id: 25552/IN/A/aa644fc19e4fbffb456569e084ff0092.ix.fmb.la
Oct 23 17:40:52.572 [9132] dbg: async: starting: IXHASH-A, IXHASH:ix.fmb.la.:aa644fc19e4fbffb456569e084ff0092 (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.572 [9132] dbg: dns: FMBLA_IXHASH lookup start
Oct 23 17:40:52.572 [9132] dbg: check: tagrun - tag SC is now ready, value: CODE(0x5d66e34)
Oct 23 17:40:52.573 [9132] dbg: check: tagrun - tag SCRULE is now ready, value: CODE(0x5d66d74)
Oct 23 17:40:52.573 [9132] dbg: check: tagrun - tag SCTYPE is now ready, value: CODE(0x5d66e94)
Oct 23 17:40:52.573 [9132] dbg: asn: no asn_lookups configured, skipping ASN lookups
Oct 23 17:40:52.573 [9132] dbg: askdns: depend on tags SENDERDOMAIN, rules: SR_SPF_FAIL_ALL, SR_SPF_PASS_ALL, SR_SPF_SOFTFAIL_ALL, SR_SPF_NEUTRAL_ALL
Oct 23 17:40:52.573 [9132] dbg: check: tagrun - action 0 blocking on tags SENDERDOMAIN
Oct 23 17:40:52.573 [9132] dbg: askdns: depend on tags LASTEXTERNALRDNS, rules: FMBLA_RDNS_STATIC, FMBLA_RDNS_GENERIC, FMBLA_RDNS_OUTMX, FMBLA_RDNS_DYNAMIC
Oct 23 17:40:52.573 [9132] dbg: check: tagrun - tag LASTEXTERNALRDNS was ready, action 1 runnable immediately: CODE(0x5d5e224)
Oct 23 17:40:52.573 [9132] dbg: askdns: preparing queries which depend on tags: LASTEXTERNALRDNS => mail-wm1-f66.google.com
Oct 23 17:40:52.573 [9132] dbg: askdns: query template _LASTEXTERNALRDNS_.sa.fmb.la, type A, rules: FMBLA_RDNS_STATIC, FMBLA_RDNS_GENERIC, FMBLA_RDNS_OUTMX, FMBLA_RDNS_DYNAMIC
Oct 23 17:40:52.573 [9132] dbg: askdns: expanded query mail-wm1-f66.google.com.sa.fmb.la, dns key askdns:A:mail-wm1-f66.google.com.sa.fmb.la
Oct 23 17:40:52.573 [9132] dbg: async: launching A/mail-wm1-f66.google.com.sa.fmb.la for askdns:A:mail-wm1-f66.google.com.sa.fmb.la
Oct 23 17:40:52.573 [9132] dbg: dns: bgsend, DNS servers: [127.0.0.1]:53, [::1]:53
Oct 23 17:40:52.573 [9132] dbg: dns: attempt 1/2, trying connect/sendto to [127.0.0.1]:53
Oct 23 17:40:52.573 [9132] dbg: dns: providing a callback for id: 27622/IN/A/mail-wm1-f66.google.com.sa.fmb.la
Oct 23 17:40:52.573 [9132] dbg: async: starting: A, askdns:A:mail-wm1-f66.google.com.sa.fmb.la (timeout 15.0s, min 3.0s)
Oct 23 17:40:52.573 [9132] dbg: dns: askdns:A:mail-wm1-f66.google.com.sa.fmb.la lookup start
Oct 23 17:40:52.573 [9132] dbg: askdns: depend on tags LASTEXTERNALHELO, rules: FMBLA_HELO_BL, FMBLA_HELO_STATIC, FMBLA_HELO_GENERIC, FMBLA_HELO_OUTMX, FMBLA_HELO_DYNAMIC
Oct 23 17:40:52.573 [9132] dbg: check: tagrun - tag LASTEXTERNALHELO was ready, action 2 runnable immediately: CODE(0x5d5e3ec)
Oct 23 17:40:52.573 [9132] dbg: askdns: preparing queries which depend on tags: LASTEXTERNALHELO => mail-wm1-f66.google.com
Oct 23 17:40:52.573 [9132] dbg: askdns: query template _LASTEXTERNALHELO_.sa.fmb.la, type A, rules: FMBLA_HELO_BL, FMBLA_HELO_STATIC, FMBLA_HELO_GENERIC, FMBLA_HELO_OUTMX, FMBLA_HELO_DYNAMIC
Oct 23 17:40:52.573 [9132] dbg: askdns: expanded query mail-wm1-f66.google.com.sa.fmb.la, dns key askdns:A:mail-wm1-f66.google.com.sa.fmb.la
Oct 23 17:40:52.574 [9132] dbg: async: query 27622/IN/A/mail-wm1-f66.google.com.sa.fmb.la already underway, adding no.2 askdns:A:mail-wm1-f66.google.com.sa.fmb.la
Oct 23 17:40:52.574 [9132] dbg: dns: askdns:A:mail-wm1-f66.google.com.sa.fmb.la lookup start
Oct 23 17:40:52.574 [9132] dbg: askdns: depend on tags DKIMDOMAIN, rules: __DKIMWL_BLOCKED, __DKIMWL_WL_BL, __DKIMWL_WL_MED, __DKIMWL_WL_MEDHI, __DKIMWL_WL_HI, __DKIMWL_BULKMAIL, __DKIMWL_FREEMAIL
Oct 23 17:40:52.574 [9132] dbg: check: tagrun - action 3 blocking on tags DKIMDOMAIN
Oct 23 17:40:52.574 [9132] dbg: check: tagrun - action 4 blocking on tags DKIMDOMAIN
Oct 23 17:40:52.574 [9132] dbg: eval: all '*From' addrs: curtisvani0015@gmail.com
Oct 23 17:40:52.576 [9132] dbg: locker: safe_lock: trying to get lock on C:\Windows\SysWOW64\config\systemprofile\.spamassassin\tx-reputation with 0 retries
Oct 23 17:40:52.576 [9132] dbg: locker: safe_lock: link to C:\Windows\SysWOW64\config\systemprofile\.spamassassin\tx-reputation.lock: sysopen ok
Oct 23 17:40:52.576 [9132] dbg: auto-whitelist: tie-ing to DB file of type DB_File R/W in C:\Windows\SysWOW64\config\systemprofile\.spamassassin\tx-reputation
Oct 23 17:40:52.577 [9132] dbg: auto-whitelist: db-based e0c6bd5f7ffe425e54b5be6c24832842965d23ac@sa_generated|ip=none scores 0/0
Oct 23 17:40:52.577 [9132] dbg: check: tagrun - tag TXREP_MSG_ID is now ready, value: 0.0
Oct 23 17:40:52.577 [9132] dbg: check: tagrun - tag TXREP_MSG_ID_COUNT is now ready, value: 0.0
Oct 23 17:40:52.577 [9132] dbg: check: tagrun - tag TXREP_MSG_ID_PRESCORE is now ready, value: 0.0
Oct 23 17:40:52.577 [9132] dbg: TxRep: reputation: none, count: 0, weight: 1.0, delta: 0.000, MSG_ID: e0c6bd5f7ffe425e54b5be6c24832842965d23ac@sa_generated
Oct 23 17:40:52.577 [9132] dbg: TxRep: active, e0c6bd5f7ffe425e54b5be6c24832842965d23ac@sa_generated pre-score: ?, autolearn score: 20, IP: 209.85.128.66, address: curtisvani0015@gmail.com (unsigned)
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: db-based curtisvani0015@gmail.com|ip=209.85 scores 0/0
Oct 23 17:40:52.578 [9132] dbg: TxRep: reputation: none, count: 0, learning: 20, EMAIL_IP: curtisvani0015@gmail.com
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 1, new totscore: 20
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: db-based gmail.com|ip=209.85 scores 0/0
Oct 23 17:40:52.578 [9132] dbg: TxRep: reputation: none, count: 0, learning: 20, DOMAIN: gmail.com
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 1, new totscore: 20
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: db-based _192.168.1.76_|ip=none scores 0/0
Oct 23 17:40:52.578 [9132] dbg: TxRep: reputation: none, count: 0, learning: 20, HELO: !192.168.1.76!
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 1, new totscore: 20
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: db-based curtisvani0015@gmail.com|ip=none scores 0/0
Oct 23 17:40:52.578 [9132] dbg: TxRep: reputation: none, count: 0, learning: 20, EMAIL: curtisvani0015@gmail.com
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 1, new totscore: 20
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: db-based 209.85.128.66|ip=none scores 0/0
Oct 23 17:40:52.578 [9132] dbg: TxRep: reputation: none, count: 0, learning: 20, IP: 209.85.128.66
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 1, new totscore: 20
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: db-based e0c6bd5f7ffe425e54b5be6c24832842965d23ac@sa_generated|ip=none scores 0/0
Oct 23 17:40:52.578 [9132] dbg: TxRep: reputation: none, count: 0, learning: 20, MSG_ID: e0c6bd5f7ffe425e54b5be6c24832842965d23ac@sa_generated
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 1, new totscore: 20
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: add_score: new count: 2, new totscore: 40
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: DB addr list: untie-ing and unlocking
Oct 23 17:40:52.578 [9132] dbg: auto-whitelist: DB addr list: file locked, breaking lock
Oct 23 17:40:52.579 [9132] dbg: locker: safe_unlock: unlink C:\Windows\SysWOW64\config\systemprofile\.spamassassin\tx-reputation.lock
Oct 23 17:40:52.579 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x47eac3c) implements 'learner_close', priority 0
Oct 23 17:40:52.579 [9132] dbg: plugin: Mail::SpamAssassin::Plugin::TxRep=HASH(0x3aa4f74) implements 'learner_close', priority 0
Oct 23 17:40:52.579 [9132] dbg: bayes: untie-ing
Oct 23 17:40:52.606 [9132] dbg: bayes: files locked, now unlocking lock
Oct 23 17:40:52.606 [9132] dbg: locker: safe_unlock: unlink C:\Windows\SysWOW64\config\systemprofile\.spamassassin\bayes.lock
Oct 23 17:40:52.606 [9132] dbg: TxRep: learner_close
Learned tokens from 0 message(s) (1 message(s) examined)
Oct 23 17:40:52.610 [9132] dbg: netset: cache trusted_networks hits/attempts: 0/1, 0.0 %
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 18:03

Looking at above log and a normal spamassassin debug log (spamassassin -D --lint) i think i might have find the reason, eg:

line 4, reads:

LOCAL_STATE_DIR=..\share :!:

should be:

LOCAL_STATE_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share

So, I really think sa-learn doesn't translate the LOCAL_STATE_DIR path in path.config correctly
Last edited by RvdH on 2021-10-23 18:20, edited 2 times in total.
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by katip » 2021-10-23 18:10

RvdH wrote:
2021-10-23 18:03
line 4, reads:

LOCAL_STATE_DIR=..\share :!:
single or double dot?
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
SorenR
Senior user
Senior user
Posts: 6308
Joined: 2006-08-21 15:38
Location: Denmark

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by SorenR » 2021-10-23 18:18

RvdH wrote:
2021-10-23 18:03
Looking at above log and a normal spamassassin debug log (spamassassin -D --lint) i think i might have find the reason, eg:

line 4, reads:

LOCAL_STATE_DIR=..\share :!:

should be:

LOCAL_STATE_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share

So, I really think sa-learn doesn't translate the LOCAL_STATE_DIR path in path.config correctly
Maybe you should try using install paths without SPACEes in them :?: That seem to be the obvious difference between your installation and katip's.
SørenR.

Woke is Marxism advancing through Maoist cultural revolution.

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 18:20

@coax, try this

open C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\runtime\sa-learn or C:\Program Files\JAM Software\SpamAssassin for Windows\runtime\sa-learn (note: file without extension)

after line 36, add: my $LOCAL_STATE_DIR = '..\share'; # substituted at 'make' time

after line 43, add: $LOCAL_STATE_DIR = JAM::Path::local_state_dir() || $LOCAL_STATE_DIR;

after line 243 add: LOCAL_STATE_DIR => $LOCAL_STATE_DIR,


For me this change made the "config: registryboundaries: no tlds defined, need to run sa-update" error vanish, damn i good! :mrgreen:
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by katip » 2021-10-23 18:26

SorenR wrote:
2021-10-23 18:18
Maybe you should try using install paths without SPACEes in them :?: That seem to be the obvious difference between your installation and katip's.
mine reads (original from installation zip package):

Code: Select all

DEF_RULES_DIR=./share/spamassassin
LOCAL_RULES_DIR=./etc/spamassassin
LOCAL_STATE_DIR=./share
a la Linux :lol:
should be fine unless these are somewhere else outside of installation directory and/or with different names.
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 18:34

After above change, same command below returns

Code: Select all

sa-learn --debug --spam "E:\Email\Spam"
Oct 23 18:13:16.546 [5100] dbg: logger: adding facilities: all
Oct 23 18:13:16.546 [5100] dbg: logger: logging level is DBG
Oct 23 18:13:16.546 [5100] dbg: generic: SpamAssassin version 3.4.4
Oct 23 18:13:16.547 [5100] dbg: generic: Perl 5.030000, PREFIX=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\runtime, DEF_RULES_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share\spamassassin, LOCAL_RULES_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\etc\spamassassin, LOCAL_STATE_DIR=C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\share

...
many, many more lines, to large to post at forum but without config: registryboundaries: no tlds defined, need to run sa-update

...

Learned tokens from 0 message(s) (1 message(s) examined)
Oct 23 18:13:19.143 [5100] dbg: netset: cache trusted_networks hits/attempts: 0/1, 0.0 %
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by RvdH » 2021-10-23 19:40

katip wrote:
2021-10-23 15:34
never seen that error.
Are you sure about that?
As you call sa-learn with debug parameter you should be able to find it in your sa-learn.log (if you look at my example it should print that error after loading the config files/plugins and before SA default rules)
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by katip » 2021-10-24 07:07

RvdH wrote:
2021-10-23 19:40
As you call sa-learn with debug parameter you should be able to find it in your sa-learn.log (if you look at my example it should print that error after loading the config files/plugins and before SA default rules)
yes indeed, it's there.
never considered to watch CL output screen.
but i dont get any notification in log file. merely "Learned tokens from x message(s) (x message(s) examined)" :?:
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
coax
Normal user
Normal user
Posts: 80
Joined: 2016-12-22 16:35
Location: Croatia
Contact:

Re: HOW TO: Install Spamassassin For Windows and SPAMD service

Post by coax » 2021-10-24 12:02

RvdH wrote:
2021-10-23 18:20
open C:\Program Files (x86)\JAM Software\SpamAssassin for Windows\runtime\sa-learn or C:\Program Files\JAM Software\SpamAssassin for Windows\runtime\sa-learn (note: file without extension)

Code: Select all

after line 36, add: my $LOCAL_STATE_DIR = '..\share';    # substituted at 'make' time
after line 43, add:  $LOCAL_STATE_DIR = JAM::Path::local_state_dir() || $LOCAL_STATE_DIR;
after line 243 add: LOCAL_STATE_DIR     => $LOCAL_STATE_DIR,
Thanks @RvdH, sa-learn.exe doesn't throw error anymore. How in the world did you figure that out? Comparing sa-learn from 3.4.4 vs 3.4.2 (older version I had until now), they're both same, as well as path.config's!

While we're at it, would it be possible to fix the svnunknown to show something meaningful in header X-Spam-Checker-Version: SpamAssassin 3.4.4 (svnunknown) on [MASKED]?

Edit:
Found a way to remove (svnunknown). In local.cf add line:

Code: Select all

add_header all Checker-Version SpamAssassin _VERSION_ on _HOSTNAME_
hMailServer web-interface redesign: https://www.hmailserver.com/forum/viewtopic.php?t=30713
Get alert when queue has 100+ messages: https://www.hmailserver.com/forum/viewtopic.php?t=31345

Post Reply