Exim + Dovecot strange problem, some email are refuses

RickDeckard

Verified User
Joined
Mar 18, 2011
Messages
103
Hi, i've two servers with similar Hardware

Both with DA (off course) and:

Apache 2.2.22 Running
DirectAdmin 1.41.1 Running
Exim 4.80 Running
MySQL 5.5.27 Running
Named 9.3.6 Running
ProFTPd 1.3.3c Running
sshd Running
dovecot 2.1.9 Running
Php 5.3.16 Installed

+ LFD and Spamassassins.

Bot have the same configuration and update.

Server A is in Italy
ServerB in Netherland

on ServerA everything work perfectly, regarding Email service i can send/receive any email from/to Everywhere without problems with any Users/Domain, also i can send/receive Email between Users on same server, both with pop and imap.

ServerB work very well again BUT, i receive Email ONLY from service like Gmail, Hotmail, Yahoo etc, any Email from ServerA (from any users) or any Email betweebn users on same server are refuses.

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

[email protected]
(ultimately generated from info@domain_on_serverB.it)
retry timeout exceeded

------ This is a copy of the message, including all the headers. ------

Return-path: <info@domain_on_serverA.it>
Received: from mail by serverA-network.com with spam-scanned (Exim 4.80)
(envelope-from <info@domain_on_serverA.it>)
id 1T8sbj-0002eS-N1
for info@domain_on_serverB.it; Tue, 04 Sep 2012 14:52:02 +0200
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
serverA-network.com
X-Spam-Level:
X-Spam-Status: No, score=-2.9 required=7.5 tests=ALL_TRUSTED,BAYES_00
autolearn=ham version=3.3.2
Received: from host84-37-dynamic.7-79-r.retail.telecomitalia.it ([79.7.37.84] helo=[192.168.5.130])
by serverA-network.com with esmtpa (Exim 4.80)
(envelope-from <info@domain_on_serverA.it>)
id 1T8sbj-0002eO-I8
for info@domain_on_serverB.it; Tue, 04 Sep 2012 14:51:55 +0200
Message-ID: <5045F9EF.7020006@domain_on_serverA.it>
Date: Tue, 04 Sep 2012 14:54:07 +0200
From: Domain on Server A <info@domain_on_serverA.it>
Organization: Domain on Server A
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0
MIME-Version: 1.0
To: Domain on Server B <info@domain_on_serverB.it>
Subject: TEST
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit


I've updated exim/dovecot many times with:


cd /usr/local/directadmin/custombuild
./build update
./build clean
./build exim d
./build dovecot d


OR


cd /usr/local/directadmin/custombuild
./build update
./build set exim yes
./build exim

cd /usr/local/directadmin/custombuild
./build update
./build dovecot y
./build todovecot


and, at least, updated exim.com as usually:

http://help.directadmin.com/item.php?id=51


Also i've read and checked all as indicated here:

http://help.directadmin.com/item.php?id=16

But problem persist, any ideas?
 
Check that the mx records are correct. If you get a "retry timeout exceeded" it means it cannot communicate with the server. If it is your server then check that no firewall is blocking port 25 tcp.
 
Thanks for your answer.

CTP Port is Open on CSF (also i've tried disabling directly Firewall)

My dns conf is (on domain maintainer) is:

A domain.it. 94.75.214.187
MX domain.it. 10 mail.dvdmart.it.
CNAME www.domain.it. dvdmart.it.
A mail 94.75.214.187
 
Well it looks like its working fine. You should look at /var/log/exim/mainlog while you try to send an email and see if anything shows up.

You can just use command:

Code:
tail -f /var/log/exim/mainlog

ctrl + c when you are finished

You might also have a communication problem between your servers.

You could test if port 25 is working fine by running this command from one server to the other.

Code:
telnet 94.75.214.187 25

You should see this line:

Code:
220 DVDT001.local ESMTP Exim 4.80 Tue, 04 Sep 2012 17:31:48 +0200

If you get a response like timed out then you know there is something blocking the connection.
 
Last edited:
telnet 94.75.214.187 25 is the same as you posted.

tail -f /var/log/exim/mainlog result:

2012-09-04 17:45:40 1T8vJs-0002mX-I4 <= <> R=1T8vJs-0002mR-Aa U=mail P=local S=1 430 T="Mail delivery failed: returning message to sender" from <> for root@DVDT0 01.local
2012-09-04 17:45:40 1T8vJs-0002mX-I4 ** [email protected] F=<>: Unrouteable add ress
2012-09-04 17:45:40 1T8vJs-0002mX-I4 Frozen (delivery error message)
2012-09-04 17:45:41 1T8vJs-0002mR-Aa Completed
2012-09-04 18:03:39 1T8vbG-0002x8-Tk <= [email protected] U=root P=local S=530 T="lfd on DVDT001.local: SSH login alert for user root from 151.63.131.120 (IT/I taly/-)" from <[email protected]> for root
2012-09-04 18:03:39 1T8vbG-0002x8-Tk ** [email protected] F=<[email protected] >: Unrouteable address
2012-09-04 18:03:39 1T8vbH-0002xC-2k <= <> R=1T8vbG-0002x8-Tk U=mail P=local S=1 324 T="Mail delivery failed: returning message to sender" from <> for root@DVDT0 01.local
2012-09-04 18:03:39 1T8vbH-0002xC-2k ** [email protected] F=<>: Unrouteable add ress
2012-09-04 18:03:39 1T8vbH-0002xC-2k Frozen (delivery error message)
2012-09-04 18:03:39 1T8vbG-0002x8-Tk Completed
 
[email protected] is not a routable address so you're getting an unroutable address error. is DVDT001.local your hostname? If so, then you should configure a real hostname, with DNS pointing to your main server IP, and rDNS for that server IP pointing to the new hostname.

Jeff
 
Use your DirectAdmin control panel to change your hostname. Create a new hostname on a domain you own, for example, if you own example.com, change the hostname to host.example.com.

Then add an A record to the zone file for host.example.com.

Then contact your ip# provider and have them create an rDNS record pointing your main server IP# to host.example.com.

Jeff
 
SOLVED

First, thanks to everybody. :cool:

Simply i "forget" to add at least one domain to admin account!
Now the main ip of server is correctly resolved in all cases.

Thanks again! ;)
 
Not necessary; we never do that. But if it works for you, good. :)

Jeff
 
After some days of test i've noticed that some email are not still resolved.

summary of the settings:

In Directadmin -> User level -> Domain setup, Admin User, on main, shared IP, i've the domain:

maindomain.com

In Directadmin -> Admin level -> Administrator Settings:

Server's Hostname srv01.maindomain.com
NS1 ns1.maindomain.com
NS2 ns2.maindomain.com


For all users, under In Directadmin -> Admin level -> DNS Administration i've something like:


somedomain.it. A 94.75.214.132
ftp A 94.75.214.132
localhost A 127.0.0.1
mail A 94.75.214.132
pop A 94.75.214.132
smtp A 94.75.214.132
www A 94.75.214.132
somedomain.it. NS ns1.maindomain.com.
somedomain.it. NS ns2.maindomain.com.
mail MX 10
somedomain.it. TXT "v=spf1 a mx ip4:94.75.214.132 ~all"
localhost AAAA ::1



On domain's mantainer setting i've for main domain:


A maindomain.com. 94.75.214.132
MX maindomain.com. 10 mail.maindomain.com.
CNAME www.maindomain.com. maindomain.com.
A mail 94.75.214.132
A srv01.maindomain.com 94.75.214.132



for the other domains:


A somedomain.it. 94.75.214.132
MX somedomain.it. 10 mail.somedomain.it.
CNAME www.somedomain.it. somedomain.it.
A mail 94.75.214.132

(no other A setting)


but all's with original dns provided by the maintainer.


On my server reseller control panel's i've:


IP Type Reverse lookup
94.75.214.132 PTR srv01.maindomain.com


Also i've other 4 ip's (5 in total) on the same server but first i must understand the correct setting for shared ip, what'z wrong? thanks!
 
Last edited:
You really need to show some entries from your exim's mainlog, that will tell why it is really failing.
 
I've tried to send an email from google to one of domains on the same server:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

[email protected]
local delivery failed
[email protected]
local delivery failed

------ This is a copy of the message, including all the headers. ------

Return-path: <[email protected]>
Received: from mail-ob0-f171.google.com ([209.85.214.171])
by srv01.webmart.it with esmtps (TLSv1:RC4-SHA:128)
(Exim 4.80)
(envelope-from <[email protected]>)
id 1TB1La-0003Ph-Dg; Mon, 10 Sep 2012 12:36:14 +0200
Received: by obqv19 with SMTP id v19so2995569obq.2
for <multiple recipients>; Mon, 10 Sep 2012 03:36:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=LltwLO5zxQwgioKZf39uFCQX9QSltybySXDPfk/uq4c=;
b=zUCYMublj+tbubisbJngNw/4EoD6H8UgsIhe9QY3PyvESi4VRj2xiafvFOeaQ7Vwy9
t1jBwIRhsO5AZ4xNP48XYRZ03xOm+b0aQIuOhDMN4w95kpojb9bALotRhW5aT9aw22Jr
chE4mk4e5C+32d+9AlXdMPgBzzr73vHKaL2TcvdsnSnTFNrIsYA6go3+TD9vUd7g/zp0
CHY1JbkmP6rMAe61casobrsON3VA+SYWsE7gMW80QzKzCGb1vX0MdxDFg9UVWMi+Py9z
rJY7lDigXbaNoYdTZhJTzG+UKqXLPVrZH03xHUU2toGUwpDLwg9gvVARhT6RcRVJFoFX
GaYA==
MIME-Version: 1.0
Received: by 10.182.225.100 with SMTP id rj4mr13747120obc.64.1347273362897;
Mon, 10 Sep 2012 03:36:02 -0700 (PDT)
Received: by 10.76.170.36 with HTTP; Mon, 10 Sep 2012 03:36:02 -0700 (PDT)
Date: Mon, 10 Sep 2012 12:36:02 +0200
Message-ID: <CAEen2KOL+1E_V5rMy88QbnY4Z054B9OVp8eAm4SkYgn+jSzHww@mail.gmail.com>
Subject: gmail
From: Massimiliano Pepe <[email protected]>
To: [email protected], [email protected]
Content-Type: multipart/alternative; boundary=14dae93993bb35f9fd04c9568697

--14dae93993bb35f9fd04c9568697
Content-Type: text/plain; charset=ISO-8859-1



--14dae93993bb35f9fd04c9568697
Content-Type: text/html; charset=ISO-8859-1

<br>

--14dae93993bb35f9fd04c9568697--
 
Last edited:
Under Directadmin -> Admin level -> DNS Administration i've added a new zone:

srv01.maindomain.com alias the Server's Hostname


ftp A 94.75.214.132
localhost A 127.0.0.1
mail A 94.75.214.132
pop A 94.75.214.132
smtp A 94.75.214.132
srv01.maindomain.com. A 94.75.214.132
www A 94.75.214.132
srv01.maindomain.com. NS ns1.maindomain.com.
srv01.maindomain.com. NS ns1.maindomain.com.
mail MX 10
srv01.maindomain.com. TXT "v=spf1 a mx ip4:94.75.214.132 ~all"
localhost AAAA ::1


Now appear to work.
 
[email protected]
local delivery failed
[email protected]
local delivery failed
Why did local delivery fail? Are these domains located on the same server? Are the email addresses set up on the server? Are the domain names listed in the /etc/virtual/domain fields?

Note that to continue to get support from me you'll need to always post real domain and IP# information. I can understand if you don't want to, but without them I can only guess, and not test.

Jeff
 
Why did local delivery fail? Are these domains located on the same server?

Now emails from domain on same server work always.

Are the email addresses set up on the server? Are the domain names listed in the /etc/virtual/domain fields?

Yes to both, only srv01.webmart.it folder are empty as i read in FAQ sections.

Note that to continue to get support from me you'll need to always post real domain and IP# information.

I understand, ip's are real, the main domain is www.webmart.it, server hostname srv01.webmart.it.

The domains indicated in Google error email's, primocontatto.com are real too.

Aldo, i've others domain on other's ip, it is usefull for you?
Thanks!
 
Last edited:
You don't have an A record for srv01.webmart.it. Do you own webmart.it? Is the zone also hosted on your server? If the answer to both of these isn't yes, then a zone for srv01.webmart.it won't work unless whomever owns the zone delegates DNS to you. Or they could simply set an A record for srv01.webmart.it in the main webmart.it zone, and you can delete the zone for srv01.webmart.it which you set up.

However that shouldn't cause the error you're getting.

I tested your mailserver, and used both [email protected] and [email protected] as recipient addresses. For both, the mail was initially accepted. So the only way you're going to be able to tell why this occurs is by reading your /var/log/exim/mainlog file, and finding the emails, and see why local delivery is failing after the email is accepted.

I and others on these forums can do it for you, but most of us (including me) would charge you. Please feel free to email me (PMs take much longer to reach me than do emails) at my email address below in my siglines, if you'd like to hire me to find and fix (or help you fix) your problem.

Jeff
 
With the last setting now appear to work everthing, if I still have more problems i 'll contact you trought Email for payed support.

Thanks!
 
Back
Top