LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 04-07-2019, 06:19 AM   #1
lloyd2012
LQ Newbie
 
Registered: Apr 2019
Posts: 2

Rep: Reputation: Disabled
exim4 won't bind to port 25


Hi,

I'm new to linux in past year or so and I am hoping someone might be able to help sort this problem or point me in the right direction to sorting it. I have set up Debian 9 (4.9.0-4-amd64 #1 SMP Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux) on my old mac mini 2,1 to run minidlna as a music server, dropbox as a headless backup, and backup other files on my main mac to it.

I have been getting errors with exim4. The paniclog fills up with following mesage below:

Code:
2019-03-22 18:40:28 socket bind() to port 25 for address ::1 failed: Cannot assign requested address: daemon abandoned
2019-03-23 11:23:19 socket bind() to port 25 for address ::1 failed: Cannot assign requested address: daemon abandoned
2019-03-30 15:47:38 socket bind() to port 25 for address ::1 failed: Cannot assign requested address: daemon abandoned
paniclog (END)
I have tried uninstalling and reinstalling exim4 and running the debian exim4 configurator but it has not helped.

When I interrogate the sockets, using ss -tu, I cannot see anything attached to port 25:

Code:
Netid State Recv-Q Send-Q Local Address: Port Peer Address: Port
tcp CLOSE-WAIT 32 0 10.0.0.2:46820 162.125.64.7:https
tcp CLOSE-WAIT 1 0 10.0.0.2:44018 34.195.170.150:https
tcp CLOSE-WAIT 32 0 10.0.0.2:60022 162.125.33.7:https
tcp CLOSE-WAIT 32 0 10.0.0.2:35004 162.125.64.3:https
tcp ESTAB 0 232 10.0.0.2:ssh 10.0.0.3:50221
tcp ESTAB 0 0 10.0.0.2:42808 162.125.18.133:https
tcp CLOSE-WAIT 32 0 10.0.0.2:36238 162.125.64.3:https
tcp ESTAB 0 0 10.0.0.2:42802 162.125.18.133:https
I wondered if was related to the iptables rules I made (see below) but after removing and flushing all iptables rules I was still getting the errors.

Code:
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT DROP [0:0]
# Create new chain called LOGGING
-N LOGGING
# Allow internal loopback connections
-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
# Allow any outbound data, and any inbound data related to a connection that is already in use
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A OUTPUT -m state --state NEW,RELATED,ESTABLISHED -j ACCEPT
# =========BEGIN SERVER SPECIFIC PORT OPEN RULES=========
# Allow SSH access from LAN
-A INPUT -s 10.0.0.0/255.255.255.0 -p tcp -m tcp --dport 22 -j ACCEPT
# Allow AFP access from LAN
-A INPUT -s 10.0.0.0/255.255.255.0 -p tcp -m tcp --dport 548 -j ACCEPT
# Allow MiniDLNA access from LAN
-A INPUT -s 10.0.0.0/255.255.255.0 -p tcp -m tcp --dport 8200 -j ACCEPT
# Allow UPnP access from LAN
-A INPUT -s 10.0.0.0/255.255.255.0 -p udp -m udp --dport 1900 -j ACCEPT
# Allow Avahi/Bonjour access from LAN
-A INPUT -s 10.0.0.0/255.255.255.0 -p udp -m udp --dport 5353 -j ACCEPT
# =========END SERVER SPECIFIC PORT OPEN RULES=========
# Log dropped packets
-A INPUT -j LOGGING
-A OUTPUT -j LOGGING
-A LOGGING -m limit --limit 2/min -j LOG --log-prefix "IPTables-Dropped: " --log-level 4
-A LOGGING -j DROP
# Drop everything that hasn't been picked up by one of the rules above
-A INPUT -j DROP
-A FORWARD -j DROP
-A OUTPUT -j DROP
COMMIT
Any advice would be greatly appreaciated as I cannot seem to find anything on the internet to solve this problem.

Thanks,

Ollie

Last edited by lloyd2012; 04-08-2019 at 10:18 AM.
 
Old 04-07-2019, 11:35 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
Welcome to LQ.
Please use [code] tags around output; it greatly improves the readability. You may be able to edit your post to add them...

I note that the errors you’ve posted are about IPv6 addresses. Are you using IPv6?
If not, edit the configuration to turn it off. Sorry, I can’t help with how...don’t know enough about exim.

I’m pretty sure that iptables is about allowing connections from outside, but I’m also observing that port 25 does not appear to be opened therein. Also not knowledgeable enough to be specific.

But do one thing at a time...adding code tags will help others see what you’ve posted.
Then disable IPv6 if you’re not using it. If that fixes things you’ll still need to open the port if you want to receive email.

...just curious, given what you’ve described that you plan to use the server for, why do you need an MTA at all? You don’t mention sending or receiving email...

Last edited by scasey; 04-07-2019 at 11:37 PM.
 
Old 04-08-2019, 01:36 PM   #3
lloyd2012
LQ Newbie
 
Registered: Apr 2019
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks very much for help.

I hadn't ralised that the error message related to IPv6 - knew it would be something simple I hadn't clocked.

I had already disabled IPv6 system wide but I have also now done so for exim4 and I don't seem to be getting the errors now 👍

I had assumed that I still needed an MTA for local messaging such as errors to be sent to root account but taking a step back that can't be the case as I was getting errors sent to root when exim4 wouldn't start up properly. Is that right?

Someday I might run a mail server so think I'll keep it going now I've fixed it.

Ollie
 
Old 04-09-2019, 12:20 AM   #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
Yup. Email within localhost doesn’t need an MTA. You can mark the thread SOLVED using the thread tools.
Gald I could help...
 
  


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
[SOLVED] howto: exim4, update-exim4.conf, dc_relay_nets mutiple ipadresses engelienart Linux - Server 2 10-21-2011 02:09 AM
exim4 / portmap compromised. problem "solved" -> exim4 question & rkhunter log eichenhain Linux - Security 2 01-10-2011 11:00 AM
Quesion on Exim4 using DNS Bind... rtoney5 Linux - Server 3 11-23-2009 10:48 AM
Can I bind to a serial port using BIND Socket API?? venkat_p257 Linux - General 2 12-04-2007 05:49 AM
exim4 exim4, setup debian tongueroo Linux - Networking 1 11-09-2004 04:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:20 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