LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 12-03-2004, 03:46 PM   #1
levand
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Rep: Reputation: 0
sendmail and external mail server


Hi,

I am using sendmail for my MTA. Unfortunately, my ISP blocks connections
on outgoing port 25 to anything but their own smtp server.

I have verified this as I can send mail to myself on my ISP's mail server using
my sendmail.

My question is how to configure sendmail to use 'smtp.myisp.net' for all outgoing
mail.

I have edited sendmail.mc to contain:

define(`SMART_HOST', `smtp.myisp.net')

ran "make -C /etc/mail" and restarted sendmail.

Still, the same problem - No route to host. Mail gets deferred.
Is there something else I should do?

Please help. I use Fedora Core 3. Thanks.
 
Old 12-03-2004, 04:57 PM   #2
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
This question has a *large* number of things that could be causing it...

Can you telnet smtp.myisp.net 25 and get connected?
 
Old 12-03-2004, 05:15 PM   #3
levand
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
Yes I can "telnet smtp.myisp.net 25".

However, I can not "telnet any.host.net 25".

Here is a message I get in the maillog:


Dec 3 16:08:42 alpha sendmail[8449]: iB3JvknM007455: to=<levand@yahoo.com>, ctladdr=<root@alpha.cashorcharge.net> (0/0), delay=02:10:56, xdelay=00:00:00, mailer=relay, pri=480322, relay=eforward2.name-services.com., dsn=4.0.0, stat=Deferred: eforward2.name-services.com.: No route to host

Can you help me understand this?

Thanks a lot.
 
Old 12-03-2004, 05:21 PM   #4
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Yes. It means that your sendmail process can't connect to eforward2.name-services.com (which I'm assuming is your smart host?) on port 25, so it deferred the mail until later when it will try again.
 
Old 12-03-2004, 10:59 PM   #5
levand
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
No, actually my SMART_HOST=smtp.tds.net
Not sure why it tries to contact eforward2.name-services.com

I do not see this name in any of the files in my /etc/mail directory.
That's why I am puzzled.
 
Old 12-04-2004, 12:10 AM   #6
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Ah ... It's trying to send a failure notice for the mail you sent to levand@yahoo.com to you (root@alpha.cashorcharge.net), but is failing to connect to the MX for cashorcharge.net, which is eforward2.name-services.com.

Do you own cashorcharge.net, or did you just decide to name your machine that?

This should tell you two things. 1) You're not able to send mail to yahoo.com (obviously), and 2) your smart host entry in the config isn't working

Last edited by sigsegv; 12-04-2004 at 12:11 AM.
 
Old 12-04-2004, 12:46 AM   #7
levand
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
Yes. I do own cashorcharge.net. Sending mail to root@alpha.cashorcharge.net works fine.
I just checked it again.

Besides, alpha.cashorcharge.net is the local machine from which I am trying to send mail
anyway. It is in my /etc/hosts file. So, I am not sure why it would try and look up the MX for it?
And, indeed I do receive failure notification as locally delivered mail a few hours after
I try to send email to levand@yahoo.com.
The message regarding eforward2.name-services.com, however, comes just a few seconds
after the unsuccessfull attempt to send to levand@yahoo.com

Regarding your two points, yes my SMART_HOST is not working, the question is why?
There must be something else in sendmail config, that I do not know about.

I have perfromed this trick on another machine in my domain before, but using
postfix instead of sendmail, and it worked fine. It should be possible with
sendmail somehow, right?
 
Old 12-04-2004, 01:38 AM   #8
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
You can always disable MX lookups for the smart host by enclosing the hostname in brackets.
define(`SMART_HOST', `[smtp.myisp.net]')

...or if all else fails, you can always specify the mailer:host, but sendmail should be able to figure out which mailer to use. Might be worth a try.
define(`SMART_HOST', `relay:[smtp.myisp.net]')
 
Old 12-04-2004, 10:39 AM   #9
sigsegv
Senior Member
 
Registered: Nov 2004
Location: Third rock from the Sun
Distribution: NetBSD-2, FreeBSD-5.4, OpenBSD-3.[67], RHEL[34], OSX 10.4.1
Posts: 1,197

Rep: Reputation: 46
Quote:
Originally posted by levand
I have perfromed this trick on another machine in my domain before, but using
postfix instead of sendmail, and it worked fine. It should be possible with
sendmail somehow, right?
Yes it's possible ... Sendmail's configuration is the only reason why I dumped it for postfix in mid 1999. Sendmail is a great MTA, but the days of not being able to write human readable config files are (thankfully) over.

Incidentally though, postfix is great and I've never looked back.
 
Old 12-04-2004, 03:08 PM   #10
levand
LQ Newbie
 
Registered: Nov 2004
Posts: 14

Original Poster
Rep: Reputation: 0
Thank you people for your help.
Enclosing it in square brackets as suggested by scowles
did the tric. It works fine now.

Thanks again for your kind help.
 
Old 12-17-2004, 10:45 AM   #11
imranahmad
LQ Newbie
 
Registered: Dec 2004
Location: pakistan
Posts: 1

Rep: Reputation: 0
How to Configure smarthost using SMTP
for bellow mantioned environment

1. one linux sendmail server
2. one symantec Mail Seciurity SMTP server for scanning mail
3. 20 windows users

my target is, if our user send the mail for xyz@abc.com (remote user) thorugh sendmail linux server, The mail going through linux server then symantec antivirus server for scanning and then the remote user.

how to configure the sendmail for above mantioned information.

Kindly help me

imran ahmad
 
  


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 - Can receive external, no local mail though macdonalder Linux - Software 2 11-18-2005 04:04 AM
sendmail server unable to receive external mail goonfui_wong Linux - Networking 7 07-01-2005 03:15 AM
configure sendmail to use external mail server Drogo Linux - Software 0 09-16-2004 10:16 PM
Postfix mail server not accepting incoming mail from the external interface rexmundi Linux - Networking 7 12-22-2003 04:41 PM
configuring sendmail to use external mail servers tt826 Linux - Networking 42 12-05-2003 12:13 PM


All times are GMT -5. The time now is 06:14 PM.

Main Menu
Advertisement
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