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!

Relaying outgoing mail problem

Status
Not open for further replies.

mchirara

ISP
Jul 9, 2002
2
US
Hi,

I have 2 machines: sendmail 8.11 (mail.domain.com) and an antivirus
for smtp machine (mailscan.domain.com).

My MX for domain.com is pointing to mailscan.domain.com so that every
incoming email goes to mailscan.domain.com which forwards it to
mail.domain.com


This work ok.

For outgoing email, I setup mailertable with the following:
. relay:[mailscan.domain.com]

note the leading .

With this setup, when user@domain.com sends a mail to
someuser@outsidedomain.com, the mail is forwarded to
mailscan.domain.com and then to outside world.

My problem is that when user@domain.com sends an email to
anotheruser@domain.com,
the mail is not forwarded to mailscan.domain.com. Sendmail in
mail.domain.com treats that mail because it is a local account. Basically, I want the outgoing mail
to go mailscan.domain.com which then sends it back to mail.domain.com

Of course I want to avoid an infinite loop, meaning that sendmail sends all emails to mailscan which then forwards all local account to sendmail and so on...


Thanks for your help in advance.

Mohsen

 
U have two options here:)
1. On the machine mailscan.domain.com: Add feature "RELAY_ENTIRE_DOMAIN to your sendmail.mc file and generate the sendmail.cf file to have support for relaying the domain domain.com. Then create a file called /etc/mail/relay-domains and add ur domain to it..restart sendmail.. u should be able to relay the mails from mail.domain.com machine.

2. On the machine mailscan.domain.com: Add feature "RELAY_HOSTS_ONLY" to your sendmail.mc file and generate the sendmail.cf file to have support for relaying the host mail.domain.com. Then create a file called /etc/mail/relay-domains and add the machine mail.domain.com to it..restart sendmail.. u should be able to relay the mails from mail.domain.com machine.

Hope this helps..

Regds,

- Hemant
 
Thanks for your answer but I have one problem

mail.domain.com is the sendmail machine.
mailscan.domain.com is an NT machine with antivirus for SMTP


My users (of say outlook express) have their SMTP and pop3
pointing to mail.domain.com. (not mailscan.domain.com)
1. So if they send a mail to anotheruser@domain.com, mail.domain.com takes care of the email without sending it to mailscan.domain.com. Hence it is not being scanned.
2. And if they send a mail to someuser@outisidedomain.com, the mail goes through mailscan.domain.com.


My problem really relies on point 1. The sendmail machine does not forward local accounts. How do I make it go to mailscan.domain.com, get scanned and then transferred back to mail.domain.com.

PS: I do not want my users have their smtp pointing to mailscan.domain.com as it is an NT machine and I will soon add SMTP AUTH to my sendmail machine (to force authentication for outigoing mails)

Thanks






 
OKay.
If the anotheruser@domain.com user is a user residing on mail.domain.com machine, then sendmail will obviously deliver it to the local machine, without sending it through mailscan.domain.com.

Atleast I dont see any workaround to recieve mails for local users through another smtp server.

Openions from others are welcome so that i will also know doing this kinda config!

Regds,

- Hemant
 
How about entering the line in mailertable as:

.domain.com smtp:[mailscan.domain.com]

?
 
Forget my suggestion. I just realised after posting that it would loop as you mentioned. Sorry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top