diff options
Diffstat (limited to 'mail/assp/files')
-rw-r--r-- | mail/assp/files/assp.8.in | 7 | ||||
-rw-r--r-- | mail/assp/files/assp.in (renamed from mail/assp/files/assp.sh.in) | 0 | ||||
-rw-r--r-- | mail/assp/files/assplog.8.in | 6 | ||||
-rw-r--r-- | mail/assp/files/patch-assp.pl | 57 | ||||
-rw-r--r-- | mail/assp/files/patch-stats.sh | 225 | ||||
-rw-r--r-- | mail/assp/files/pkg-install.in | 6 |
6 files changed, 185 insertions, 116 deletions
diff --git a/mail/assp/files/assp.8.in b/mail/assp/files/assp.8.in index 200773cc0fd7..729892e270e1 100644 --- a/mail/assp/files/assp.8.in +++ b/mail/assp/files/assp.8.in @@ -4,7 +4,7 @@ assp \- Anti-Spam SMTP Proxy .SH SYNOPSIS assp [ base_dir [ admin_port ] ] .PP -%%PREFIX%%/etc/rc.d/assp.sh start|stop|restart|status +%%RC_SCRIPT%% start|stop|restart|status .SH DESCRIPTION .I "Anti-Spam SMTP Proxy" is a spam filter that sits on port 25 in front @@ -43,6 +43,8 @@ SPF (Sender Policy Framework) checking .IP - DNSBL (DNS Block List) checking using many block list services .IP - +delaying of messages from unknown senders +.IP - Virus detection .RE .PP @@ -197,6 +199,7 @@ in detail. .IR ASSP 's other filtering options (local user validation, RFC822 conformance, client HELO validation, SPF validation, +the Delay List, the use of DNSBLs and the ClamAV virus checker) can be enabled by examining and adjusting their configuration options as needed and then unchecking the @@ -227,7 +230,7 @@ see the website and documentation. .SH "STARTING ASSP AT BOOT TIME" The -.I /usr/local/etc/rc.d/assp.sh +.I %%RC_SCRIPT%% script is run automatically at system boot time. Several variables can be set in .I /etc/rc.conf diff --git a/mail/assp/files/assp.sh.in b/mail/assp/files/assp.in index bc5f119715d1..bc5f119715d1 100644 --- a/mail/assp/files/assp.sh.in +++ b/mail/assp/files/assp.in diff --git a/mail/assp/files/assplog.8.in b/mail/assp/files/assplog.8.in index 126e2d8127f6..4857ee05f0c4 100644 --- a/mail/assp/files/assplog.8.in +++ b/mail/assp/files/assplog.8.in @@ -57,6 +57,9 @@ DNSBL check failed BS Bayesian spam check failed .TP +DL +Message from unknown sender delayed, sender requested to retry later +.TP HL Bad HELO greeting .TP @@ -90,8 +93,9 @@ Whitelist addition of address CC'd in whitelisted email SR assp-spam@ report submission .SH BUGS +Note that .I assplog -does not display all log messages; for a complete view of +does not display anywhere near all the log messages; for a complete view of the log, use .B "tail -f" directly on the log file. diff --git a/mail/assp/files/patch-assp.pl b/mail/assp/files/patch-assp.pl index e36d719102fd..d9685c23a202 100644 --- a/mail/assp/files/patch-assp.pl +++ b/mail/assp/files/patch-assp.pl @@ -1,56 +1,49 @@ ---- assp.pl.orig Tue Mar 15 06:41:24 2005 -+++ assp.pl Wed May 18 11:33:35 2005 -@@ -39,7 +39,7 @@ - +--- assp.pl.orig Sun Jun 25 15:35:15 2006 ++++ assp.pl Sun Jun 25 15:43:20 2006 +@@ -67,7 +67,7 @@ loadConfig(); + sub loadConfig { - print "loading config -- base='$base'\n"; + # print "loading config -- base='$base'\n"; @Config=( - [0,0,0,heading,'Network Setup'], + [0,0,0,'heading','Network Setup'], # except for the heading lines, all config lines have the following: -@@ -58,7 +58,7 @@ +@@ -86,7 +86,7 @@ 'The address:port of your message handling system\'s smtp server. For example: 127.0.0.1:125'], - [AsAService,'As a Service',0,checkbox,'','(\S*)',undef, + [AsAService,'As a Service',0,checkbox,0,'(.*)',undef, 'In Windows 2000 / NT you can run it as a service; requires <a href="http://www.roth.net/perl/Daemon/" rel="external">win32::daemon</a>. Requires start from the service control panel.'], -- [AsADaemon,'As a Daemon',0,checkbox,'','(\S*)',undef, -+ [AsADaemon,'As a Daemon',0,checkbox,1,'(\S*)',undef, +- [AsADaemon,'As a Daemon',0,checkbox,0,'(.*)',undef, ++ [AsADaemon,'As a Daemon',0,checkbox,1,'(.*)',undef, 'In Linux/BSD/Unix/OSX fork and close file handles, kinda like "perl assp.pl &" but better. Requires restart.'], - [myName,'My Name',20,textinput,'ASSP-nospam','(\S+)',undef, - 'What the program calls itself in the email "received by" header. Usually ASSP-nospam.'], -@@ -355,7 +355,7 @@ - No mail is delivered! For example: assp-notspam'], - [EmailWhitelist,'Add to Whitelist Address',20,textinput,'assp-white','(.*)',undef, - 'Any mail sent by local/authenticated users to this username will be interpreted as a request to add addresses to the whitelist.<br /> No mail is delivered! For example: assp-white'], -- [EmailFrom,'From Address for Email',20,textinput,'ASSP <>','(.+)',undef, -+ [EmailFrom,'From Address for Email',20,textinput,'ASSP <postmaster@yourdomain.com>','(.+)',undef, + [myName,'My Name',40,textinput,'ASSP.nospam','(\S+)',undef, + 'What the program calls itself in the email "received by" header. Usually ASSP.nospam.'], +@@ -811,7 +811,7 @@ + '<span class="negative"> 0 = no report, 1 = to user, 2 = to TO address, 3 = both</span>'], + [EmailRedlistTo,'To Address for Redlist-Reports',40,textinput,'','(.+)',undef, + 'Email sent from ASSP acknowledging your submissions will be sent to this address. For example: admin@domain.com'], +- [EmailFrom,'From Address for Reports',40,textinput,'<>','(.+)',undef, ++ [EmailFrom,'From Address for Reports',40,textinput,'<postmaster@yourdomain.com>','(.+)',undef, 'Email sent from ASSP acknowledging your submissions will be sent from this address.<br /> Some mailers don\'t like the default setting. For example: ASSP <> or Mail Administrator - <mailadmin@mydomain.com>'], -@@ -423,9 +423,9 @@ - 'ASSP closes and renames the log file after this number of days. Decimals are ok. For example: 14 or 0.5'], + <mailadmin@mydomain.com> +@@ -913,9 +913,9 @@ + '], - [0,0,0,heading,'Security'], + [0,0,0,'heading','Security'], - [runAsUser,'Run as UID',20,textinput,'','(\S*)',undef, + [runAsUser,'Run as UID',20,textinput,'nobody','(\S*)',undef, 'The *nix user name to assume after startup: assp or nobody -- requires ASSP restart.'], - [runAsGroup,'Run as GID',20,textinput,'','(\S*)',undef, + [runAsGroup,'Run as GID',20,textinput,'nobody','(\S*)',undef, 'The *nix group to assume after startup: assp or nogroup -- requires ASSP restart.'], - [ChangeRoot,'Change Root',60,textinput,'','(.*)',undef, + [ChangeRoot,'Change Root',40,textinput,'','(.*)',undef, 'Non-blank means to run in chroot jail in *nix. You need an etc/protocols file to make this work<br /> -@@ -3631,6 +3631,7 @@ - @PossibleOptionFiles=(); - for (@Config) { +@@ -7865,6 +7865,7 @@ + @PossibleOptionFiles2=(); + foreach (@Config) { if($_->[6] eq 'ConfigMakeRe') { + $silent=1 if($AsADaemon); ${$_->[0]}=optionList(${$_->[0]},$_->[0]); push(@PossibleOptionFiles,$_->[0]); } elsif($_->[6] eq 'ConfigCompileRe') { -@@ -4462,4 +4462,4 @@ - dynablock.njabl.org - ); - } --1; -\ No newline at end of file -+1; diff --git a/mail/assp/files/patch-stats.sh b/mail/assp/files/patch-stats.sh index 060ae1688feb..107576fa1484 100644 --- a/mail/assp/files/patch-stats.sh +++ b/mail/assp/files/patch-stats.sh @@ -1,5 +1,5 @@ ---- stats.sh.orig Fri Aug 6 20:26:26 2004 -+++ stats.sh Thu May 26 22:24:20 2005 +--- stats.sh.orig Thu Jul 13 11:50:02 2006 ++++ stats.sh Thu Jul 13 11:55:05 2006 @@ -4,12 +4,12 @@ # copy of your standard Unix shell, the 'tail' utility and a working 'awk' # interpreter. @@ -30,7 +30,7 @@ # BA (in Cyan) .. Bad ATTACHEMENT rejected # SR (in Cyan) .. spam@ report submission # NS (in Cyan) .. notspam@ report submission -@@ -46,32 +49,32 @@ +@@ -46,91 +49,144 @@ # Some fields are truncated (with a hard-coded length value, usually 40) # to keep each line more or less intact on your screen as things scroll by # Colors are coded with ANSI Color coding, your mileage may vary ... @@ -44,133 +44,198 @@ -tail -300 -f /usr/local/assp/maillog.log | \ +tail -300 -f /var/db/assp/maillog.txt | \ awk ' \ - /whitelisted/ { \ +- /whitelisted/ { \ - printf("%s %s \033[1;32m%-15s L\033[0mW %s \033[1;32m->\033[0m %s\n", \ -+ printf("%s %s \033[1;32m%-15s\033[0m \033[1;37mLW %s\033[0m \033[1;32m->\033[0m \033[1;37m%s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - substr($3,1,length($3)), \ - substr($4,1,40), \ - substr($6,1,length($6)) )\ - } \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ +- substr($4,1,40), \ +- substr($6,1,length($6)) )\ +- } \ - /email/ && /whitelist addition/ { \ - printf("%s %s \033[1;32m%-15s W\033[0mA+ %s \033[1;32m->\033[0m %s\n", \ -+ /whitelist addition/ && /email new/ { \ -+ printf("%s %s \033[1;36m%-15s WA+ %s\033[0m \033[1;37m%s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - "+email address+", \ -- substr($4,1,40), \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- "+email address+", \ ++ /local or whitelisted/ { \ ++ printf("%s %s \033[1;32m%-15s\033[0m \033[1;37mLW %s\033[0m \033[1;32m->\033[0m \033[1;37m%s\033[0m\n", \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ - substr($6,1,length($6)) )\ ++ $6 )\ ++ } \ ++ /Email whitelist addition/ { \ ++ printf("%s %s \033[1;36m%-15s WA+ %s\033[0m \033[1;37m%s\033[0m\n", \ ++ $1, \ ++ $2, \ ++ "+email address+", \ + "-adds-", \ -+ substr($7,1,length($7)) )\ ++ $6 )\ } \ - /whitelist addition/ && !/email/ { \ +- /whitelist addition/ && !/email/ { \ - printf("%s %s \033[1;32m%-15s W\033[0mL+ %s \033[1;32m %s %s\033[0m\n", \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ ++ /whitelist addition:/ && !/[Ee]mail/ { \ + printf("%s %s \033[1;32m%-15s\033[0m \033[1;37mWL+ %s\033[0m \033[1;32m%s\033[0m \033[1;37m%s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - substr($3,1,length($3)), \ -@@ -79,12 +82,12 @@ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ "-adds-", \ - substr($9,1,length($9)) )\ +- substr($9,1,length($9)) )\ ++ $9 )\ } \ - /Bayesian spam/ { \ -+ /Bayesian Spam/ { \ ++ /Bayesian [Ss]pam/ { \ printf("%s %s \033[1;31m%-15s BS %s -> %s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - substr($3,1,length($3)), \ - substr($4,1,40), \ -+ substr($1,1,length($1)), \ -+ substr($2,1,length($2)), \ -+ substr($3,1,length($3)), \ +- substr($6,1,length($6)) )\ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ - substr($6,1,length($6)) )\ ++ $6 )\ } \ /message ok/ { \ -@@ -95,7 +98,7 @@ + printf("%s %s \033[1;32m%-15s Ok %s -> %s\033[0m\n", \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ substr($4,1,40), \ - substr($6,1,length($6)) )\ +- substr($6,1,length($6)) )\ ++ $6 )\ } \ - /bad attachment/ { \ + /bad attachment/ && !/no bad/ { \ printf("%s %s \033[1;35m%-15s BA %s -> %s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ -@@ -104,29 +107,66 @@ - substr($6,1,length($6)) )\ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ +- substr($6,1,length($6)) )\ ++ $6 )\ } \ /relay attempt blocked/ { \ - printf("%s %s \033[1;35m%-15s RB %s -> %s %s %s %s %s\033[0m\n", \ -+ printf("%s %s \033[1;35m%-15s RB %s -> %s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - substr($3,1,length($3)), \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ - substr($4,1,length($4)), \ - substr($5,1,length($5)), \ - substr($6,1,length($6)), \ - substr($7,1,length($7)), \ - substr($8,1,length($8)), \ +- substr($9,1,length($9)) )\ +- } \ +- /Admin update:/ { \ +- printf("\033[1;33m%s %s %s %s %s %s \033[0m\n", $1, $2, $3, $4, $5, $6) \ +- } \ +- /Email spamreport/ { \ +- printf("%s %s\033[0;36m %-15s SR %s Email SPAM Submission\033[0m\n", \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ +- substr($4,1,length($4)) ) \ +- } \ +- /Email hamreport/ { \ +- printf("%s %s\033[0;36m %-15s NS %s Email NOTSPAM Submission\033[0m\n", \ +- substr($1,1,length($1)), \ +- substr($2,1,length($2)), \ +- substr($3,1,length($3)), \ +- substr($4,1,length($4)) ) \ ++ printf("%s %s \033[1;35m%-15s RB %s -> %s\033[0m\n", \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ - substr($9,1,length($9)) )\ - } \ -+ /Invalid address rejected/ { \ ++ ($9 ~ /^(.*):$/) ? $10 : $9 )\ ++ } \ ++ /[Ii]nvalid address rejected/ { \ + printf("%s %s \033[1;34m%-15s IR %s -> %s\033[0m\n", \ -+ substr($1,1,length($1)), \ -+ substr($2,1,length($2)), \ -+ substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ -+ substr($NF,1,length($NF)) )\ ++ $NF )\ + } \ + /malformed address/ { \ + printf("%s %s \033[1;35m%-15s MA %s -> %s\033[0m\n", \ -+ substr($1,1,length($1)), \ -+ substr($2,1,length($2)), \ -+ substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ -+ substr($7,1,length($7)) )\ ++ $7 )\ + } \ -+ /failed RBL checks/ { \ ++ /failed RBL checks|Received-RBL: fail/ { \ + printf("%s %s \033[1;35m%-15s BL %s -> %s\033[0m\n", \ -+ substr($1,1,length($1)), \ -+ substr($2,1,length($2)), \ -+ substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ -+ substr($6,1,length($6)) )\ ++ $6 )\ + } \ -+ /failed SPF checks/ { \ ++ /failed SPF checks|Received-SPF: fail/ { \ + printf("%s %s \033[1;35m%-15s SP %s -> %s\033[0m\n", \ -+ substr($1,1,length($1)), \ -+ substr($2,1,length($2)), \ -+ substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ -+ substr($6,1,length($6)) )\ ++ $6 )\ + } \ + /has spam helo/ { \ + printf("%s %s \033[1;35m%-15s HL %s -> %s %s\033[0m\n", \ -+ substr($1,1,length($1)), \ -+ substr($2,1,length($2)), \ -+ substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ + substr($4,1,40), \ -+ substr($6,1,length($6)), \ -+ substr($10,1,length($10)) )\ ++ $6, \ ++ $10 )\ + } \ - /Admin update:/ { \ -- printf("\033[1;33m%s %s %s %s %s %s \033[0m\n", $1, $2, $3, $4, $5, $6) \ ++ /Sender Validation:blocked:/ { \ ++ printf("%s %s \033[1;35m%-15s HL %s %s\033[0m\n", \ ++ $1, \ ++ $2, \ ++ $3, \ ++ substr($4,1,40), \ ++ $9 )\ ++ } \ ++ /recipient delayed/ { \ ++ printf("%s %s \033[1;35m%-15s DL %s -> %s\033[0m\n", \ ++ $1, \ ++ $2, \ ++ $3, \ ++ substr($4,1,40), \ ++ $7 ) \ ++ } \ ++ /Admin (update:|connection from )/ { \ + printf("\033[1;33m%s\033[0m\n", $0) \ - } \ - /Email spamreport/ { \ -- printf("%s %s\033[0;36m %-15s SR %s Email SPAM Submission\033[0m\n", \ ++ } \ ++ /[Ee]mail spamreport/ { \ + printf("%s %s\033[1;36m %-15s SR %s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - substr($3,1,length($3)), \ - substr($4,1,length($4)) ) \ - } \ - /Email hamreport/ { \ -- printf("%s %s\033[0;36m %-15s NS %s Email NOTSPAM Submission\033[0m\n", \ ++ $1, \ ++ $2, \ ++ $3, \ ++ $4 ) \ ++ } \ ++ /[Ee]mail hamreport/ { \ + printf("%s %s\033[1;36m %-15s NS %s\033[0m\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - substr($3,1,length($3)), \ ++ $1, \ ++ $2, \ ++ $3, \ ++ $4 ) \ + }' + # end of script + diff --git a/mail/assp/files/pkg-install.in b/mail/assp/files/pkg-install.in index b264dbe864f1..5849ef05108d 100644 --- a/mail/assp/files/pkg-install.in +++ b/mail/assp/files/pkg-install.in @@ -2,5 +2,9 @@ if [ "$2" = "POST-INSTALL" ]; then install -d -m 0700 -o %%ASSP_USER%% -g %%ASSP_GROUP%% %%ASSP_HOME%% - ln -s $PKG_PREFIX/lib/assp/*.txt %%ASSP_HOME%% + [ ! -f %%ASSP_HOME%%/denysmtp.txt ] && touch %%ASSP_HOME%%/denysmtp.txt && chown %%ASSP_USER%%:%%ASSP_GROUP%% %%ASSP_HOME%%/denysmtp.txt + ln -s $PKG_PREFIX/lib/assp/*report.txt %%ASSP_HOME%% + ln -s $PKG_PREFIX/lib/assp/nodelay.txt %%ASSP_HOME%% + ln -s $PKG_PREFIX/lib/assp/redre.txt %%ASSP_HOME%% + ln -s $PKG_PREFIX/lib/assp/images %%ASSP_HOME%% fi |