> -----Original Message-----
> From: [EMAIL PROTECTED]
> I want to be able to add the disclaimer only if the domain =
> abc.com I can get the whole mail address from $sender but I
> do not know how to use perl to strip just the domain from
> this. Or is there another way?
> I need help with the "message_is_outgoing" definition please
Testing for sender address is probably not the best way to do this. I would
suggest testing for specific IP address(es) that are allowed to send.
Example:
sub message_is_outgoing($) {
my ($RelayIP) = @_;
# Use the next section if outgoing mail
# originates on this server.
if ($RelayIP eq "127.0.0.1") {
return 1;
}
# Use the next section if outgoing mail
# originates from a specific internal server.
if ($RelayIP eq "192.168.1.50") {
return 1;
}
# Use the next section if outgoing mail
# originates from any client on this net.
if ($RelayIP =~ /^192\.168\.2\.") {
return 1;
}
return 0;
}
Call using
if ( message_is_outgoing($RelayAddr) )
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang