Index: head/mail/assp/Makefile =================================================================== --- head/mail/assp/Makefile (revision 218677) +++ head/mail/assp/Makefile (revision 218678) @@ -1,160 +1,164 @@ # New ports collection makefile for: assp # Date created: 16 May 2005 # Whom: J.R. Oldroyd # # $FreeBSD$ # PORTNAME= assp -PORTVERSION= 1.3.3.8 -PORTREVISION= 1 +PORTVERSION= 1.3.3.10 CATEGORIES= mail MASTER_SITES= SF DISTNAME= ${PORTNAME:U}_${PORTVERSION}-Install MAINTAINER= fbsd@opal.com COMMENT= Anti-Spam SMTP Proxy USE_ZIP= yes NO_BUILD= yes USE_PERL5_RUN= yes USE_DOS2UNIX= \ - ../Install.txt \ - ../changelog.txt \ + ../1.3.3.8-1.3.3.10-changes.txt \ addservice.pl \ assp.pl \ files/URIBLCCTLDS.txt \ files/blackdomains.txt \ files/bombre.txt \ files/invalidptr.txt \ files/ipnp.txt \ files/ipwl.txt \ files/nodelay.txt \ files/rbl-service.txt \ files/redre.txt \ files/whitedomains.txt \ + images/assp.css \ + images/editor.css \ + images/shutdown.css \ move2num.pl \ rc/readme.txt \ rebuildspamdb.pl \ - repair.pl \ reports/helpreport.txt \ reports/notspamreport.txt \ reports/redremovereport.txt \ reports/redreport.txt \ reports/spamreport.txt \ reports/whiteremovereport.txt \ reports/whitereport.txt \ stat.pl \ stats.sh MAN8= assp.8 assplog.8 ASSP_USER= nobody ASSP_GROUP= nobody ASSP_HOME= /var/db/assp PLIST_SUB= ASSP_HOME="${ASSP_HOME}" SUB_FILES= assp.8 assplog.8 periodic-assp.sh pkg-install SUB_LIST= ASSP_HOME="${ASSP_HOME}" ASSP_USER="${ASSP_USER}" \ ASSP_GROUP="${ASSP_GROUP}" PERL="${PERL}" USE_RC_SUBR= ${PORTNAME} RC_SCRIPT= ${PREFIX}/etc/rc.d/${PORTNAME} OPTIONS= EMVALID "RFC822 recipient address validator" on \ LDAP "LDAP validation of recipient addresses" on \ SPF "SPF validation of client IP" on \ SRS "Sender Rewriting Scheme" on \ FBACKW "File Reading Backwards" on \ ZLIB "HTTP Header Compression on Admin Interface" on \ CLAMAV "ClamAV virus scanner" on \ DNSBL "DNS block list checking" on \ MYSQL "Use MySQL db to store white/red/delaylists" off \ SIMPLE "Use procedural Web Page interfaces" on -WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/${PORTNAME:U}_${PORTVERSION}-Install/${PORTNAME:U} +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}/${PORTNAME:L} .include SUB_LIST+= RC_SCRIPT=${RC_SCRIPT}${RC_SUBR_SUFFIX} .if !defined(WITHOUT_EMVALID) RUN_DEPENDS+= ${SITE_PERL}/Email/Valid.pm:${PORTSDIR}/mail/p5-Email-Valid .endif .if !defined(WITHOUT_LDAP) RUN_DEPENDS+= ${SITE_PERL}/Net/LDAP.pm:${PORTSDIR}/net/p5-perl-ldap .endif .if !defined(WITHOUT_SPF) RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS RUN_DEPENDS+= ${SITE_PERL}/Mail/SPF/Query.pm:${PORTSDIR}/mail/p5-Mail-SPF-Query .endif .if !defined(WITHOUT_SRS) RUN_DEPENDS+= ${SITE_PERL}/Mail/SRS.pm:${PORTSDIR}/mail/p5-Mail-SRS .endif .if !defined(WITHOUT_FBACKW) RUN_DEPENDS+= ${SITE_PERL}/File/ReadBackwards.pm:${PORTSDIR}/devel/p5-File-ReadBackwards .endif .if !defined(WITHOUT_ZLIB) RUN_DEPENDS+= ${SITE_PERL}/Compress/Zlib.pm:${PORTSDIR}/archivers/p5-Compress-Zlib .endif .if !defined(WITHOUT_CLAMAV) RUN_DEPENDS+= ${SITE_PERL}/File/Scan/ClamAV.pm:${PORTSDIR}/security/p5-File-Scan-ClamAV PLIST_SUB+= ASSP_CLAMAV="" .else PLIST_SUB+= ASSP_CLAMAV="@comment " .endif .if !defined(WITHOUT_DNSBL) RUN_DEPENDS+= ${SITE_PERL}/${PERL_ARCH}/Net/DNS.pm:${PORTSDIR}/dns/p5-Net-DNS .endif .if !defined(WITHOUT_MYSQL) RUN_DEPENDS+= ${SITE_PERL}/Tie/RDBM.pm:${PORTSDIR}/databases/p5-Tie-DBI .endif .if !defined(WITHOUT_SIMPLE) RUN_DEPENDS+= ${SITE_PERL}/LWP/Simple.pm:${PORTSDIR}/www/p5-libwww .endif EXTRACT_AFTER_ARGS= -d ${PORTNAME}-${PORTVERSION} post-patch: @${REINPLACE_CMD} -e 's|/usr/bin/perl|${PERL}|' ${WRKSRC}/*.pl do-install: ${MKDIR} ${PREFIX}/lib/assp - ${INSTALL_SCRIPT} ${WRKSRC}/*.pl ${PREFIX}/lib/assp + ${INSTALL_SCRIPT} ${WRKSRC}/addservice.pl ${PREFIX}/lib/assp + ${INSTALL_SCRIPT} ${WRKSRC}/assp.pl ${PREFIX}/lib/assp + ${INSTALL_SCRIPT} ${WRKSRC}/move2num.pl ${PREFIX}/lib/assp + ${INSTALL_SCRIPT} ${WRKSRC}/rebuildspamdb.pl ${PREFIX}/lib/assp + ${INSTALL_SCRIPT} ${WRKSRC}/stat.pl ${PREFIX}/lib/assp ${INSTALL_SCRIPT} ${WRKSRC}/stats.sh ${PREFIX}/lib/assp ${MKDIR} ${PREFIX}/lib/assp/files ${INSTALL_DATA} ${WRKSRC}/files/* ${PREFIX}/lib/assp/files ${MKDIR} ${PREFIX}/lib/assp/reports ${INSTALL_DATA} ${WRKSRC}/reports/* ${PREFIX}/lib/assp/reports ${MKDIR} ${PREFIX}/lib/assp/images ${INSTALL_DATA} ${WRKSRC}/images/* ${PREFIX}/lib/assp/images ${LN} -s ${PREFIX}/lib/assp/assp.pl ${PREFIX}/sbin/assp ${LN} -s ${PREFIX}/lib/assp/stats.sh ${PREFIX}/sbin/assplog ${INSTALL_MAN} ${WRKDIR}/assp.8 ${MAN8PREFIX}/man/man8 ${INSTALL_MAN} ${WRKDIR}/assplog.8 ${MAN8PREFIX}/man/man8 ${MKDIR} ${PREFIX}/etc/periodic/daily ${INSTALL_SCRIPT} ${WRKDIR}/periodic-assp.sh ${PREFIX}/etc/periodic/daily/510.assp .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/docs/*.htm ${DOCSDIR} .endif post-install: @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include Property changes on: head/mail/assp/Makefile ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.14 \ No newline at end of property +1.15 \ No newline at end of property Index: head/mail/assp/distinfo =================================================================== --- head/mail/assp/distinfo (revision 218677) +++ head/mail/assp/distinfo (revision 218678) @@ -1,3 +1,3 @@ -MD5 (ASSP_1.3.3.8-Install.zip) = fad56889a74acc10769789bdc887f620 -SHA256 (ASSP_1.3.3.8-Install.zip) = 48a84aa63cbcff99833710c7ccbef69933558e98368982456f5ec8d201fad3ba -SIZE (ASSP_1.3.3.8-Install.zip) = 332926 +MD5 (ASSP_1.3.3.10-Install.zip) = 8eae214508f426f4f0daef9993828358 +SHA256 (ASSP_1.3.3.10-Install.zip) = e5bfd52401b3f6be38ca5afc86b0d37556d1021f8feccadd2985f650a62d65d9 +SIZE (ASSP_1.3.3.10-Install.zip) = 315382 Property changes on: head/mail/assp/distinfo ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.10 \ No newline at end of property +1.11 \ No newline at end of property Index: head/mail/assp/files/510.assp.in =================================================================== --- head/mail/assp/files/510.assp.in (revision 218677) +++ head/mail/assp/files/510.assp.in (revision 218678) @@ -1,44 +1,41 @@ #!/bin/sh # # $FreeBSD$ # # Update ASSP Spam and ClamAV databases cd %%ASSP_HOME%% -[ -f nightly.log ] && mv nightly.log nightly.log.old - if [ ! -f %%PREFIX%%/lib/assp/rebuildspamdb.pl ] then echo "%%PREFIX%%/lib/assp/rebuildspamdb.pl does not exist" rc_spamdb=2 else echo "" - echo "Running ASSP rebuildspamdb.pl (output to nightly.log)" - echo "Running ASSP rebuildspamdb.pl:" >>nightly.log - %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl >>nightly.log && rc_spamdb=0 || rc_spamdb=3 + echo "Running ASSP rebuildspamdb.pl:" + %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl && rc_spamdb=0 || rc_spamdb=3 fi if [ ! -f %%PREFIX%%/lib/assp/freshclam.sh ] then # existence of freshclam.sh is optional, dependent # on the WITH_CLAMAV setting, so not an error if not there rc_clamav=0 else echo "" echo "Fetching ASSP ClamAV virus database updates:" export PATH=$PATH:%%LOCALBASE%%/bin sh %%PREFIX%%/lib/assp/freshclam.sh && rc_clamav=0 || rc_clamav=3 fi . %%RC_SUBR%% name=assp rcvar=`set_rcvar` load_rc_config $name : ${assp_logexpire="45"} echo "" echo "Removing old ASSP log files:" find . -name '*.maillog.txt' -mtime +$assp_logexpire -exec ls -l {} \; -exec rm {} \; exit $(($rc_spamdb|$rc_clamav)) Property changes on: head/mail/assp/files/510.assp.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/mail/assp/files/assplog.8.in =================================================================== --- head/mail/assp/files/assplog.8.in (revision 218677) +++ head/mail/assp/files/assplog.8.in (revision 218678) @@ -1,125 +1,128 @@ .TH assplog 8 "May 16, 2005" "" "ASSP" .SH NAME assplog \- display colorized ASSP log .SH SYNOPSIS assplog .SH DESCRIPTION .I assplog uses .B "tail -f" to monitor the ASSP Anti-Spam SMTP Proxy log and then displays logged messages using ANSI color sequences for easy reading. .PP The colors have the following meaning: .PP 1. Messages that were delivered .RS .TP White Sender was on whitelist (or was added to whitelist) .TP Green Message passed all checks and was delivered .RE .PP 2. Messages that were blocked .RS .TP Blue Recipient unknown (failed flat list or LDAP check) .TP Magenta Message failed any of the other checks .TP Red Message failed Bayesian spam check .RE .PP 3. Administrative messages .RS .TP Cyan Message to assp{notspam,spam,white}@ address .TP Yellow Admin change from web interface .TP Grey Messages about ASSP's operation .RE .PP Entries from the log are reformatted to a consistent format and classified with one of the following tags: .TP BA Bad attachement rejected .TP BL DNSBL check failed .TP BS Bayesian spam check failed .TP DL Message from unknown sender delayed, sender requested to retry later .TP +EM +message to ASSP's email interface (e.g., spam/notspam report, redlist addition) +.TP HL Bad HELO greeting .TP IR Invalid recipient, failed LDAP or flat list test .TP IS Invalid sender .TP LW Local or Whitelisted emails .TP MA Malformed RFC822 recipient address .TP ME Maximum number of other errors exceeded .TP -NS -asspnotspam@ report submission +NP +Email that passed without being processed .TP -Ok +OK Email that fully passed all tests .TP PB Penalty Box counter was incremented .TP RB Blocked Relay attempt .TP SP SPF check failed .TP VI Virus detected .TP -WA+ +W+ Whitelist addition by local user .TP -WL+ -Whitelist addition of address CC'd in whitelisted email +W- +Whitelist deletion by local user .TP -SR -asspspam@ report submission +WC +Whitelist addition of address CC'd in whitelisted email .SH BUGS Note that .I assplog -suppresses some of the messages in the log (those that appear +suppresses many of the messages in the log (those that appear to duplicate information in other messages). Unknown/new log messages are not colorized. -For an accurate view of -the log, use +FOR A COMPLETE AND ACCURATE VIEW OF +THE LOG, USE .B "tail -f" -directly on the log file. +DIRECTLY ON THE LOG FILE. .SH FILES .IP %%ASSP_HOME%%/maillog.txt location of ASSP log file .SH "SEE ALSO" .IR assp (8), .IR tail (1) Property changes on: head/mail/assp/files/assplog.8.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.3 \ No newline at end of property +1.4 \ No newline at end of property Index: head/mail/assp/files/patch-assp.pl =================================================================== --- head/mail/assp/files/patch-assp.pl (revision 218677) +++ head/mail/assp/files/patch-assp.pl (revision 218678) @@ -1,37 +1,37 @@ ---- assp.pl.orig Thu Nov 1 16:37:53 2007 -+++ assp.pl Thu Nov 1 16:40:38 2007 +--- assp.pl.orig 2008-08-02 22:00:47.000000000 -0400 ++++ assp.pl 2008-08-02 22:03:58.000000000 -0400 @@ -1,4 +1,4 @@ --#!/usr/bin/perl +-#!/usr/bin/perl -- +#!/usr/local/bin/perl - - use File::Copy; - use Encode; -@@ -844,8 +844,8 @@ - [ScanWL,'Scan Whitelisted Senders',0,checkbox,0,'([01]?)',undef,''], - [ScanNP,'Scan No Processing Senders',0,checkbox,0,'([01]?)',undef,''], - [ScanLocal,'Scan Local Senders',0,checkbox,0,'([01]?)',undef,''], --[AvClamdPort,'Port or file socket for ClamAV',20,textinput,'/tmp/clamd','(\S+)',undef, + # + # perl antispam smtp proxy + # (c) John Hanna, John Calvi, Robert Orso, AJ 2004 under the terms of the GPL +@@ -817,8 +817,8 @@ + ['ScanWL','Scan Whitelisted Senders',0,\&checkbox,0,'([01]?)',undef,''], + ['ScanNP','Scan No Processing Senders',0,\&checkbox,0,'([01]?)',undef,''], + ['ScanLocal','Scan Local Senders',0,\&checkbox,0,'([01]?)',undef,''], +-['AvClamdPort','Port or file socket for ClamAV',20,\&textinput,'/tmp/clamd','(\S+)',undef, - 'A socket specified in the clamav.conf file - LocalSocket. For example /tmp/clamd. If the socket has been setup as a TCP/IP socket (see the TCPSocket option in the clamav.conf file), then specify the TCP socket. For example 3310 '], -+[AvClamdPort,'Port or file socket for ClamAV',20,textinput,'/var/run/clamav/clamd','(\S+)',undef, -+ 'A socket specified in the clamav.conf file - LocalSocket. For example /var/run/clamav/clamd. If the socket has been setup as a TCP/IP socket (see the TCPSocket option in the clamav.conf file), then specify the TCP socket. For example 3310 '], - [AvError,'Reply Message to Refuse Infected Email',80,textinput,'554 5.7.1 Mail appears infected with \'$infection\'.','(5\d\d .*)',undef, ++['AvClamdPort','Port or file socket for ClamAV',20,\&textinput,'/var/run/assp/clamd','(\S+)',undef, ++ 'A socket specified in the clamav.conf file - LocalSocket. For example /var/run/assp/clamd. If the socket has been setup as a TCP/IP socket (see the TCPSocket option in the clamav.conf file), then specify the TCP socket. For example 3310 '], + ['AvError','Reply Message to Refuse Infected Email',80,\&textinput,'554 5.7.1 Mail appears infected with \'$infection\'.','(5\d\d .*)',undef, 'Reply message to refuse infected mail. The string $infection is replaced with the name of the detected virus.
For example: 554 5.7.1 Mail appears infected with \'$infection\' -- disinfect and resend.'], -@@ -1003,7 +1003,7 @@ +@@ -973,7 +973,7 @@ ' 0 = no report, 1 = to SENDER, 2 = to TO address (below), 3 = BOTH'], - [EmailRedlistTo,'To Address for Redlist-Reports',40,textinput,'','(.+)',undef, + ['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,'','(.+)',undef, +-['EmailFrom','From Address for Reports',40,\&textinput,'','(.+)',undef, ++['EmailFrom','From Address for Reports',40,\&textinput,'','(.+)',undef, 'Email sent from ASSP acknowledging your submissions will be sent from this address.'], - - -@@ -1214,7 +1214,7 @@ + ['NoHaiku','Legacy: Don\'t reply to messages to the Email Interface',0,\&checkbox,0,'([01]?)',undef, + 'Check this option to suppress email reports for spam and not-spam reports, whitelist and redlist additions/deletions via the email interface.

+@@ -1166,7 +1166,7 @@ [0,0,0,'heading','Server Setup'], - [AsAService,'Run ASSP as a Windows Service**',0,checkbox,0,'([01]?)',undef, + ['AsAService','Run ASSP as a Windows Service**',0,\&checkbox,0,'([01]?)',undef, 'In Windows NT/2000/XP/2003 ASSP can be installed as a service. This setting tells ASSP that this has been done -- it does not install the Windows service for you. Installing ASSP as a service requires several steps which are detailed in the Quick Start for Win32 wiki page.'], --[AsADaemon,'Run ASSP as a Daemon**',0,checkbox,0,'([01]?)',undef, -+[AsADaemon,'Run ASSP as a Daemon**',0,checkbox,1,'([01]?)',undef, +-['AsADaemon','Run ASSP as a Daemon**',0,\&checkbox,0,'([01]?)',undef, ++['AsADaemon','Run ASSP as a Daemon**',0,\&checkbox,1,'([01]?)',undef, 'In Linux/BSD/Unix/OSX fork and close file handles. Similar to the command "perl assp.pl &", but better.'], - [runAsUser,'Run as UID**',20,textinput,'','(\S*)',undef, + ['runAsUser','Run as UID**',20,\&textinput,'','(\S*)',undef, 'The *nix user name to assume after startup (*nix only).

Examples: assp, nobody

'], Property changes on: head/mail/assp/files/patch-assp.pl ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property Index: head/mail/assp/files/patch-stats.sh =================================================================== --- head/mail/assp/files/patch-stats.sh (revision 218677) +++ head/mail/assp/files/patch-stats.sh (revision 218678) @@ -1,410 +1,435 @@ ---- stats.sh.orig Thu Nov 8 10:30:36 2007 -+++ stats.sh Thu Nov 8 10:43:14 2007 +--- stats.sh.orig 2008-08-06 17:43:32.000000000 -0400 ++++ stats.sh 2008-08-06 17:47:16.000000000 -0400 @@ -1,15 +1,23 @@ #!/bin/sh +# This version of the script is heavily modified from the now +# unsupported original. +# +# This version by: +# J.R. Oldroyd +# FreeBSD port maintained for ASSP +# + # As a shell script (running on Unix...) it expects to find the local # copy of your standard Unix shell, the 'tail' utility and a working 'awk' # interpreter. -# I use the default location for ASSP's maillog file, and the 'maillog.log' +# I use the default location for ASSP's maillog file, and the 'maillog.txt' # name (in assp.cfg) to keep ASSP from changing it on me. -# This script attempts to go back at least 300 lines in your maillog.log +# This script attempts to go back at least 300 lines in your maillog.txt # file to give you a nice screenful of goodies to review when it -# first starts. If your maillog.log is nearly empty, then just +# first starts. If your maillog.txt is nearly empty, then just # be patient. As things happen - the logger will reveal it in COLOR! # ------------------------------------ KRL ------------------------- @@ -27,14 +35,7 @@ # order to give you a full screen on startup. Also, it assumes # ANSI Color mode for your screen to display the lines in color. # -# BS (in Red) lines are those caught by the Bayesian filter !! -# LW (in White .. mostly) are those Local or Whitelisted eMails -# Ok (in Green) are eMail that fully pass alltests without exceptions. -# RB (in Cyan) .. Blocked Relay attempt -# WL+ Whitelist ADDITION by an authorized local user -# BA (in Cyan) .. Bad ATTACHEMENT rejected -# SR (in Cyan) .. spam@ report submission -# NS (in Cyan) .. notspam@ report submission +# See "man assplog" for a description of the fields and coloring. # # I got the idea for this script from Mark Constable. He submitted # a similar script to follow the Courier-MTA /var/log/maillog -@@ -46,91 +47,283 @@ +@@ -46,91 +47,308 @@ # 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 ... -# I assume the naming convention of 'maillog.log' so ASSP won't munge +# I assume the naming convention of 'maillog.txt' so ASSP won't munge # each current log into some difficult-to-grok name. You should try # to use this feature - and perhaps roll the log periodically with # your system's 'newsyslog' functionality. You can send a SIGHUP to # ASSP when you roll the log so it starts afresh..KRL -tail -300 -f /usr/local/assp/maillog.log | \ - awk ' \ - /whitelisted/ { \ - printf("%s %s \033[1;32m%-15s L\033[0mW %s \033[1;32m->\033[0m %s\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)) )\ - } \ - /email/ && /whitelist addition/ { \ - printf("%s %s \033[1;32m%-15s W\033[0mA+ %s \033[1;32m->\033[0m %s\n", \ - substr($1,1,length($1)), \ - substr($2,1,length($2)), \ - "+email address+", \ - substr($4,1,40), \ - substr($6,1,length($6)) )\ - } \ - /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)), \ - substr($4,1,40), \ - "-adds-", \ - substr($9,1,length($9)) )\ - } \ - /Bayesian spam/ { \ - 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($6,1,length($6)) )\ - } \ - /message ok/ { \ - 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)), \ - substr($4,1,40), \ - substr($6,1,length($6)) )\ - } \ - /bad attachment/ { \ - printf("%s %s \033[1;35m%-15s BA %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($6,1,length($6)) )\ - } \ - /relay attempt blocked/ { \ - printf("%s %s \033[1;35m%-15s RB %s -> %s %s %s %s %s\033[0m\n", \ - 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)) ) \ - }' +tail -300 -f /var/db/assp/maillog.txt | awk ' + { + # look for $3 ~ [reason] + p=0 + if ($3 ~ /\[.*\]/) p=1 + } + /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, + $(p+4), + substr($(p+5),1,40), + $(p+7) ) + next + } -+ /[Ee]mail whitelist addition/ { -+ if ($3 != "Email") { -+ email_wa_ip = $4 -+ email_wa_name = $5 -+ } -+ else { -+ printf("%s %s \033[1;36m%-15s\033[0m \033[1;36mWA+ %s\033[0m \033[1;32m%s\033[0m \033[1;36m%s\033[0m\n", -+ $1, -+ $2, -+ email_wa_ip, -+ substr(email_wa_name,1,40), -+ "-adds-", -+ $(p+6) ) -+ } ++ /[Em]ail whitelist (addition|deletion):/ { ++ printf("%s %s \033[1;36m%-15s\033[0m \033[1;36mW%s %s\033[0m \033[1;37m%s\033[0m \033[1;36m%s\033[0m\n", ++ $1, ++ $2, ++ $(p+4), ++ (/addition:/) ? "+" : "-", ++ substr($(p+5),1,40), ++ (/addition:/) ? "-adds-" : "-deletes-", ++ $(p+9) ) + next + } + /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", ++ printf("%s %s \033[1;36m%-15s\033[0m \033[1;36mWC %s\033[0m \033[1;37m%s\033[0m \033[1;36m%s\033[0m\n", ++ $1, ++ $2, ++ $(p+4), ++ substr($(p+5),1,40), ++ "-adds-", ++ $(p+10) ) ++ next ++ next ++ } ++ /[Ee]mail (hamreport|help|spamreport|redlist)/ { ++ printf("%s %s\033[1;36m %-15s EM %s %s%s\033[0m\n", + $1, + $2, + $(p+4), -+ substr($(p+5),1,40), -+ "-adds-", -+ $(p+10) ) ++ $(p+5), ++ $(p+7), ++ ($(p+8)) ? " " $(p+8) : "" ) + next + } -+ /Bayesian Check Prob/ { ++ /Bayesian Check ( - )?Prob/ { + # suppress + next + } + /Bayesian [Ss]pam/ { + printf("%s %s \033[1;31m%-15s BS %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+7) ) + next + } + /recipient accepted/ { + # suppress + next + } + /message ok/ { -+ printf("%s %s \033[1;32m%-15s Ok %s -> %s\033[0m\n", ++ printf("%s %s \033[1;32m%-15s OK %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+7) ) + next + } + /bad attachment/ && !/no bad/ { + printf("%s %s \033[1;35m%-15s BA %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+7) ) + next + } + /relay attempt blocked/ { + printf("%s %s \033[1;35m%-15s RB %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + ($(p+10) ~ /^(.*):$/) ? $(p+11) : $(p+10) ) + next + } + /no recipients left -- dropping connection/ { + # suppress + next + } + /[Ii]nvalid address rejected/ { + printf("%s %s \033[1;34m%-15s IR %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $NF ) + next + } + /malformed address/ { + printf("%s %s \033[1;35m%-15s MA %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+8) ) + next + } + /Unknown Sender (with|from) Local Domain/ { + printf("%s %s \033[1;34m%-15s IS %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40) ) + next + } + /(Commencing|Completed) (R|DNS|URI)BL checks/ { + # suppress + next + } + /((DNS|URI)BL )?Received-(R|DNS|URI)BL: (pass|neutral|fail)|URIBL fail|Bayesian Check URIBL/ { + # suppress + next + } -+ /failed (DNS|URI)BL|failed (R|URI)BL checks|Received-RBL: fail|\[DNSBL].* rejected by / { ++ /failed (DNS|URI)BL|failed (R|URI)BL checks|Received-RBL: fail/ { + printf("%s %s \033[1;35m%-15s BL %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+7) ) + next + } -+ /Received-SPF: (pass|neutral)| SPF: (soft)?fail|SPFstrict/ { ++ /(\[DNSBL]|\[DNSBLcache]).* rejected by / { ++ printf("%s %s \033[1;35m%-15s BL %s (%s blacklisted by %s)\033[0m\n", ++ $1, ++ $2, ++ $(p+4), ++ substr($(p+5),1,40), ++ $(p+7), ++ $(p+10) ) ++ next ++ } ++ /Received-SPF(\(cache\))?: (pass|neutral)| SPF: (soft)?fail|SPFstrict/ { + # suppress + next + } -+ /failed SPF checks|Received-SPF: ((soft)?fail|error)/ { ++ /failed SPF checks|Received-SPF(\(cache\))?: ((soft)?fail|error)| SPF: neutral/ { + printf("%s %s \033[1;35m%-15s SP %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+7) ) + next + } + /has spam helo|HELO-Blacklist:/ { + printf("%s %s \033[1;35m%-15s HL %s -> %s %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+7), + $(p+11) ) + next + } + /Forged HELO:/ { + printf("%s %s \033[1;35m%-15s HL %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+8) ) + next + } + /Sender Validation:blocked:/ { + printf("%s %s \033[1;35m%-15s HL %s %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+10) ) + next + } + /(adding new|embargoing|accepting|whitelisting) triplet|(renewing|renewing whitelisted|deleting spamming whitelisted) tuplet/ { + # suppress + next + } -+ /recipient delayed/ { ++ /(recipient|bounce) delayed/ { + printf("%s %s \033[1;35m%-15s DL %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + $(p+8) ) + next + } -+ /Admin (update:|connection from )/ { -+ printf("\033[1;33m%s\033[0m\n", $0) ++ /DATA phase delayed/ { ++ # suppress + next + } -+ /[Ee]mail spamreport/ { -+ printf("%s %s\033[1;36m %-15s SR %s\033[0m\n", -+ $1, -+ $2, -+ $(p+4), -+ $(p+5) ) ++ /(Admin (update:|connection from ))|AdminUpdate:/ { ++ printf("\033[1;33m%s\033[0m\n", $0) + next + } -+ /[Ee]mail hamreport/ { -+ printf("%s %s\033[1;36m %-15s NS %s\033[0m\n", -+ $1, -+ $2, -+ $(p+4), -+ $(p+5) ) -+ next -+ } + /ClamAV: scanning/ { + # suppress + next + } + /virus detected/ { + printf("%s %s\033[1;35m %-15s VI %s -> %s (%s)\033[0m\n", + $1, + $2, + $(p+4), + $(p+5), $(p+7), $(p+10) ) + next + } + /Message-Score:/ { + # suppress + next + } + /\[VIRUS].*PB:.*score:.*reason:/ { + # suppress + next + printf("%s %s\033[1;35m %-15s PB %s %s %s %s (%s)\033[0m\n", + $1, + $2, + $(p+4), + $(p+10), $(p+11), $(p+12), $(p+13), + substr($(p+14),8,40) ) + next + } -+ /PB:.*score:.*reason:/ { ++ /PB:( deleting\(black\)|.*score:.*reason:)/ { + # suppress + next + printf("%s %s\033[1;34m %-15s PB %s %s %s %s (%s)\033[0m\n", + $1, + $2, + $(p+4), + $(p+8), $(p+9), $(p+10), $(p+11), + substr($(p+12),8,40) ) + next + } -+ /PBextreme:monitoring|([ValidHelo]|[InvalidHelo]|[PTRmissing])[scoring]/ { ++ /PBextreme:monitoring/ { + # suppress + next + } ++ /(\[ValidHelo]|\[InvalidHelo]|\[PTRinvalid]|\[PTRmissing])\[scoring]/ { ++ # suppress ++ next ++ } + /Message Limit/ { + printf("%s %s\033[1;35m %-15s PB %s -> %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40), + substr($(p+7),1,40) ) + next + } + /max errors \([0-9]+\) exceeded/ { + printf("%s %s\033[1;35m %-15s ME %s\033[0m\n", + $1, + $2, + $(p+4), + substr($(p+5),1,40) ) ++ next ++ } ++ /Message proxied without processing/ { ++ # suppress ++ next ++ } ++ /message proxied without processing/ { ++ printf("%s %s \033[1;32m%-15s NP %s -> %s\033[0m\n", ++ $1, ++ $2, ++ $(p+4), ++ substr($(p+5),1,40), ++ $(p+7) ) ++ next ++ } ++ /Regex:(Black|NoProcessingDomain)/ { ++ # suppress + next + } + { + printf("%s %s ", $1, $2) + for (i=3; i<=NF; i++) + printf("\033[1;30m%s\033[0m ", $i) + printf("\n") + } + ' # end of script Property changes on: head/mail/assp/files/patch-stats.sh ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.4 \ No newline at end of property +1.5 \ No newline at end of property Index: head/mail/assp/files/periodic-assp.sh.in =================================================================== --- head/mail/assp/files/periodic-assp.sh.in (revision 218677) +++ head/mail/assp/files/periodic-assp.sh.in (revision 218678) @@ -1,44 +1,41 @@ #!/bin/sh # # $FreeBSD$ # # Update ASSP Spam and ClamAV databases cd %%ASSP_HOME%% -[ -f nightly.log ] && mv nightly.log nightly.log.old - if [ ! -f %%PREFIX%%/lib/assp/rebuildspamdb.pl ] then echo "%%PREFIX%%/lib/assp/rebuildspamdb.pl does not exist" rc_spamdb=2 else echo "" - echo "Running ASSP rebuildspamdb.pl (output to nightly.log)" - echo "Running ASSP rebuildspamdb.pl:" >>nightly.log - %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl >>nightly.log && rc_spamdb=0 || rc_spamdb=3 + echo "Running ASSP rebuildspamdb.pl:" + %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl && rc_spamdb=0 || rc_spamdb=3 fi if [ ! -f %%PREFIX%%/lib/assp/freshclam.sh ] then # existence of freshclam.sh is optional, dependent # on the WITH_CLAMAV setting, so not an error if not there rc_clamav=0 else echo "" echo "Fetching ASSP ClamAV virus database updates:" export PATH=$PATH:%%LOCALBASE%%/bin sh %%PREFIX%%/lib/assp/freshclam.sh && rc_clamav=0 || rc_clamav=3 fi . %%RC_SUBR%% name=assp rcvar=`set_rcvar` load_rc_config $name : ${assp_logexpire="45"} echo "" echo "Removing old ASSP log files:" find . -name '*.maillog.txt' -mtime +$assp_logexpire -exec ls -l {} \; -exec rm {} \; exit $(($rc_spamdb|$rc_clamav)) Property changes on: head/mail/assp/files/periodic-assp.sh.in ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.2 \ No newline at end of property +1.3 \ No newline at end of property Index: head/mail/assp/pkg-plist =================================================================== --- head/mail/assp/pkg-plist (revision 218677) +++ head/mail/assp/pkg-plist (revision 218678) @@ -1,57 +1,53 @@ etc/periodic/daily/510.assp @dirrmtry etc/periodic/daily @dirrmtry etc/periodic lib/assp/addservice.pl lib/assp/assp.pl lib/assp/files/URIBLCCTLDS.txt lib/assp/files/blackdomains.txt lib/assp/files/bombre.txt lib/assp/files/invalidptr.txt lib/assp/files/ipnp.txt lib/assp/files/ipwl.txt lib/assp/files/nodelay.txt lib/assp/files/rbl-service.txt lib/assp/files/redre.txt lib/assp/files/whitedomains.txt -lib/assp/images/Thumbs.db lib/assp/images/assp.css lib/assp/images/dropShadow.gif lib/assp/images/editor.css lib/assp/images/favicon.ico lib/assp/images/info.png lib/assp/images/logo.jpg lib/assp/images/minusIcon.png lib/assp/images/noIcon.png lib/assp/images/opensource-logo.gif lib/assp/images/plusIcon.png lib/assp/images/shutdown.css lib/assp/images/sourceforge-logo.gif -lib/assp/images/valid-xhtml10.gif lib/assp/images/village.gif -lib/assp/images/xml-pill.gif lib/assp/move2num.pl lib/assp/rebuildspamdb.pl -lib/assp/repair.pl lib/assp/reports/helpreport.txt lib/assp/reports/notspamreport.txt lib/assp/reports/redremovereport.txt lib/assp/reports/redreport.txt lib/assp/reports/spamreport.txt lib/assp/reports/whiteremovereport.txt lib/assp/reports/whitereport.txt lib/assp/stat.pl lib/assp/stats.sh @dirrm lib/assp/reports @dirrm lib/assp/images @dirrm lib/assp/files @dirrm lib/assp sbin/assp sbin/assplog %%PORTDOCS%%%%DOCSDIR%%/Legacy - ASSP Documentation.htm %%PORTDOCS%%%%DOCSDIR%%/Regular Expression Tutorial.htm %%PORTDOCS%%@dirrm %%DOCSDIR%% -@unexec rm -f %D%%ASSP_HOME%%/reports 2>/dev/null || true -@unexec rm -f %D%%ASSP_HOME%%/images 2>/dev/null || true -@unexec rm -f %D%%ASSP_HOME%%/files 2>/dev/null || true -@unexec rmdir %D%%ASSP_HOME%% 2>/dev/null || true -@unexec if [ -d %D%%ASSP_HOME%% ]; then echo "If you are deinstalling ASSP completely, remove the %D%%ASSP_HOME%% directory."; fi +@unexec rm %%ASSP_HOME%%/reports +@unexec rm %%ASSP_HOME%%/images +@unexec rm %%ASSP_HOME%%/files +@unexec rmdir %%ASSP_HOME%% 2>/dev/null || true +@unexec if [ -d %%ASSP_HOME%% ]; then echo "If you are deinstalling ASSP completely, remove the %%ASSP_HOME%% directory."; fi Property changes on: head/mail/assp/pkg-plist ___________________________________________________________________ Modified: cvs2svn:cvs-rev ## -1 +1 ## -1.7 \ No newline at end of property +1.8 \ No newline at end of property