Other Tools
From ASSPSMTP
Return to Documentation Home
On This Page |
Other scripts included with ASSP
ASSP is almost entirely self contained in the one assp.pl file. However there are a few tools to assist you maintain your ASSP implementation.
What is rebuildspamdb.pl and how do I use it?
The rebuildspamdb.pl script is used to rebuild your Bayesian spam / non-spam database. It reads through all the files in the spam, notspam, errors/spam, and errors/notspam directories and builds the statistical model that is used to test incoming mail. You should use your operating system's scheduling features to schedule it to be run periodically -- possibly daily or at least weekly. The script should be run in the same folder as the assp.cfg file -- your assp's base (from the configuration page). ''2003-Sep-04 1:25pm jhanna''
What are the updatednsbl and dnsbl.pl tools?
This feature is depreciated in versions 1.0.5 and later. Use the greylist instead.
The updatednsbl.sh and updatednsbl.bat script / batch file is used to download the current list of IP addresses of
spammers from the openrbl.org probject website. It calls wget and bzip2 to retrieve this data and decompress it.
The dnsbl.pl script reads the data from the openrbl format and converts it to an appropriate format for ASSP.
''2003-Oct-22 1:44pm jhanna''
upgrade.pl
The upgrade.pl script was used to assist users of version 0.1.6 to convert their configuration and databases to the 0.2.0 format. If you're upgrading, you can run this program once to help make the change. If you are a new ASSP user you should disregard the upgrade.pl program. The upgrade.pl only appears in releases where it is required. If you are upgrading from 0.1.6 all the way to 0.3.4 (or beyond) you will need to download each of the intermediate releases and run upgrade.pl. Generally upgrade.pl is only required between major releases (ie 0.1.x to 0.2.0 and 0.2.x to 0.3.0), though there could always be exceptions. Upgrade instructions are posted in the mailling list (search the archives) or usually in the release news. ''2003-Sep-04 1:26pm jhanna''
repair.pl
The repair.pl script can be run at any time if you suspect your sorted hash files (whitelist, redlist, and/or dnsbl) have become corrupted. This can happen if your system runs out of free disk space, or conceivably in a hard crash (although this is unlikely). Run the script and it will load, resort and write the sorted hash files. To repair the spamdb file run rebuildspamdb.pl. ''2003-Oct-22 2:06pm jhanna''
move2num.pl
If you have been using ASSP with the UseSubjectsAsMaillogNames option you will find it much easier to identify spam emails. However when you are ready to start normal operation you need to rename all these files to numbers so that they get overwritten in time with newer (more modern) spam/nonspam. The move2num.pl script accomplishes this for you. You can also use this script if you have manually moved a number of files into the spam/nonspam folders and want to convert their filenames to ASSP's numbers. perl move2num.pl -r Note that ASSP reads all files in the directories irregardless of their name, so numbers or words for filenames is fine. However filenames that aren't numbers will remain eternally in the spam / nonspam folders and never be rotated out. Note also that the errors/spam and errors/notspam folders are not processed in this way -- the files always remain in these folders indefinitely. ''2003-Sep-04 1:28pm jhanna''
stat.pl
To list statistics from your maillog.txt file do the following:
Perl stat.pl maillog.txt
Your results should look something like this:
As of Thu Mar 27 10:48:54 2003 the mail logfile shows:
78843 messages, 47637 were spam (60.4%) in 73 days
for 1080.0 messages per day or 652.6 spams per day
8303 additions to / verifications of the whitelist (113.7 per day)
28273 were judged spam by the bayesian filter (59.4% of spam)
18862 were to spam addresses (39.6% of spam)
502 were rejected for executable attachments (1% of spam)
12608 were sent from local clients (40.4% of nonspam)
7838 were from whitelisted addresses (25.1% of nonspam)
10760 were ok after a bayesian check (34.5% of nonspam)
14467 addresses are on the whitelist
15108 hits on the blacklist
14890 resulted in spam (52.7% of Bayesian spam, 98.6% of blacklist hits)
218 resulted in non-spam (1.443% of blacklist hits)
''2003-Sep-04 1:28pm jhanna''
goodhosts.pl
This feature is depreciated in versions 1.0.5 and later. Use the greylist instead.
For an explanation of what goodhosts is see (Xref) What is goodhosts and what does it do?
It is possible that your goodhosts file can become corrupted. To know if you're affected, look at
the end of your goodhosts file -- the last two entries should be something like this:
notspam?3000
spam?52384
(Your numbers will be different). If either or both of these lines are missing, or if you're just paranoid, do this:
1) stop assp
2) do:
perl goodhosts.pl maillog.txt
(if you have more than one maillog handy you can list as many as you like, but put them in order getting older by date)
3) start assp
''2003-Oct-22 1:44pm jhanna''
Return to Documentation Home


