Problems with using a SmartHost

Discuss the Scalix Server software

Moderators: ScalixSupport, admin

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Problems with using a SmartHost

Postby divig » Wed Mar 14, 2007 8:35 am

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.

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Wed Mar 14, 2007 9:08 am

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?

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Postby divig » Wed Mar 14, 2007 9:26 am

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

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Wed Mar 14, 2007 9:53 am

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.

KevinAnderson

Postby KevinAnderson » Wed Mar 14, 2007 12:22 pm

Rather than restarting all of scalix, just restart sendmail. That'll have less impact on your users.

/etc/init.d/sendmail restart

Kev.

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Postby divig » Wed Mar 14, 2007 12:44 pm

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?

KevinAnderson

Postby KevinAnderson » Wed Mar 14, 2007 12:51 pm

If you add the server to /etc/hosts, does it work?

Kev

linuslai

Postby linuslai » Fri Mar 16, 2007 1:20 am

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.

KevinAnderson

Postby KevinAnderson » Fri Mar 16, 2007 2:01 pm

Should there be 2 's'es in message labs in the smarthost definition?

Kev.

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Postby divig » Mon Mar 19, 2007 6:35 am

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.

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Postby divig » Tue Mar 20, 2007 7:51 am

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!!!

dahido

Postby dahido » Tue Mar 20, 2007 2:12 pm

You can specify a smarthost by IP address instead of domain name.

DS[24.71.223.43]

That might get around it.

Thanks,
Jay

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Postby divig » Wed Mar 21, 2007 5:40 am

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.

linuslai

Postby linuslai » Wed Mar 21, 2007 5:48 am

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. :-)

divig
Posts: 44
Joined: Mon Aug 21, 2006 7:44 am

Postby divig » Mon May 14, 2007 6:07 am

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?


Return to “Scalix Server”



Who is online

Users browsing this forum: No registered users and 2 guests

cron