LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 08-02-2010, 08:02 AM   #1
raspino
Member
 
Registered: Jul 2010
Posts: 38

Rep: Reputation: 0
ubuntu mailser not receiving emails


I recently setup a mailserver on ubuntu server. I am able to send emails correctly. However, no emails show up when sent to me on this server. I can send emails to myself on the server but not outside email like yahoo.com or gmail or any other emails can reach me. My MX and A record appear to have been set up correctly. My router seems to receive hits when I receive emails. When I check the logs of the router it tells me that there was a remote attempt to send traffic to the router forwarded to the server but I don't see this traffic in any mailbox. When I do pingability.com for my site, I get the following error message:
Error There was a problem while talking with the mail server. Got 'Socket Timeout Exception: connect timed out'

So somehow, the email traffic seems to get to my router and my router appears to forward it to my server but it does timeout. The emails eventually bounce back into my gmail with the following error message:

mail.raspinostores.com. (10): Connection timed out]

Here is the content of my main.cf

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.raspinostores.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#myorigin = raspinostores.com
mydestination = mail.raspinostores.com, raspinostores.com, localhost.raspinostores.com, localhost
relayhost = $mydomain
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
41,1 Bot


Any help will be appreciated.
 
Old 08-02-2010, 08:24 AM   #2
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
here is my postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = mail.raspinostores.com, raspinostores.com, localhost.raspinostores.com, localhost
myhostname = mail.raspinostores.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = $mydomain
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
 
Old 08-02-2010, 08:47 AM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Any firewall?
 
Old 08-02-2010, 09:12 AM   #4
lartman
LQ Newbie
 
Registered: Jan 2004
Location: Sydney, Australia
Distribution: RHEL
Posts: 22

Rep: Reputation: 17
Quote:
When I do pingability.com for my site, I get the following error message:
Error There was a problem while talking with the mail server. Got 'Socket Timeout Exception: connect timed out'

So somehow, the email traffic seems to get to my router and my router appears to forward it to my server but it does timeout. The emails eventually bounce back into my gmail with the following error message:

mail.raspinostores.com. (10): Connection timed out]
To test connectivity 'telnet mail.raspinostores.com 25' and you should get a greeting from the smtp server.

Those error messages indicate the traffic isn't reaching your server. First check the firewall on the server is open to email. Then check the network.

nslookup shows mail should go to:
Code:
raspinostores.com       mail exchanger = 10 mail.raspinostores.com.
mail.raspinostores.com  internet address = 68.83.209.139
however traceroute only gets as far as
Code:
traceroute to mail.raspinostores.com (68.83.209.139), 30 hops max, 40 byte packets
...
19  68.85.130.86 (68.85.130.86)  230.766 ms  230.560 ms  230.341 ms
20  68.85.67.25 (68.85.67.25)  231.010 ms  230.962 ms  230.964 ms
21  68.85.67.17 (68.85.67.17)  247.763 ms  247.606 ms  247.961 ms
22  68.85.80.146 (68.85.80.146)  247.731 ms  247.783 ms  247.744 ms
23  * * *
This hop is probably where the traffic is being lost. Is the mail server behind a NAT firewall? If so port 25 needs to be forwarded to the mail server.
 
Old 08-02-2010, 09:44 AM   #5
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by lartman View Post
To test connectivity 'telnet mail.raspinostores.com 25' and you should get a greeting from the smtp server.

Those error messages indicate the traffic isn't reaching your server. First check the firewall on the server is open to email. Then check the network.

This is correct.

nslookup shows mail should go to:
Code:
raspinostores.com       mail exchanger = 10 mail.raspinostores.com.
mail.raspinostores.com  internet address = 68.83.209.139
however traceroute only gets as far as
Code:
traceroute to mail.raspinostores.com (68.83.209.139), 30 hops max, 40 byte packets
...
19  68.85.130.86 (68.85.130.86)  230.766 ms  230.560 ms  230.341 ms
20  68.85.67.25 (68.85.67.25)  231.010 ms  230.962 ms  230.964 ms
21  68.85.67.17 (68.85.67.17)  247.763 ms  247.606 ms  247.961 ms
22  68.85.80.146 (68.85.80.146)  247.731 ms  247.783 ms  247.744 ms
23  * * *
This hop is probably where the traffic is being lost. Is the mail server behind a NAT firewall? If so port 25 needs to be forwarded to the mail server.
Correct. The server was down when you tested. I had to leave for work so I powered it off. But you probably would not have reached the server anyway.

Also, I have forwarded port 25 to the IP address of the server.

I am inclined to think that it is a firewall issue or it is probably a configuration problem but I have not idea. Help, I need :-)
 
Old 08-02-2010, 09:46 AM   #6
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Quote:
I am inclined to think that it is a firewall issue or it is probably a configuration problem but I have not idea. Help, I need :-)
Do you have a firewall?
If yes disable it, and try again.
 
Old 08-02-2010, 10:07 AM   #7
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Do you have a firewall?
If yes disable it, and try again.
you mean a firewall on the server? I am not sure. It was probably installed by default when I installed the server. Do you know how I can check to see if I have one?
 
Old 08-02-2010, 10:10 AM   #8
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
In a terminal type
Code:
# iptables -L
Make sure port 25 is forwarded to the server on the router.
 
Old 08-02-2010, 10:17 AM   #9
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
In a terminal type
Code:
# iptables -L
Make sure port 25 is forwarded to the server on the router.
the last time I tried iptables it looks like it was not installed. I will give it a try this evening and post a reply. Thanks for your help...very much appreciated.
 
Old 08-02-2010, 10:18 AM   #10
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
You need to issue the command as root
 
1 members found this post helpful.
Old 08-02-2010, 05:30 PM   #11
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
You need to issue the command as root
I was able to see the results. Is there anything in particular I should be looking for?
 
Old 08-02-2010, 05:49 PM   #12
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
You need to issue the command as root
OK. I was able to open port 25 and that did the trick. Thanks a lot for saving me all those sleepless nights.
 
Old 08-03-2010, 05:57 AM   #13
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
Quote:
Correct. The server was down when you tested. I had to leave for work so I powered it off. But you probably would not have reached the server anyway.
Do you have a backupserver configured to receive the mail in case your server is down ?
 
Old 08-04-2010, 09:45 AM   #14
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by repo View Post
Do you have a backupserver configured to receive the mail in case your server is down ?
Unfortunately not. I think I will eventually setup a backup server.

BTW, I ran into the same problem again. By reading around, I saw that I did not save the changes I made when I opened Port 25 on the server and even after supposedly saving it, I am still having the a similar problem like the one I first reported. I
when I opened the port again by doing

sudo iptables -A INPUT -p tcp --dport 25 -j ACCEPT

again and I was still not receiving emails. Pingability indicates that it cannot reach the server. However, I do not see any logs in my router to indicate that traffic was forwarded (like I used to see before the I opened the port) which may mean that they are forwarded and logged somewhere on the server, I looked at the logs briefly but did not understand much. I have the server currently turned off. I will turn it back on later today and try to see if I can fix it. If not, I will post a message here. If you have any tips too, please let me know.
Thanks,
 
Old 08-04-2010, 08:12 PM   #15
raspino
Member
 
Registered: Jul 2010
Posts: 38

Original Poster
Rep: Reputation: 0
I am getting a connection refused when I send a mail. So now I can't send a mail nor receive one. I may have to search for another solution. I think this was caused by trying to configure squirrelmail yesterday.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mail Server not receiving emails dranobob Linux - Newbie 1 04-03-2006 09:14 AM
Not receiving notification emails Nylex LQ Suggestions & Feedback 2 09-07-2005 08:49 AM
Receiving Emails as a server deleted_user_01 Linux - Newbie 14 02-17-2005 09:15 AM
not receiving emails aroop Linux - Networking 1 09-30-2004 05:43 PM
not receiving emails from server eliboone Red Hat 9 08-29-2003 11:47 AM


All times are GMT -5. The time now is 02:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration