I have to add a disclaimer as an attachment to all outgoing emails on my
server. I managed to do this but the disclaimer is added to all mail (in
and out)

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?



It depends on your definition of "outgoing".

If you can define it as mail sent from your own IP addresses, maybe
you can define it by testing $RelayAddr.

Testing by the sender address (which is $Sender not $sender) is
not as good, since anyone might send mail with your domain in the
sender address, including spammers and viruses.

Something like this:

if ($RelayAddr =~ /66\.8\.25\./) {
        # add that attachment
}



Joseph Brennan
Academic Technologies Group, Academic Information Systems (AcIS)
Columbia University in the City of New York

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[email protected]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to