Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to relay only company domain mail to a specific server?

Status
Not open for further replies.

coolsti1954

Programmer
May 8, 2008
2
DK
I have used sendmail often, but never had to configure it so I know very little about doing so.

Here is the problem: My Linux PC's are connected to our company main Windows 2003 server, srv01.mycompany.com. Recently we set up a new Exchange server to handle our emails, srv07.mycompany.com. After this was done, I could still send emails out with sendmail to external email addresses, but I no longer can send emails to people within the company.

When I look at the maillog entries, I see that emails to company employees has "relay=srv01.mycompany.com". The mails are being sent to the main company server, and most likely being dropped there instead of being passed on to the Exchange server.

I tried to force use of srv07 instead of srv01 by adding the line

define('SMART_HOST',`srv07.mycompany.com')dnl

to sendmail.mc, reconfiguring and restarting sendmail. Doing this, I can send mail to company employees, but no longer can send mail to external addresses (they also get relayed to srv07 and then bounced back saying I do not have permission, which is certainly an anti-spam protection).

So my question: How can I set up sendmail to relay to srv07 only the mail that is addressed to *.mycompany.com? I think this is what I need to do here.

Thanks for any help!
 
I would enable mailtable. That is the way to subvert DNS and get the mail routing the way you like. The mycompany.com would have an entry that points to srv07.mycompany.com.
 
Hi and thanks for the tip!

I found out after reading a bit on the sendmail site that mailing tables is what I needed. These were already enabled, but empty, and I just needed to make the one entry for my company, create the database file, remove the "SMART" entry and restart the daemon and it works as I want now.

Thanks again!

- Steve, Denmark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top