LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-17-2017, 10:14 AM   #1
timinator
Member
 
Registered: Sep 2006
Posts: 39

Rep: Reputation: 15
Unable to relay mail


Hi, we have a Unix server that uses our Fedora Linux box to relay mail. This has worked in the past. The unix server is listed in the /etc/mail/access file. When I do a test email from unix to Fedora I get the following messages:

"Connecting to [172.17.X.X] via relay.....Connection refused by [172.17.X.X].

Any suggestions would be appreciated - thanks
 
Old 11-17-2017, 12:08 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
If 172.17.X.X is the IP address of the Linux server, I'd guess that you don't have an MTA running on that server...but that's just a WAG. Please tell us:
The MUA being used on the UNIX box
The MUA on the Linux box
What is different now from when it "worked in the past"
 
Old 11-17-2017, 01:59 PM   #3
timinator
Member
 
Registered: Sep 2006
Posts: 39

Original Poster
Rep: Reputation: 15
Sendmail on both boxes. Not sure what MUA is being used.
 
Old 11-17-2017, 04:12 PM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by timinator View Post
Sendmail on both boxes. Not sure what MUA is being used.
Sorry. I meant MTA, not MUA...fat fingers. Also, sorry, I don't speak sendmail...
You're sure that sendmail is running and listening?
 
Old 11-19-2017, 08:27 AM   #5
timinator
Member
 
Registered: Sep 2006
Posts: 39

Original Poster
Rep: Reputation: 15
[root@netmax2 ~]# sudo lsof -i :25
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sendmail 1319 root 4u IPv4 17455 0t0 TCP netmax2.xxxsmotor.com:smtp (LISTEN)
 
Old 11-21-2017, 03:24 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
sendmail 1319 root 4u IPv4 17455 0t0 TCP netmax2.xxxsmotor.com:smtp (LISTEN)
Are you sure that netmax2.xxxsmotor.com resolves to 172.17.X.X?
According to your OP, the unix server is trying to connect to 172.17.X.X in order to relay mail
 
Old 11-21-2017, 03:38 PM   #7
timinator
Member
 
Registered: Sep 2006
Posts: 39

Original Poster
Rep: Reputation: 15
Got it to work in a weird way:

I commented out the following line in sendmail.cf on the Linux box

#O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
 
Old 11-21-2017, 05:02 PM   #8
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by timinator View Post
Got it to work in a weird way:

I commented out the following line in sendmail.cf on the Linux box

#O DaemonPortOptions=Port=smtp,Addr=127.0.0.1, Name=MTA
That means that sendmail was listening only on the local loopback interface and that 127.0.0.1 resolves to netmax2.xxxsmotor.com instead of localhost.

Just a FYI:
This is not the adequate way to change sendmail options.
You need to edit sendmail.mc and use either one of the following:
Code:
DAEMON_OPTIONS(`Port=smtp,Name=MTA’)dnl
dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
Then run the following command to create the new sendmail.cf (don't forget to make a backup of the old sendmail.cf):
Code:
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
After that, restart the sendmail service

Regards

PS: Mark the thread SOLVED
 
Old 11-22-2017, 07:17 AM   #9
timinator
Member
 
Registered: Sep 2006
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks for the reply. Can you explain a couple of things?

What is "dnl"?

and what is "m4"?

Thanks
 
Old 11-22-2017, 07:40 AM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
Originally Posted by timinator View Post
Thanks for the reply. Can you explain a couple of things?

What is "dnl"?

and what is "m4"?

Thanks
Everything is explained here
 
  


Reply



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
Configure Postfix to relay mail to multiple internal mail servers w/different domains tristopherr Linux - Server 2 05-08-2011 06:23 AM
Unable to connect to mail relay server alpha01 Linux - Server 5 08-18-2009 10:13 PM
Postfix as a mail relay (getting relay access denied) hypexr Linux - Software 3 09-13-2005 07:15 PM
relay mail to sendmail relay server??? lemay_jeff Linux - Newbie 0 07-06-2004 04:54 PM
Unable to resolve relay-test.mail-abuse.org ldare Linux - Networking 2 04-11-2003 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:02 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
Open Source Consulting | Domain Registration