LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2014, 03:06 PM   #1
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Rep: Reputation: Disabled
Problem receiving mail - postfix/dovecot


Essentially the problem is that I cannot receieve e-mails from people on other domains (@yahoo.com, @gmail.com, @hotmail.com etc), they are telling me that they get an e-mail notice back saying the domain name could not be found. They can receieve my emails that I send out to them but again, they can't reply back to me. (It also seems that I can receieve e-mail from other e-mail accounts that are on my domain).

Anyone know why this is going on? I don't know what config files you want, reply back what you information you want and I will give you it.

(CentOS 6.5 postfix/dovecot and roundcubemail for web frontend)

Last edited by Altiris; 03-16-2014 at 03:07 PM.
 
Old 03-17-2014, 08:50 AM   #2
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello Altiris,

Just a couple of quick questions:

1. Has this ever worked or has this just recently been setup?
2. Can you ping your domain internally / externally? i.e. ping www.YourDomainName?
3. I use sendmail rather than postfix so the log files may differ somewhat thus you may have to find your own equivalents.
Check the log contents i.e. /var/log/maillog
4. Do you by chance use a spam filter embedded in your postfix file? I use a SpamHaus filter that performs an external spam lookup on all mail entering my domain - at one point there was an issue with the SpamHaus lookup service which resulted in all mail received by my domain mail server being marked as spam and thus rejected. Again, if you do then check the contents of /var/log/maillog
5. Can you receive external mail at all excluding gmail, Hotmail, yahoo...?

Post the results of the above.

Adios,

Rawcous!!
 
Old 03-18-2014, 06:37 PM   #3
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
Hello Altiris,

Just a couple of quick questions:

1. Has this ever worked or has this just recently been setup?
2. Can you ping your domain internally / externally? i.e. ping www.YourDomainName?
3. I use sendmail rather than postfix so the log files may differ somewhat thus you may have to find your own equivalents.
Check the log contents i.e. /var/log/maillog
4. Do you by chance use a spam filter embedded in your postfix file? I use a SpamHaus filter that performs an external spam lookup on all mail entering my domain - at one point there was an issue with the SpamHaus lookup service which resulted in all mail received by my domain mail server being marked as spam and thus rejected. Again, if you do then check the contents of /var/log/maillog
5. Can you receive external mail at all excluding gmail, Hotmail, yahoo...?

Post the results of the above.

Adios,

Rawcous!!
I will answer in order below:

1. This has never worked, I set it up back in September, ran into a problem with sending e-mail to people out of the domainname and I found that I needed to enable SASL which I did, it works and I know this because I can send emails out (but not receieve).
2. I can ping internally but I can not ping externally because I have a router (Sonicwall router from Dell) configured to block ping. I did an internal and external nslookup instead and here is what I got
Internal
Code:
054/0.061/0.076/0.011 ms
[root@n-data views]# nslookup mydomainhere.com
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	mydomainhere.com
Address: 192.168.12.137
External
Code:
nslookup mydomainhere.com
Server: cdns01.comcast.net
Address: 75.75.75.75

Non-authoritative answer:
Name: mydomainhere.com
Address: myexternalipaddresshere
I should point out that when I try adding my DNS server (by putting the FQDN) on my ISPs DNS it gives back an error, however if I try another server (which runs windows server) it does not give back an error. So either there is something with my DNS or my ISPs DNS isnt compatible with linux (dobut it)?
3. I tried sending a message to my email server by my gmail account and waited a bit for something to show in the log file viewer but nothing. I do have a log file of what happens when I send out emails (although that works fine however if you want the log I will post).
4. I do have some spam protection,I have the conjunection of the three programs ClamAV, SpamAssassin, and Amavisd. However before I installed and configured these I still was unable to receieve email from other people on different domains.
5. I can only receieve mail from within the same domain, I can not receive mail AT ALL from other domains.

So essentially, could be Postfix/dovecot not configured correctly (although I can actually receieve things from the same domain so i dont think so), something wrong with DNS config (as that website for my ISP gave me an error), or SELinux or something.

EDIT (READ FIRST)
: Its something with my DNS server, when I put in the IP address for my server that runs the dns server/postfix/dovecot on preferred DNS option (when configuring the network on linux) I do not get internet. If I go and put in the IP address of the DNS server that I talked about earlier (the one that is running windows) I get internet. So its something with my DNS.

Last edited by Altiris; 03-18-2014 at 06:41 PM.
 
Old 03-19-2014, 09:34 AM   #4
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Quote:
EDIT (READ FIRST): Its something with my DNS server, when I put in the IP address for my server that runs the dns server/postfix/dovecot on preferred DNS option (when configuring the network on linux) I do not get internet. If I go and put in the IP address of the DNS server that I talked about earlier (the one that is running windows) I get internet. So its something with my DNS.
This indicates that the DNS side on the Linux server is malfunctioning.

Quote:
I should point out that when I try adding my DNS server (by putting the FQDN) on my ISPs DNS it gives back an error,
Please explain what you mean by this.

So if you set you the DNS to that of the Windows Server - internet connection works - does this then also allow your mail server to receive and process external mail?

Also you mentioned you can perform both internal & external nslookups on your doman - thus your DNS A records have been setup, but perhaps your MX records have not been set up correctly with your DNS hoster - i.e. mail.YourDomainName - Can you perform an nslookup on your MX record i.e. nslookup mail.YourDomainName ?

Regards,

Rawcous!
 
Old 03-19-2014, 01:40 PM   #5
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
This indicates that the DNS side on the Linux server is malfunctioning.



Please explain what you mean by this.

So if you set you the DNS to that of the Windows Server - internet connection works - does this then also allow your mail server to receive and process external mail?

Also you mentioned you can perform both internal & external nslookups on your doman - thus your DNS A records have been setup, but perhaps your MX records have not been set up correctly with your DNS hoster - i.e. mail.YourDomainName - Can you perform an nslookup on your MX record i.e. nslookup mail.YourDomainName ?

Regards,

Rawcous!
Sorry for being unclear. Basically, I have two servers in my home, one windows server, and the other centos. The other thing I am talking about is that my ISP has a website (comcast.business.com or something) that allows you to enter the required DNS rules on their dns server (the A and MX records, etc.) And, also the ability to add another DNS server that the comcast dns server can use (I don't know how to explain too well, I can post a picture if required).

Whenever I input the fully qualified domain name of the centos box in there, I get an error saying it could not be resolved, however if I enter the fully qualified domain name of the windows server computer then it seems to go fine and I do not get an error. This would mean something is wrong with the dns on the centos box.

I will perform an nslookup once I can be near my computer (internal and external)
Thank you for all of your help.
 
Old 03-19-2014, 05:02 PM   #6
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hi,

Quote:
The other thing I am talking about is that my ISP has a website (comcast.business.com or something) that allows you to enter the required DNS rules on their dns server (the A and MX records, etc.) And, also the ability to add another DNS server that the comcast dns server can use (I don't know how to explain too well, I can post a picture if required).
Please post the above w/o giving too much info. away if possible.

Am in my assumptions that because you mention you have 2 different WAN addresses for your two different servers , thus 2 separate broadband connections / routers etc, if not then surely all that is required is that all of your records simply point towards the same WAN address with port forwarding set via the router....



Regards,

Rawcous!
 
Old 03-20-2014, 05:44 AM   #7
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
Hi,



Please post the above w/o giving too much info. away if possible.

Am in my assumptions that because you mention you have 2 different WAN addresses for your two different servers , thus 2 separate broadband connections / routers etc, if not then surely all that is required is that all of your records simply point towards the same WAN address with port forwarding set via the router....



Regards,

Rawcous!
The two servers are independent from each other (in the sense of what they are to be doing). They are both for testing purposes, they are in fact on the same router but have different external and internal IPs.
I did an external nslookup of mail.mydomainhere.com and I got
Code:
Server cdns10.comcast.net
Address: 75.75.75.75

Name: mail.mydomainhere.net
It appears that I am not getting the "Non-authoritive answer" like I do when I get an nslookup of just the domain itself.
An interal nslookup of mail.mydomainhere.com shows
Code:
Server:		127.0.0.1
Address:	127.0.0.1#53

Name:	mail.mydomainhere.com
Address: 192.168.12.137
Here are my forward and reverse lookup zones for my DNS server incase you want them

Code:
$ORIGIN mydomainhere.com.
$TTL 86400
@	IN	SOA	dns1.mydomainhere.com. hostmaster.mydomainhere.com. (
	2013071101 ;serial
	21600	   ;refresh after 6 hours
	3600	   ;retry after 1 hour
	604800     ;expire after1 week
	86400 )    ;minimum TTL 1 day

	IN	NS 	dns1.mydomainhere.com.com.
	
	IN	MX	10	mail.mydomainhere.com.

	IN	A	192.168.12.137

dns1	IN	A	192.168.12.137

nc-data	IN	A	192.168.12.137

ftp	IN	A	192.168.12.137

mail	IN	A	192.168.12.137

www	IN	A	192.168.12.137

mydomainhere.com.	IN	NS	nc-data.mydomainhere.com.
Code:
$ORIGIN 12.168.192.in-addr.arpa.
$TTL 86400
@	IN	SOA	dns1.mydomainhere.com. hostmaster.mydomainhere.com. (
	2013071101 ;serial
	21600	   ;refresh after 6 hours
	3600	   ;retry after 1 hour
	604800     ;expire after1 week
	86400 )    ;minimum TTL 1 day

@	IN	NS 	nc-data.mydomainhere.com.
	
137	IN	PTR	nc-data.mail.mydomainhere.com.

137	IN	PTR	nc-data.mydomainhere.com.

137	IN	PTR	nc-data.mydomainhere.com.

137	IN	PTR	nc-data.mydomainhere.com.

	IN	NS	nc-data.mydomainhere.com.

137	IN	PTR	nc-data.mydomainhere.com.

137	IN	PTR	nc-data.mydomainhere.com.

Last edited by Altiris; 03-20-2014 at 05:55 AM.
 
Old 03-21-2014, 09:30 AM   #8
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
I have to admit i'm stumped at the moment - I will re-read through the postings so far and have another think about this - the chances are it's something so obvious....

Rawcous...
 
Old 03-21-2014, 07:04 PM   #9
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Rawcous View Post
I have to admit i'm stumped at the moment - I will re-read through the postings so far and have another think about this - the chances are it's something so obvious....

Rawcous...
If you need me to reiterate or explain something in a different way, need more information just ask. Thank you for helping me btw...and it probably is something very obvious...I run into doing that a lot.
 
Old 03-25-2014, 03:58 PM   #10
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
Has anyone found anything yet?
 
Old 03-26-2014, 08:59 AM   #11
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hi Altiris,

Been away for a few days - taking another look.

Regards,

Rawcous!
 
Old 03-27-2014, 09:58 AM   #12
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello again,

Quote:
The other thing I am talking about is that my ISP has a website (comcast.business.com or something) that allows you to enter the required DNS rules on their dns server (the A and MX records, etc.) And, also the ability to add another DNS server that the comcast dns server can use (I don't know how to explain too well, I can post a picture if required).
What happens if rather than entering "another" DNS server as indicated above you simply set the MX record to point towards the mailserver's WAN address? (Or am I missing something here)...?

As a Sendmail user rather than Postfix i'm guessing here, Sendmail makes use of an \etc\mail\access file that can be used for determining rules such as hosts that can relay mail through the server, external domains that can send you mail, etc. I believe the Postfix equivalent is /etc/postfix/access see this sendmail link: http://www.sendmail.co.uk/sm/open_so...anti_spam.html (see the entry at the bottom of this link concerning building the db file if you make any amendments to it).

A quick Google of "postfix /etc/mail/access" yields: https://www.google.co.uk/#q=postfix+...Fmail%2Faccess

Also out of interest, in your /etc/postfix/main.cf file what do you have "mydestination set to....? (Again i'm stabbing in the dark here..)

I'm still not convinced about the contents of the /var/log/maillog file - this file should contain all messages indicating successful /failed mail delivery attempts for both postfix and dovecot - try sending mail an external domain, make a note of the time and post on here the contents of the log file corresponding to around that time - bear in mind it may be a few minutes before the mail is rejected.



Regards,

Rawcous!
 
Old 03-30-2014, 02:37 PM   #13
Altiris
Member
 
Registered: Mar 2013
Posts: 556

Original Poster
Rep: Reputation: Disabled
For your first question, that is how I set it up since I first registered the domain. I can not add my dns server on that list (I get the weird error) so I just left it with the MX record pointing to my mail server in the rules it has.

There is indeed a /etc/postfix/access file but I believe it is documentation (everything is uncommented). On Postfix/dovecot in order to send mail to other domains you need to enable SASL which I have, which is why I can send out mails, remember that the problem is with people sending email to me/I can't receieve email from people on other domains.

In /etc/postfix/main.cf mydestion is set to this below:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

Here is the logfile when I sent an email to another domain, but remember that sending out emails isnt the issue, receiving them is the issue. PROCEDURE: I am doing this on the server/same computer and via roundcube page, I logged in ONCE (the log says I disconnect multiple times but I didnt hit any logout button) and composed a message to one of my other emails and then I just left it like that, I have not hit the logout button yet)
Code:
Mar 11 20:48:45 n-data dovecot: imap(tom): Disconnected: Logged out bytes=196/736
Mar 11 20:49:14 n-data dovecot: imap-login: Login: user=<tom>, method=PLAIN, rip=::1, lip=::1, mpid=12953, secured
Mar 11 20:49:14 n-data dovecot: imap(tom): Disconnected: Logged out bytes=32/384
Mar 11 20:49:14 n-data dovecot: imap-login: Login: user=<tom>, method=PLAIN, rip=::1, lip=::1, mpid=12959, secured
Mar 11 20:49:14 n-data dovecot: imap(tom): Disconnected: Logged out bytes=44/464
Mar 11 20:49:27 n-data postfix/tlsmgr[12968]: warning: request to update table btree:/var/spool/postfix/smtpd_tls_cache in non-postfix directory /var/spool/postfix
Mar 11 20:49:27 n-data postfix/tlsmgr[12968]: warning: redirecting the request to postfix-owned data_directory /var/lib/postfix
Mar 11 20:49:27 n-data postfix/smtpd[12966]: connect from localhost[127.0.0.1]
Mar 11 20:49:27 n-data postfix/smtpd[12966]: 2AEF6BE05AC: client=localhost[127.0.0.1]
Mar 11 20:49:27 n-data postfix/cleanup[12970]: 2AEF6BE05AC: message-id=<5e7f1808356a66cc7bca6dbb3be10bf3@domain.com>
Mar 11 20:49:27 n-data postfix/qmgr[12485]: 2AEF6BE05AC: from=<tom@domain.com>, size=548, nrcpt=1 (queue active)
Mar 11 20:49:27 n-data dovecot: imap-login: Login: user=<tom>, method=PLAIN, rip=::1, lip=::1, mpid=12976, secured
Mar 11 20:49:27 n-data amavis[17686]: (17686-01) (!)run_av (ClamAV-clamd) FAILED - unexpected , output="/var/spool/amavisd/tmp/amavis-20140311T204927-17686-KKVlMYB_/parts: lstat() failed: Permission denied. ERROR\n"
Mar 11 20:49:27 n-data amavis[17686]: (17686-01) (!)ClamAV-clamd av-scanner FAILED: CODE(0x26960f0) unexpected , output="/var/spool/amavisd/tmp/amavis-20140311T204927-17686-KKVlMYB_/parts: lstat() failed: Permission denied. ERROR\n" at (eval 113) line 897.
Mar 11 20:49:27 n-data amavis[17686]: (17686-01) (!)WARN: all primary virus scanners failed, considering backups
Mar 11 20:49:27 n-data postfix/smtpd[12966]: disconnect from localhost[127.0.0.1]
Mar 11 20:49:27 n-data dovecot: imap(tom): Disconnected: Logged out bytes=448/500
Mar 11 20:49:28 n-data dovecot: imap-login: Login: user=<tom>, method=PLAIN, rip=::1, lip=::1, mpid=12985, secured
Mar 11 20:49:28 n-data dovecot: imap(tom): Disconnected: Logged out bytes=44/464
Mar 11 20:49:28 n-data dovecot: imap-login: Login: user=<tom>, method=PLAIN, rip=::1, lip=::1, mpid=12995, secured
Mar 11 20:49:28 n-data dovecot: imap(tom): Disconnected: Logged out bytes=196/736
Mar 11 20:49:28 n-data dovecot: imap-login: Login: user=<tom>, method=PLAIN, rip=::1, lip=::1, mpid=12997, secured
Mar 11 20:49:28 n-data dovecot: imap(tom): Disconnected: Logged out bytes=50/404
Mar 11 20:49:35 n-data postfix/smtpd[12998]: connect from localhost[127.0.0.1]
Mar 11 20:49:35 n-data postfix/smtpd[12998]: 55606BE0A21: client=localhost[127.0.0.1]
Mar 11 20:49:35 n-data postfix/cleanup[12970]: 55606BE0A21: message-id=<5e7f1808356a66cc7bca6dbb3be10bf3@domain.com>
Mar 11 20:49:35 n-data postfix/qmgr[12485]: 55606BE0A21: from=<tom@domain.com>, size=1005, nrcpt=1 (queue active)
Mar 11 20:49:35 n-data amavis[17686]: (17686-01) Passed CLEAN {RelayedOutbound}, MYNETS LOCAL [127.0.0.1]:46781 [127.0.0.1] <tom@domain.com> -> <prohazer@yahoo.com>, Message-ID: <5e7f1808356a66cc7bca6dbb3be10bf3@domain.com>, mail_id: G6_c5nz7nMyJ, Hits: -1, size: 548, queued_as: 55606BE0A21, 8146 ms
Mar 11 20:49:35 n-data postfix/lmtp[12971]: 2AEF6BE05AC: to=<prohazer@yahoo.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.3, delays=0.09/0.02/0.02/8.1, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 55606BE0A21)
Mar 11 20:49:35 n-data postfix/qmgr[12485]: 2AEF6BE05AC: removed
Mar 11 20:49:37 n-data postfix/smtp[13000]: 55606BE0A21: to=<prohazer@yahoo.com>, relay=mta7.am0.yahoodns.net[63.250.192.45]:25, delay=2.2, delays=0.06/0.01/0.89/1.2, dsn=2.0.0, status=sent (250 ok dirdel)
Mar 11 20:49:37 n-data postfix/qmgr[12485]: 55606BE0A21: removed
I think the end issue is just with my DNS, the messages I get back from my yahoo/gmail accounts are that it cant resolve the domain name, same with when I try to register my DNS on my ISPs website.

Last edited by Altiris; 03-30-2014 at 02:38 PM.
 
Old 04-17-2014, 08:22 AM   #14
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello Altiris,

Have you made any progress with this at all...?

You may have mentioned / tried this already but what happens if you disable / remove your DNS server entries via the Comcast site so that it only contains your Mail Server settings (i.e. A and MX records), and simultaneously temporarily disable the DNS service on your Centos server...?


This definitely needs a fresh pair of eyes - surprised no networking Gurus did not latch onto this one when you originally posted this.....

Regards,

Rawcous...
 
  


Reply

Tags
dovecot, postfix, smtp



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
Problem with Debian Webmin dovecot mail retrieval (postfix also installed) alexkgr Linux - Server 5 08-20-2012 11:35 AM
[SOLVED] Dovecot does not receiving any mail sanjay87 Linux - Server 8 05-04-2012 09:58 AM
Dovecot not receiving mail jsaravana87 Linux - Server 7 04-27-2012 04:21 AM
Dovecot not receiving mail latino Linux - Software 0 02-25-2005 09:52 PM
problem receiving pop3 mail from postfix mail server GEN_Electric Linux - Software 2 02-14-2005 02:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:14 AM.

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