custom function
Valmiki N. Ramsewak
lilvalo at MIKIBOY.COM
Tue Jul 13 19:30:53 IST 2004
Hi Julian,
Did as you said:
sub InternalForward {
my($fromac, $fromdomain, $final);
my($message) = @_;
$fromac = lc($message->{from});
$fromdomain = lc($message->{fromdomain});
$fromac =~ s/\@.*$//; # Leave everything before @
$final = 'foward ' . $fromac . '-spam@' . $fromdomain;
MailScanner::Log::InfoLog("%s", $final);
return $final;
}
it still does the same problem i'm having.
its modifying the FROM address.
I need it to modify the TO address, or more specifically the address the
MTA is trying to deliver to (since i'm not sure how multiple to addresses
would work)
Thanks
Valmiki
On Tue, Jul 13, 2004 at 06:59:59PM +0100, Julian Field wrote:
> At 17:23 13/07/2004, you wrote:
> >sub InternalForward {
> > my($fromac, $fromdomain, $final);
> > my($message) = @_;
> > $fromac = lc(@{$message->{to}}); // <--- that messed up line
>
> $fromac = lc($message->{from});
>
> > $fromdomain = $fromac;
>
> $fromdomain = lc($message->{fromdomain});
>
> > $fromac =~ s/\@.*$//; # Leave everything before @
> > $fromdomain =~ s/^.*\@//; # Leave everything after @
>
> Delete that line.
>
>
> > $final = 'forward ' . $fromac . '-spam@' . $fromdomain;
> > MailScanner::Log::InfoLog('$final');
>
> Change that to
> MailScanner::Log::InfoLog("%s", $final);
> so that you don't get attacked by format string vulnerabilities.
>
> > return $final;
> >}
>
> --
> Julian Field
> www.MailScanner.info
> Professional Support Services at www.MailScanner.biz
> MailScanner thanks transtec Computers for their support
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
>
> -------------------------- MailScanner list ----------------------
> To leave, send leave mailscanner to jiscmail at jiscmail.ac.uk
> Before posting, please see the Most Asked Questions at
> http://www.mailscanner.biz/maq/ and the archives at
> http://www.jiscmail.ac.uk/lists/mailscanner.html
--
Got Speed?
www.mikiboy.com
aim: lilvalo
-------------------------- MailScanner list ----------------------
To leave, send leave mailscanner to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/ and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
More information about the MailScanner
mailing list