On Tue, 16 Jan 2007, An.H.Nguyen wrote:
> Below you'll find my filter code and the manual smtp session output and
> one of the bounce message headers (note that I replaced the actual
> server with mimedefang_server and similarly for [EMAIL PROTECTED])
>
> sub filter_recipient
> {
> my($recip, $sender, $ip, $host, $first, $helo, $rcpt_mailer,
> $rcpt_host, $rcpt_addr) = @_;
>
> my $relay = undef;
> $relay = "internal_server" if ($recip =~ m/[EMAIL PROTECTED]/i);
Most of the time $recip will be something like <[EMAIL PROTECTED]>.
Note the < and >. Your regular expression is testing for "@domain.com"
at the _end_ of the string.
Try something like:
$relay = "internal_server" if ($recip =~ m/[EMAIL PROTECTED]>?$/i);
Regards,
Kees.
--
Kees Theunissen
F.O.M.-Institute for Plasma Physics Rijnhuizen, Nieuwegein, Netherlands
E-mail: [EMAIL PROTECTED], Tel: (+31|0)306096724, Fax: (+31|0)306031204
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID. You may ignore it.
Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list [email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang