Emrecan,

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
Aaron


Hi,

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') {
  add_recipient('YOUR_RECIPIENT');
}

On Fri, Oct 21, 2011 at 3:27 PM, Aaron Enders<[email protected]>  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


_______________________________________________
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

Reply via email to