[Mimedefang] resend_message question
Charles Mount
cmount at csc.com
Thu Jul 7 12:31:17 EDT 2005
I am getting this error message
Slave 3 stderr: Use of uninitialized value in pattern match (m//) at
/etc/mail/mimedefang-filter line 306.
----------------------------------------------------------------------------------------
"James Ebright"
<jebright To: mimedefang at lists.roaringpenguin.com
@esisnet.com> cc:
Sent by: Subject: Re: [Mimedefang] resend_message question
mimedefang-bounc
es
07/07/2005 08:40
AM
Please respond
to mimedefang
On Wed, 6 Jul 2005 16:52:42 -0500, Charles Mount wrote
> What I want to do is to capture these messages to get more
> information on their source. Mi idea is to use this command. I
> need to know where to put it within mimedefang-filter.
>
> if ($ip =~ /^123.234/) {resend_message('firewall.bounce at comp.any');}
>
> I assume I will also need a line like
> my($sender, $ip, $name, $helo) = @_;
> which I also need to know where to put.
I would probably try this in filter_end before spamassasin rules (if any)
as
all of the information you need should be available there. You also might
consider using KAMs report safe code to implement a report similar to this,
note, this expects the "report" to be available in the variable $report
(although simple enough to change this) and the default filter uses $report
inside filter_end and fills it inside spam_assassin_check(); call, just be
aware of this to avoid unexpected "reports":
# BEGIN REPORTSAFE - KAM 10-29-2003
# Implement Report_Safe -- Thanks to James W. Curtis for
the
original starting code!
my ($container, $parser, $original, $report2);
$container = MIME::Entity->build(Type => 'message/rfc822',
Description => 'Original message before MIMEDefang', Data => [ "" ]);
$parser = new MIME::Parser;
open(IN, '< INPUTMSG');
$original = $parser->parse(\*IN);
close(IN);
$original->head()->replace('X-Relay-Addr', $RelayAddr);
$RelayHostname ||= 'N/A';
$original->head()->replace('X-Relay-Host', $RelayHostname);
$original->head()->replace('X-Relay-Time',
scalar(localtime));
# Add the original message to the container
$container->add_part($original);
#JRE Outlook would display only a blank page, because the
SA
#report was tagged as having a FileName
$report2 = MIME::Entity->build(Type => 'text/plain',
Description => 'SpamAssassin Warning', Data => ["$report\n"], Disposition
=>
"inline", Encoding => "-suggest");
$entity->parts([$report2]);
$entity->head()->mime_attr('content-type' =>
'multipart/mixed');
$entity->head()->mime_attr('content-type.boundary' =>
'------------=_' . scalar(time) . "-$$-nikc");
$entity->add_part($container);
action_rebuild();
# END REPORTSAFE
Jim
--
EsisNet.com Webmail Client
_______________________________________________
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
More information about the MIMEDefang
mailing list