Greetings,
    I believe the 'access_db' feature in Sendmail is the solution 
you seek. For example, in your external server's access file for 
(/etc/mail/access), the entries:

192.168 REJECT
192.168.0.1     RELAY
192.168.0.2     ERROR:5.7.1:550 Sorry, SPAM not allowed
192.168.0.3     OK

should reject all connections from the 192.168.#.# domain and 
allow only 192.168.0.1 to connect and relay messages. Connections 
from 192.168.0.2 will give an error message. Finally, 192.168.0.3 
will be able to connect and send mail only to that server. I use a 
similar configuration on my systems. Another idea is to block the 
unwanted servers/domains from within tcp wrappers (/etc/hosts.allow - 
/etc/hosts.deny). 
Hope this helps,
Ken

# 'access' file syntax:
# IP/domain/email (Partials OK) ACTION (See below)
#
# ACTION:
# REJECT        Issue error message, drop message
# OK            Absolutely accepts message from specified address
# DISCARD       Drops message from specified message
# RELAY Relays message from incoming address
# ERROR:"[DSN:RFC821 CODE] Text"  Error response 

>Hi all,
>I am trying to get the following results with sendmail:
>
>- I have an external mail gateway which receives mail from other domains to
>my domain. This host should perform spam filtering, and forward messages to
>an internal mail server which is accessed by users.
>
>- The internal mail server sends mail directly to external domains.
>
>- Due to the above conditions, the external mail gateway "should not" get
>any mail coming from an address on my own domain, so I want to put a filter
>that rejects messages which come from my domain.
>
>I've been searching the net, but the closest I got was to use the access
>database, which did not get the job done, since if I added my domain to it,
>then I would be unable to send mail to addresses in the domain.
>
>If anyone has done something like this or could point me to a site with info
>on the subject, I would really appreciate it.
>
>Cheers,



-- 
redhat-list mailing list
unsubscribe mailto:[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to