[Mimedefang] From Specific Address's

emrecan ural hellishglare at gmail.com
Fri Oct 21 08:37:57 EDT 2011


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 <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
> _______________________________________________
> 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 MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>



More information about the MIMEDefang mailing list