[Mimedefang] From Specific Address's

Aaron Enders aenders24 at comcast.net
Fri Oct 21 10:44:32 EDT 2011


You my friend are ingenious this worked perfectly the first time 
through, I can't thank you enough. I do have one more piece to the 
puzzle I have a question on...

What filter part scans outgoing email? I would like to have all outgoing 
emails sent to said domains copied also..

Thank you very much


First you need a function to extract the domain address from any give
email address:

(I didn't write this function, I saw it on the web so credits are to
it's original author.)
sub canonicalize_domain ($) {
   my($sender) = @_;
   $sender =~ s/^<//;
   $sender =~ s/>$//;
   $sender = lc($sender);
   my (@mailadresi) = split (/@/, $sender);
   $domain= $mailadresi[1];
   return $domain;

You need to enable MX_SENDER check in your mimedefang settings,

And finally put the below code to into your filter_begin

$SenderDomain = canonicalize_domain($Sender);
if ($SenderDomain eq 'EXAMPLE.DOMAIN') {

On Fri, Oct 21, 2011 at 3:27 PM, Aaron Enders<aenders24 at comcast.net>  wrote:

>  Can mimedefang be used to inspect the "from" address and if it matches a
>  specific From *@example.com address forward a copy to another mailbox?
>  If so any examples would be appreciated.
>  Thank you
>  Aaron

More information about the MIMEDefang mailing list