Solved

Can't recieve mail from outside my domain

Posted on 2010-08-13
9
520 Views
Last Modified: 2013-11-30
I just installed Centos 5.5. I got domain and already installed Postifix, Dovecot and SquirrelMail compination (http://www.linuxmail.info/). Now I can send emails to everyone succesfully and get emails from anyone who is in my domain, but I can't recieve mails from outside my domain (example: my hotmail account).

So, if somebody can help me i'm very pleased.

My "postconf -n" data:
(my real domain replaced with "mydomain.com")
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = mydomain.com
myhostname = mydomain.com
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
unknown_local_recipient_reject_code = 550

Open in new window

0
Comment
Question by:Mircci
  • 5
  • 3
9 Comments
 
LVL 11

Expert Comment

by:Pieter Jordaan
ID: 33431479


Do you get anything interresting the the logs?
The /var/log/mail.log or /var/log/syslog.conf file should have some answers.

Please post any errors.
0
 
LVL 1

Expert Comment

by:scarybot
ID: 33432596
Sorry if this is a bit obvious, but just to make sure/// are you absolutely sure the DNS records are showing something sensible for your MX, and does this resolve to the IP of your mailserver?

If so, run a tcpdump and then send an email from hotmail to your mailserver. If you don't see any SMTP traffic within a few minutes, the mail doesn't reach your server and it's a DNS issue.
0
 

Author Comment

by:Mircci
ID: 33433073
BitFreeze:
No errors in maillog. When I send to mydomain there is line for that but no for hotmail sending.

scarybot:
When i run reverse DNS lookup (http://remote.12dt.com/lookup.php) it returns my domain name correctly. Tcpdumd dont show any smtp lines when i send from hotmail. When sending inside my domain there is lines: ...mydomain.smtp.... So it's DNS problem? Can you help me for that?
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 1

Expert Comment

by:scarybot
ID: 33433179
It does look like a DNS problem - the A records are correct, but you need to set an MX record for the domain in order to tell mail relays where to connect to...

Try this command (install dig if it's not already)

dig (yourdomain) MX

if this returns a line with the letters MX and your server name, then all's well. I'm guessing it won't - this means you just need to login to your hosting panel and add an MX record in there. Remember that MX records are canonical names (like mail.mydomain.com.) with a full stop at the end. If you only have one mailserver, the priority doesn't matter, but 10 is a good number to go for.

Hope this helps!
0
 
LVL 1

Expert Comment

by:scarybot
ID: 33433207
By the way, once you've made the change, it can take up to 24 hours to start working I'm afraid.
0
 

Author Comment

by:Mircci
ID: 33433254

dig result:

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mydomain.com MX
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 364
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mydomain.com.            IN      MX

;; ANSWER SECTION:
mydomain.com.     1800    IN      MX      10 mail.nebula.fi.

;; AUTHORITY SECTION:
mydomain.com.     1738    IN      NS      ns2.nebula.fi.
mydomain.com.     1738    IN      NS      ns.nebula.fi.

;; ADDITIONAL SECTION:
ns.nebula.fi.           12698   IN      A       217.30.180.225
ns2.nebula.fi.          12704   IN      A       217.30.182.225

That nebula.fi is my internet-connection provider, is it ok?


0
 
LVL 1

Accepted Solution

by:
scarybot earned 500 total points
ID: 33433302
OK, this means that all email for your domain is being sent to nebula.fi, hence it's never reaching your server - you want to replace this entry with your own mailserver hostname (through your domain name provider's control panel).

Make sure you add an A record for your server's IP first to give it a sensible name (mail.mydomain.com?), and then use this new name as the MX entry, with a priority of 10.
0
 
LVL 1

Expert Comment

by:scarybot
ID: 33433325
For example...

Here are the DNS settings (pretend 1.2.3.4 is your server's IP)...

@ MX mail.mydomain.com. 10
@ NS (your ISP's nameservers)
@ A 1.2.3.4
mail.mydomain.com A 1.2.3.4

Hope this makes sense.
0
 

Author Closing Comment

by:Mircci
ID: 33435976
MX record added now to my domain and everything working fine. Thank you scarybot, exellent job for a bot!
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Nearly six years ago I was hired by a company to be their senior server engineer. One of my first projects was to implement Exchange Server 2007 on a Windows Server 2008 Single Copy Cluster for high availability. That was the easy part; read on to l…
Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question