[Mimedefang] add_recipient and delete_recipient
Javier Kohan
jktmp01 at gmail.com
Thu Jul 14 16:21:19 EDT 2016
Hello, Im trying to use those functions in filter_recipient and they
seem not to work, at least in the way I use them.
The inteded use is to check incoming mail for some particular users in a
border gateway and in case they match, rewrite their domain so
sendmail, via mailertable, can send to another server instead.
Schematically
filter_recipient {
...
if( $recipient meets some condition ) {
# change userX at domain1.com to userX at domain2.com.
# change_domain() is checked to work
$newrec=change_domain($recipient) ;
add_recipient($newrec);
delete_recipient($recipient) # $recipient is the unmodified
argument of filter_recipient
}
....
return ( 'CONTINUE', 'ok' );
}
I checked via md_syslog in various places: the match, the values of
$recipient and $newrec, but sendmail logs shows the address unmodified
and sends it to domain1`s server
Is there anything wrong on how I assume those functions do work ?. Are
they restricted to only some filter_* and don´t work in
filter_recipient, or anything else I can be missing ?
Thanks
Javier
More information about the MIMEDefang
mailing list