Page 1 of 1
Problems with using a SmartHost
Posted: Wed Mar 14, 2007 8:35 am
by divig
I want to configure Scalix to forward email to a smarthost (in fact our messagelabs service). I have followed the instructions from the Knowledgebase (see below) but it doesn't seem to work. I even tried restarting sendmail and rebooting the whole machine. Basically once I set the smarthost nothing gets sent.
Are these instructions still valid for Scalix 11? What logs or queues should I be looking in to try and find the problem?
1. Set the DS macro in the sendmail.cf file on the Scalix Server. Change the file from:
# "Smart" relay host (may be null)
DS
to
# "Smart" relay host (may be null)
DSoutboundserver.domain.com
where outboundserver.domain.com is the name of your internet-bound (messages) server/Smart Host.
2. Stop (omshut) and Start Scalix (omrc) after the change.
Posted: Wed Mar 14, 2007 9:08 am
by Valerion
That works for me.
What does outboundserver.domain.com resolve to? Does the IP address look right?
Are there any errors in /var/log/maillog related to this host?
Posted: Wed Mar 14, 2007 9:26 am
by divig
In the log I have found the following error:
Mar 9 08:40:58 post sendmail[30335]: l298SMCa030329: to=<echo@uk.uu.net>, delay=00:12:36, xdelay=00:12:36, mailer=relay, pri=120955, relay=cluster3.eu.messagelabs.com, dsn=4.0.0, stat=Deferred: Name server: cluster3.eu.messagelabs.com: host name lookup failure
However if I do an nslookup it works fine:
nslookup cluster3.eu.messagelabs.com
Server: 192.168.0.5
Address: 192.168.0.5#53
Non-authoritative answer:
Name: cluster3.eu.messagelabs.com
Address: 194.106.220.51
Name: cluster3.eu.messagelabs.com
Address: 194.106.220.67
Name: cluster3.eu.messagelabs.com
Address: 195.245.231.163
Name: cluster3.eu.messagelabs.com
Address: 195.245.231.211
Name: cluster3.eu.messagelabs.com
Address: 85.158.136.3
Name: cluster3.eu.messagelabs.com
Address: 85.158.136.35
Name: cluster3.eu.messagelabs.com
Address: 85.158.136.115
Name: cluster3.eu.messagelabs.com
Address: 85.158.136.211
Name: cluster3.eu.messagelabs.com
Address: 85.158.137.35
Name: cluster3.eu.messagelabs.com
Address: 85.158.137.67
Name: cluster3.eu.messagelabs.com
Address: 85.158.137.83
Name: cluster3.eu.messagelabs.com
Address: 85.158.137.99
Name: cluster3.eu.messagelabs.com
Address: 85.158.137.131
Name: cluster3.eu.messagelabs.com
Address: 85.158.137.147
Name: cluster3.eu.messagelabs.com
Address: 85.158.138.67
Name: cluster3.eu.messagelabs.com
Address: 85.158.138.83
Name: cluster3.eu.messagelabs.com
Address: 85.158.139.51
Name: cluster3.eu.messagelabs.com
Address: 85.158.139.67
Name: cluster3.eu.messagelabs.com
Address: 194.106.220.35
Posted: Wed Mar 14, 2007 9:53 am
by Valerion
Did you do the nslookup from the same machine? I assume you did. In that case the issue is definatedly with sendmail. I would check that /etc/resolv.conf is correct.
The DNS records for that address does look valid on my machine too.
Here's a good resource on troubleshooting this issue on a basic level:
http://www.unix.org.ua/orelly/networkin ... h21_01.htm
Please post again if you still can't get it resolved.
Posted: Wed Mar 14, 2007 12:22 pm
by KevinAnderson
Rather than restarting all of scalix, just restart sendmail. That'll have less impact on your users.
/etc/init.d/sendmail restart
Kev.
Posted: Wed Mar 14, 2007 12:44 pm
by divig
Yes I did nslookup from the same machine. I have checked /etc/resolv.conf and it is correct.
Like I said I tried restarting sendmail, however just to be sure I have just tried the setting again and restarted sendmail only. Same problem. Any other ideas?
Posted: Wed Mar 14, 2007 12:51 pm
by KevinAnderson
If you add the server to /etc/hosts, does it work?
Kev
Posted: Fri Mar 16, 2007 1:20 am
by linuslai
1. vi /etc/mail/sendmail.mc
dnl define(`SMART_HOST',`smtp.your.provider')
change to
define(`SMART_HOST',`smtp.mesagelabserver.com')
2. # omsendin
3. # service sendmail restart
4. # omoff -d0 smtpd ; sleep 1 ; omon smtpd
This works for me.
Posted: Fri Mar 16, 2007 2:01 pm
by KevinAnderson
Should there be 2 's'es in message labs in the smarthost definition?
Kev.
Posted: Mon Mar 19, 2007 6:35 am
by divig
Thanks for the omsendin instructions - I have never seen this before and couldn't even find this command documented. Unfortunately it still didn't work.
I must admit I haven't yet tried adding the server to /etc/hosts but I don't see why I should need to do this when the nslookup resolves correctly. And as you can see there are so many servers that I don't really want to have to do this. I will however try this as a test and let you know if it changes anything.
Posted: Tue Mar 20, 2007 7:51 am
by divig
I haven't had a chance to try the /etc/hosts change, but I found something else. While the nslookup works fine (as below), if I specifically ask for the MX record I get the following:
nslookup
> set type=mx
> cluster3.eu.messagelabs.com
;; Truncated, retrying in TCP mode.
;; connection timed out; no servers could be reached
It seems messagelabs don't maintain an MX record, I believe to avoid getting targeted by even more spammers. Is this most likely the cause of our problem? Is it possible to stop sendmail requiring a MX record? With our last mail system this wasn't an issue.
Thanks again for all the help!!!
Posted: Tue Mar 20, 2007 2:12 pm
by dahido
You can specify a smarthost by IP address instead of domain name.
DS[24.71.223.43]
That might get around it.
Thanks,
Jay
Posted: Wed Mar 21, 2007 5:40 am
by divig
The problem is that messagelabs have a whole cluster of servers so I don't want to pull out 1 IP only. Also there is the potential that they could change IPs at any time.
Posted: Wed Mar 21, 2007 5:48 am
by linuslai
divig wrote:I haven't had a chance to try the /etc/hosts change, but I found something else. While the nslookup works fine (as below), if I specifically ask for the MX record I get the following:
nslookup
> set type=mx
> cluster3.eu.messagelabs.com
;; Truncated, retrying in TCP mode.
;; connection timed out; no servers could be reached
It seems messagelabs don't maintain an MX record, I believe to avoid getting targeted by even more spammers. Is this most likely the cause of our problem? Is it possible to stop sendmail requiring a MX record? With our last mail system this wasn't an issue.
Thanks again for all the help!!!
I don't think scalix will need to lookup MX records for messagelabs.com.
As for my case, i just edit /etc/hosts with one single IP and hostname.
Everything works fine.
Your case, i don't think add in a single entry in /etc/hosts will help. Since the DNS will resolve multiple IP for you.
But then, i would suggest you to try edit one entry first in /etc/hosts.
Then monitor /var/log/maillog file.
Then decide what is the next step you should do.
If single entry works. That means multiple IP address lookup doesn't work with sendmail.
Just my 2 cents.

Posted: Mon May 14, 2007 6:07 am
by divig
Sorry about the delay in trying this, but it is hard to find a good time to play with such critical settings. I have however now tried adding a single entry to /etc/hosts and it still did not work - sane lookup errors.
Any other ideas?