[Mimedefang] Copying specific sender addresses to another mailbox.

Martin Ferguson martin at mve.com
Fri Jun 4 06:23:36 EDT 2004


Hi,

I need to copy all mail sent from specific addresses in my domain to another
address for archive purposes, i.e. sales at mydomain.com or
support at mydomain.com to archive at mydomain.com.

I've been using Mimedefang for sometime now, however my rules are somewhat
basic due to my limited knowledge of perl, any help with this one much
appreciated.

>From the man page, I'm thinking filter_sender is what I need to call. I have
the following in my filter.....

sub filter_sender {
    my($sender, $hostip, $hostname, $helo) = @_;
    if ($sender =~
    /support\@mydomain.com/i)
    {
    add_recipient('archive at mydomain.com');
    }

}

I'm not really sure the correct place to call filter_sender in the filter.

I've enabled MX_SENDER_CHECK=yes in the init script, so filter_sender is
definitely being called.

All messaged are currently rejected. (on a test machine though, so not to
much of a panic)

Martin.







More information about the MIMEDefang mailing list