$datenumber and $hostname for inline.sig

Andrew MacLachlan andy.mac at global-domination.org
Sat Apr 28 02:19:32 IST 2007


X- andy.mac at global-domination.org
X-Spam-Status: No

I have a need to capture the $datenumber and $hostname variables so that
they can be used to build up a simple url in the inline signature for
clean messages so end-users can easily report a message as spam.
I have written the cgi - which works just fine, however from the release
notes and from experience I know that only $from, $id and $subject are
available here (unlike recipient.spam.report.txt).

Is there any workaround for this?
Is this something that would benefit others?

inline.sig.txt:

Click here to report this message as spam.
http://$hostname/cgi-bin/learn-msg.cgi?datenumber=$datenumber&id=$id

learn-msg.cgi (please excuse the horrible code):

#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
print "Content-type: text/html \n\n";

$query    = new CGI;
$salearn = "/usr/bin/sa-learn --spam";
$id = param("id");
$datenumber = param("datenumber");
$msgtolearn = "/var/spool/MailScanner/quarantine/$datenumber/nonspam/$id";

open(MAIL, "|$salearn $msgtolearn") or die "Cannot open $salearn: $!";
close(MAIL);

# redirect to success page
print "<meta http-equiv=\"refresh\" content=\"0;URL=/learned.html\">";


Any suggestions welcome!

Regards,
Andrew MacLachlan

http://www.global-domination.org/








More information about the MailScanner mailing list