LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-28-2007, 04:46 PM   #1
klaxyn
LQ Newbie
 
Registered: Oct 2004
Distribution: CentOS
Posts: 4

Rep: Reputation: 0
sendmail smarthost


I have my web/mail server configured to route outbound mail through a smart host. My problem is if the smarthost is unavailable sendmail produces an error 'no route to host' and queues the mail for later delivery. It does not attempt to send the mail directly bypassing the smart host. My understanding is that by default sendmail would first try to send mail to the destination mail server and then try the smarthost if sending directly fails. What am I missing? My whole reason for having a 2nd smtp server is for redundancy, but this solves nothing.

Thanks!
klambert@earthmatrixhosting.net
 
Old 02-28-2007, 05:14 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
I haven't seen that definition before. As far as I know, smart_host is for relaying all mail. The only exception to this I've seen is at http://www.sendmail.org/m4/README.txt, where they talk about sending directly to hosts found via a local DNS server (that can't resolve external hosts) and using the smart_host for other hosts:
Code:
If you are running a local DNS inside your domain which is
not otherwise connected to the outside world, you probably want to
use:

	define(`SMART_HOST', `smtp:fire.wall.com')
	LOCAL_NET_CONFIG
	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3

That is, send directly only to things you found in your DNS lookup;
anything else goes through SMART_HOST.
 
Old 03-12-2007, 07:17 PM   #3
klaxyn
LQ Newbie
 
Registered: Oct 2004
Distribution: CentOS
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by gilead
I haven't seen that definition before. As far as I know, smart_host is for relaying all mail. The only exception to this I've seen is at http://www.sendmail.org/m4/README.txt, where they talk about sending directly to hosts found via a local DNS server (that can't resolve external hosts) and using the smart_host for other hosts:
Code:
If you are running a local DNS inside your domain which is
not otherwise connected to the outside world, you probably want to
use:

	define(`SMART_HOST', `smtp:fire.wall.com')
	LOCAL_NET_CONFIG
	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3

That is, send directly only to things you found in your DNS lookup;
anything else goes through SMART_HOST.

But if the smarthost goes down everything else will fail to deliver. How do you handle a situation where a smarthost is configured but the smarthost is unavailable. Can it fall back to send out directly to the recipients mail server?
 
Old 03-12-2007, 10:00 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
Quote:
Originally Posted by klaxyn
But if the smarthost goes down everything else will fail to deliver. How do you handle a situation where a smarthost is configured but the smarthost is unavailable. Can it fall back to send out directly to the recipients mail server?
There's not normally a need for a fallback, or to send directly. Sendmail will queue the mail and re-try periodically. The user should get a notification that contains something like "Warning, could not send message for past 4 hours" and if the mail is not delivered before the queue times out, they will get a failure message.

The timeout parameters are configurable. Have a look in your sendmail.cf file for options that start with Timeout. Uncomment and modify the ones you need. Here is the default list for sendmail 8.14:
Code:
#O Timeout.initial=5m
O Timeout.connect=1m
#O Timeout.aconnect=0s
#O Timeout.iconnect=5m
#O Timeout.helo=5m
#O Timeout.mail=10m
#O Timeout.rcpt=1h
#O Timeout.datainit=5m
#O Timeout.datablock=1h
#O Timeout.datafinal=1h
#O Timeout.rset=5m
#O Timeout.quit=2m
#O Timeout.misc=2m
#O Timeout.command=1h
O Timeout.ident=0
#O Timeout.fileopen=60s
#O Timeout.control=2m
O Timeout.queuereturn=5d
#O Timeout.queuereturn.normal=5d
#O Timeout.queuereturn.urgent=2d
#O Timeout.queuereturn.non-urgent=7d
#O Timeout.queuereturn.dsn=5d
O Timeout.queuewarn=4h
#O Timeout.queuewarn.normal=4h
#O Timeout.queuewarn.urgent=1h
#O Timeout.queuewarn.non-urgent=12h
#O Timeout.queuewarn.dsn=4h
#O Timeout.hoststatus=30m
#O Timeout.resolver.retrans=5s
#O Timeout.resolver.retrans.first=5s
#O Timeout.resolver.retrans.normal=5s
#O Timeout.resolver.retry=4
#O Timeout.resolver.retry.first=4
#O Timeout.resolver.retry.normal=4
#O Timeout.lhlo=2m
#O Timeout.auth=10m
#O Timeout.starttls=1h
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sendmail ignores my sendmail smarthost entry Paul_assheton Linux - General 1 03-17-2009 07:55 AM
Sendmail configuration (conditional smarthost?) link1305 Linux - Software 2 01-08-2007 01:24 PM
Howto configure sendmail SMARTHOST with authentication?? jfaberna Linux - Networking 3 02-22-2006 09:00 PM
sendmail: deliver every mail directly to the given smarthost TobyD Linux - Networking 3 02-18-2005 05:52 AM
Yet another Sendmail thread... SMARTHOST not working mychl Linux - Networking 1 03-15-2004 08:32 AM


All times are GMT -5. The time now is 01:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration