Question : Sendmail - Relay SMTP

Forgive me if my terminology is a little off, I have never used sendmail or configured anything other than email clients before.

So I have a development box that my team used for web based scripts, etc...  We would like the box to be able to send mail to our corporate email address with results, alarms, etc...  So I installed sendmail (newest version) from source.  I am able to send mail to all domains except our corporate email accounts.  What I was interested in doing is bouncing the mail off of a different SMTP server that is able to send to our corporate accounts.  We have this SMTP as an open relay inside of our corporate environment.  

My question is how to I enables sendmail to send through this SMTP server that resides on a different server?

Answer : Sendmail - Relay SMTP

Is the domain name of the server the same as the domain of your corp email addresses you're trying to get to? That would cause any email to those address to stay local on the sendmail server rather than getting sent to the appropriate email server.

Either way, edit your /etc/mail/mailertable file do look like this:

corpdomain.com      esmtp:[1.1.1.1]

Where corpdomain.com is the email domain of your corporate email addresses you're trying to get to and 1.1.1.1 is the IP address of the email server that handles mail for that domain (your exchange server or whatever it is). This will override normal mailflow for that domain and force it to be delivered to that IP address.

Then remake the mailertable map:

# makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable

And then restart sendmail.
Random Solutions  
 
programming4us programming4us