Question : Configuring sendmail to allow outgoing mail to recipients in  two domains only

Hi
I need to configure sendmail to allow outgoing mail to two domains only ( i.e the "To" address can only be a user on one of two domains ). If the outgoing mail address does not belong to one of the two domain then the outgoing mail needs to be stored and not sent.

It doesn't matter who the sender is as long as the To address ( receipient  ) is a user in one of two domains.

Thanks

Answer : Configuring sendmail to allow outgoing mail to recipients in  two domains only

I don't know of any facility within sendmail capable of doing this. The only ways that I can think of to do this are:

1) A custom sendmail with code added to the check_compat() function to enforce the restriction and discard mail that fails.

2) Modification of a transport level anti-spam solution (like MailScanner or AMaViS).

3) Running the MTA instance in queue-only mode to a special "inbound queue" and using a script or Perl code to sort though the received messages move messages with the allowed addresses to mqueue and have another instance of sendmail running that processes mqueue.

Note that it isn't what's in the "To:" header that you'll be interested in but rather it is what is in the recipient envelope header.
Random Solutions  
 
programming4us programming4us