LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 01-16-2008, 07:18 AM   #1
flschou
LQ Newbie
 
Registered: Jun 2005
Distribution: Suse Linux 9 Enterprise Server
Posts: 2

Rep: Reputation: 0
Unhappy Changing port in sendmail, sendmail not working.


Hi all,
For over a year now I've been working with linux(trixbox), and herin installed my own mailserver, and when installing the mailserver I needed to change the port for which sendmail listens, port 25. I changed it to port 2525, but my problem is that now when a mail is sent from my server to me(or anyone else) locally, it's not getting anywhere.
In my maillog I have the following: sendmail[1850]: m0GD2U80001850: to=XXXXXX@XXXXX.dk, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30029, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
When I change the port back to 25 it works just fine.
I can telnet localhost 2525, and here do the mail to, rcpt to, data and so on, and it works fine, the mail gets through and all.
But why do I get error on server sent mails, when sendmail is set to listen on port 2525??
It's only a problem when I have my server sent to local emails addys, when sending out of the house, it connects to my mailserver fine to do so.

This has been a puzzle for me in a very long time, and I have been reading boat load of sites to find the solution, can someone pls point in a direction, and not like just have sendmail listen on port 25, cause that's not really an option.

TIA

Regards
Flemming
 
Old 01-16-2008, 08:18 AM   #2
cconstantine
Member
 
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
you missed the MSA

modern sendmail uses a dual configuration. The mail transport agent (MTA) is what you've been configuring. Probably via a 'sendmail.mc' generating a 'sendmail.cf', probably in your /etc/mail directory. That's fine, you've changed it's listening port from tcp/25 to tcp/2525.

but sendmail also has a message submission agent (MSA) mode. This is just the sendmail engine running with a different configt (the "submit" config.) Many reasons why, beyond my time to explain here...

Anyway. Check your submit.mc (and the generated submit.cf), probably in your /etc/mail directory. The submit.mc usually has a line near the end that says "MTA is over here". And it's normally just [127.0.0.1] -- the square brackets telling it not to do an MX lookup for the named host, just connect straight away.

Now off the top of my head, I don't recall how to tell the *MSA* you've moved the port. But that's what you need to do.

-c
 
Old 01-16-2008, 08:20 AM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 438

Rep: Reputation: 56
I'm not sure if I understand your question properly. But SMTP standard assumes your smtp server is listening on port 25 (Or 465 for ssl-tunnel). A MTA (Mail transfer agent) will therefor connect to port 25. If the connection is closed, the MTA assumes there is no SMTP-server on the IP-address (Or a technical error).

So in order to get this to work, you would need a iptable roule to forward traffic from port 25 to 2525.
 
Old 01-16-2008, 08:59 AM   #4
flschou
LQ Newbie
 
Registered: Jun 2005
Distribution: Suse Linux 9 Enterprise Server
Posts: 2

Original Poster
Rep: Reputation: 0
Hot damn, it's working.

Hi Cconstantine and others..
In submit.cf I changed msp to my server local ip, instead of 127.0.0.1 and now it's working, sendmail is connecting through my mailserver and sending mails...this is how I wanted it to work, gr8, thank you C for pointing my in the direction of submit.cf.

Regards
Flemming
 
Old 01-16-2008, 09:03 AM   #5
cconstantine
Member
 
Registered: Dec 2005
Distribution: RedHat, Ubuntu
Posts: 101

Rep: Reputation: 15
.

Quote:
Originally Posted by flschou View Post
gr8, thank you C for pointing my in the direction of submit.cf.
you're welcome!
-c
 
  


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
Changing sendmail options mijohnst Linux - General 0 11-15-2006 10:31 AM
sendmail is not working & on $prompt the cmd sendmail hangs Pavan mahoorker Linux - Software 1 04-04-2006 03:57 PM
Sendmail and changing it's default listening port... darkarcon2015 Slackware 7 01-20-2005 11:17 PM
Sendmail settings. Will sendmail always answer "helo". (and tracing blocked port 25) Bjorkli Linux - Networking 5 05-24-2004 03:13 AM
Sendmail Port other than 25 DD2 Linux - Networking 1 01-23-2002 03:30 AM


All times are GMT -5. The time now is 01:48 AM.

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