Can't receive email

blaszlo

Verified User
Joined
Jun 9, 2008
Messages
116
Hey guys,

I am having a little issue (Jeff, you will be disappointed cuz I should know better by now)... I installed CentOS 5.4 x64 on a new server, and went ahead and installed Dovecot and Exim before installing directadmin, and I think it is now causing me issues. After finally figuring out various errors with exim permissions, I am now able to send mail from a test account - however, I can't recieve mail. What's strange is that I don't get a bounce message. I checked /var/log/maillog and here is what I get...

Sep 29 22:54:08 centos dovecot[8033]: IMAP([email protected]): Disconnected: Logged out bytes=117/1395
Sep 29 22:54:10 centos dovecot[8033]: auth(default): shadow([email protected],127.0.0.1): unknown user
Sep 29 22:54:10 centos dovecot[8033]: auth(default): passwd([email protected],127.0.0.1): unknown user
Sep 29 22:54:10 centos dovecot[8033]: imap-login: Login: user=<[email protected]>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured

I think the problem might still be ownership of certain files, I just don't know where. "Centos" was the old hostname I created for this server before I even decided to make this into a production box, so maybe thats a factor.

Any help is appreciated - thanks!!!
 
The messages about unknown user you can ignore, this is because it checks for /etc/shadow and /etc/virtual/domain.com/passwd.

To see why you can't receive email you need to add the maillogs, /var/log/exim/mainlog
 
Here is the piece of it that mentions the email address that I am testing...

2010-09-29 23:21:27 1P19i3-0002U1-2c <= [email protected] H=localhost (64.124.116.106) [127.0.0.1] P=esmtpa A=login:[email protected] S=568 id=a199da20bcddb586955f1f3ab5287db7@localhost T="test" from <[email protected]> for brad@b$
2010-09-29 23:21:27 1P19i3-0002U1-2c ** [email protected] F=<[email protected]> R=virtual_aliases:
2010-09-29 23:21:27 1P19i3-0002U4-5t <= <> R=1P19i3-0002U1-2c U=mail P=local S=1372 T="Mail delivery failed: returning message to sender" from <> for [email protected]
2010-09-29 23:21:27 1P19i3-0002U1-2c Completed
2010-09-29 23:21:27 1P19i3-0002U4-5t => test <[email protected]> F=<> R=virtual_user T=virtual_localdelivery S=1513
2010-09-29 23:21:27 1P19i3-0002U4-5t Completed

Thanks!
 
It's weird because I didn't get a standard returned: undeliverable message - I got a message in Outlook that says...

Delivery is delayed to these recipients or distribution lists:

[email protected]

Subject: RE: test

This message has not yet been delivered. Microsoft Exchange will continue to try delivering the message on your behalf.

Delivery of this message will be attempted until 10/1/2010 11:26:27 PM (GMT-05:00) Eastern Time (US & Canada). Microsoft Exchange will notify you if the message can't be delivered by that time.

_____

Sent by Microsoft Exchange Server 2007
 
test is - brad is not... Not exactly sure how that got there. Let me try and send another mail to the test account and get more recent logs
 
@Brad,

I don't know how you installed either Exim or Dovecot, and I don't know what may be left over from those installs.

I'd recommend you remove both Exim and Dovecot completely, and reinstall them using DirectAdmin tools.

Jeff
 
How would you suggest I remove them in a way that is "clean"? I have done some research, and none of the solutions I came upon look very clean at all. Do you have a process in mind I should take to make this smooth? As I said - I can send mail fine, I just can't recieve mail. Thanks!
 
As wrote in my previous post:
I don't know how you installed either Exim or Dovecot, and I don't know what may be left over from those installs.
Since I don't know what's left over I don't know what to look for or where.

Jeff
 
Thanks for the input Jeff. As of me writing my last message, I have removed Exim and Dovecot and reinstalled using the DA scripts - but still no incoming mail. Perhaps DNS is configured improperly?

We now have 4 domains tied to this server (including the host domain), and the DNS for those domains points at our DNS servers instead of pointing directly at the box, and DNS records are then pointed at the host box. Maybe I don't have an MX record pointed correctly. How should that be setup? I ahve four DA servers, but none configured like this...
 
The MX record should point to the server receiving the mail.

I can't help you troubleshoot further without specific domain/email address information. Note I'm out the rest of today but someone else may be able to help you troubleshoot further if you respond with an actual test email address which is present on the server but not working.

Jeff
 
The mailserver isn't answering to the outside world on port 25, as it must, to receive email:
Code:
$ dig unionhosting.net +short
64.124.116.106
$ dig unionhosting.net mx +short
10 mail.unionhosting.net.
$ dig mail.unionhosting.net +short
64.124.116.106
$ telnet mail.unionhosting.net 25
Trying 64.124.116.106...
 
OK, that definitely put me in the right direction... Here is an error im getting...

Code:
2010-10-06 10:50:57 socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (3 more tries)
2010-10-06 10:51:25 socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (3 more tries)
2010-10-06 10:51:27 socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (2 more tries)
2010-10-06 10:51:55 socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (2 more tries)
2010-10-06 10:51:57 socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (1 more try)
2010-10-06 10:52:25 socket bind() to port 25 for address (any IPv4) failed: Address already in use: waiting 30s before trying again (1 more try)
2010-10-06 10:52:27 socket bind() to port 25 for address (any IPv4) failed: Address already in use: daemon abandoned

Code:
[root@host ~]# lsof -i :25
COMMAND  PID USER   FD   TYPE DEVICE SIZE NODE NAME
exim    4405 mail    3u  IPv4 676215       TCP *:smtp (LISTEN)
 
Last edited:
Default iptables/ip6tables is enabled at boot, so try;
/etc/init.d/iptables stop; /etc/init.d/ip6tables stop
If you want it disabled also at boot
chkconfig iptables off; chkconfig ip6tables off
** Only for testing, if you leave the firewall disabled its your own risk!
 
It looks as if something is already listening on port 25. Find out what, and shut it off.

Jeff
 
OK guys - firstly, thanks for your help. I found out last Friday that I was chasing my tail for a problem that didn't exist on this box. I got in contact with the datacenter that this box is being held at, and their firewall was blocking port 25 to that box... I was able to do a successful telnet from the box to 'localhost', but was not able to fromt he outside which made me real suspicious.

Again, sorry to waste all of your time with this, and thanks again for the suggestions.
 
Back
Top