Google

SMTP bastion host

SMTP bastion host

Contact:[email protected]

> I attempted to make a bastion host that basically runs sendmail 8.10.1 
> and sits in the DMZ of our network. It's responsibility is to accept 
> all incoming E-mails for corporate and forward it into an internal MS 
> Exchange server. This it does fine. What I also want it to do is also 
> act as a relay server to the outside world for the Exchange server. 
> [...] 


IMHO the best way to do what you want is as 
follows: 
A) make the bastion host primary MX for "internal" domains 
B) use mailertable for "internal" domains routing 
C) allow relaying from some internal IP addresses 
D) allow relaying to "internal" domains 



Additional info: 
B1) add the following line to your *.mc file 
FEATURE(`mailertable',`hash /etc/mail/mailertable)dnl 
B2) in the mailertable file add the following line 
domain1.internal esmtp:[ip-address] 
domain2.internal esmtp:[ip-address] 
B3) compile mailertable with makemap 


C) in your access file add the following line 
connect:ip-address 


D) in your access file add the following line 
to:domain1.internal 
to:domain2.internal 


OR use "non local" virtusertable 
*.mc file: 
VIRTUSER_DOMAIN_FILE(/etc/mail/virtuser_domains)dnl 
FEATURE(`virtusertable',`hash /etc/mail/virtusertable')dnl 


/etc/mail/virtuser_domains file: 
domain1.internal 


It will allow relaying to domain1.internal and it will give 
a chance to redirect some addresses in the domain to another 
internal mail server e.g. 
virtysertable file: 
[email protected] [email protected] 


-------------------- 
URL(s): 
http://www.sendmail.org/tips/relaying.html 
Allowing controlled SMTP relaying in Sendmail 8.9 


Back to the Index