Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th March 2013, 14:41
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Unhappy Postfix no longer receives or sends email that isn't to or from localhost

Hello.
Recenty, my postfix installation has lost its capability of sending and receiving emails from outside localhost. I have made no changes to its previously working configuration or to my firewall. Even so, I have lost sending and receiving capabilities.

/etc/postfix/main.cf
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.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 = www.quantumcooler.net
alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
myorigin = /etc/mailname
mydestination = www.quantumcooler.net, localhost, localhost.localdomain
relayhost =
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd
smtp_sasl_security_options =
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
smtpd_client_message_rate_limit = 100
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = dovecot
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
owner_request_special = no
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
message_size_limit = 0
inet_protocols = all
I'm new to linux and server administration so I'm not sure if I found anything interesting but in the /etc/postfix/ directory there are the files:
Code:
-rw-r--r-- 1 root root     3701 Mar 13 22:29 main.cf
-rw-r--r-- 1 root root     3634 Mar 13 22:29 main.cf~
-rw-r--r-- 1 root root     3701 Mar 13 22:29 main.cf~2
-rw-r--r-- 1 root root     3702 Mar 13 22:29 main.cf~3
-rw-r--r-- 1 root root     6388 Mar 13 22:29 master.cf
-r-------- 1 root root     6388 Mar 13 22:29 master.cf~
-r-------- 1 root root     6388 Mar 13 22:29 master.cf~2
Are the files with the tilde temporary files? If so, why would there be temporary files of a configuration file?

canyouseeme.org reports that it cannot see me on port 25, but it can see me on port 587. This is because my ISP, comcast, blocks this port. I have to use their smtp server, which I believe to be smtp.comcast.net, for outgoing mail on port 587. As I have stated before, this was a working postfix configuration to which I have made no changes. However, now I can no longer send or receive email. Would buying a smarthost service like that provided by dyn.com prevent this failure in the future? Any help is greatly appreciated.
Reply With Quote
Sponsored Links
  #2  
Old 19th March 2013, 14:57
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

Exec the following commands and post here what you get

Code:
mailq
Code:
telnet yourdomain.com 25
Code:
iptables -L
Reply With Quote
  #3  
Old 19th March 2013, 15:34
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default Here are the outputs

Here are the outputs of those commands.

mailq:
Code:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
E223D2EB800     1402 Mon Mar 18 16:18:43  admin@mail.quantumcooler.net
            (connect to mx1.hotmail.com[65.55.37.88]:25: Connection timed out)
                                         fristiase@hotmail.com



CDD322EB7A2     1399 Mon Mar 18 06:11:40  admin@mail.quantumcooler.net
(connect to alt2.gmail-smtp-in.l.google.com[173.194.67.26]:25: Connection timed out)
                                         charo86709@gmail.com

272132EB608     1427 Fri Mar 15 01:48:41  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1b]:25: Network is unreachable)
                                         fjptly048+golny006@gmail.com


5FB2C2EB796     2090 Mon Mar 18 05:06:30  web4@www.quantumcooler.net
(delivery temporarily suspended: connect to mx2.hotmail.com[65.54.188.126]:25: Connection timed out)
                                         xiaoxiaoyuer0503@hotmail.com

170112EB79B     2084 Mon Mar 18 04:54:00  web4@www.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1b]:25: Network is unreachable)
                                         venik.vinzer@gmail.com

15E7F2EB6FB     1431 Sun Mar 17 04:29:45  admin@mail.quantumcooler.net
(connect to alt2.gmail-smtp-in.l.google.com[173.194.66.26]:25: Connection timed out)
                                         fjptly037+soney019@gmail.com

12A352EB880     1403 Tue Mar 19 06:46:08  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mx4.hotmail.com[65.55.37.104]:25: Connection timed out)
                                         hark.eon@hotmail.com

126292EB82A     1416 Mon Mar 18 22:21:57  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1b]:25: Network is unreachable)
                                         fearghalceweq@gmail.com

141CC2EB620     1435 Fri Mar 15 04:00:08  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a]:25: Network is unreachable)
                                         hh.g.by.yt.n.mm.n.f.ii@gmail.com

142882EB607     1411 Fri Mar 15 01:59:41  admin@mail.quantumcooler.net
           (connect to mx4.hotmail.com[65.55.92.152]:25: Connection timed out)
                                         bigtheme4186@hotmail.com

0F78A2EB5CA     1390 Thu Mar 14 19:15:15  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1b]:25: Network is unreachable)
                                         jjkulgp@gmail.com

0BD8D2EB56F     1405 Thu Mar 14 10:12:59  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mta5.am0.yahoodns.net[66.196.118.36]:25: Connection timed out)
                                         makiacer@nokiamail.com


40AA82EB7FC     1384 Mon Mar 18 18:22:05  admin@mail.quantumcooler.net
(connect to alt2.gmail-smtp-in.l.google.com[173.194.67.26]:25: Connection timed out)
                                         hobbat5@gmail.com

49BD02EB5C7     1408 Thu Mar 14 17:51:40  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[173.194.66.26]:25: Connection timed out)
                                         laggingload@gmail.com

40CF42EB6AC     1418 Sat Mar 16 10:10:15  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mx4.hotmail.com[65.54.188.72]:25: Connection timed out)
                                         sypeindelikep@hotmail.com

45C582EB6AE     2084 Sat Mar 16 10:59:10  web4@www.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[173.194.78.26]:25: Connection timed out)
                                         podvodniksuper@gmail.com

4B52E2EB6D6     1405 Sat Mar 16 23:16:18  admin@mail.quantumcooler.net
    (connect to mailin-01.mx.aol.com[205.188.59.194]:25: Connection timed out)
                                         sashenkatwp818@aol.com

444D52EB672     1381 Sat Mar 16 01:05:04  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mailin-04.mx.aol.com[205.188.103.2]:25: Connection timed out)
                                         nagexi@aol.com

461A02EB79D     1410 Mon Mar 18 11:10:19  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mx1.hotmail.com[65.55.92.184]:25: Connection timed out)
                                         cloryblub@hotmail.com

423502EB869     1405 Tue Mar 19 04:58:20  admin@mail.quantumcooler.net
         (connect to mail.gifuxuk.tk[46.165.197.147]:25: Connection timed out)
                                         ulrick4moja@gifuxuk.tk

4BE592EB614     2101 Fri Mar 15 05:20:44  web4@www.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1a]:25: Network is unreachable)
                                         wajiadaoshuoxingyanq@gmail.com

4EADE2EB6D1     1407 Sat Mar 16 20:26:01  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mx2.hotmail.com[65.54.188.126]:25: Connection timed out)
                                         fejimaui@hotmail.com

4F4732EB6EE     1423 Sun Mar 17 03:38:35  admin@mail.quantumcooler.net
    (connect to mta7.am0.yahoodns.net[66.94.237.139]:25: Connection timed out)
                                         juliennewe23jd@nokiamail.com

4F4202EB6F1     1432 Sun Mar 17 03:50:41  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[173.194.67.26]:25: Connection timed out)
                                         h.h.g.b.yy.tnm.m.nfii@gmail.com

4C25B2EB555     2100 Thu Mar 14 09:15:53  web4@www.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[2a00:1450:400c:c00::1b]:25: Network is unreachable)
                                         cizhuijingzituijiang@gmail.com

45E092EB87F     1422 Tue Mar 19 07:08:40  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mx4.hotmail.com[65.54.188.72]:25: Connection timed out)
                                         infeteoccanty@hotmail.com

49E722EB808     1399 Mon Mar 18 17:33:33  admin@mail.quantumcooler.net
     (connect to mailin-04.mx.aol.com[205.188.103.2]:25: Connection timed out)
                                         nehemiahu161@aol.com

419C22EB5B0     1390 Thu Mar 14 15:35:29  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[173.194.66.26]:25: Connection timed out)
                                         yjyrzwc@gmail.com

46CC72EB7EE     1424 Mon Mar 18 13:29:25  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to alt2.gmail-smtp-in.l.google.com[173.194.67.26]:25: Connection timed out)
                                         fjptly047+aniw001@gmail.com

45BEB2EB898     1403 Tue Mar 19 08:57:05  admin@mail.quantumcooler.net
                (connect to yepbd.com[91.236.74.102]:25: Connection timed out)
                                         yen@lovelybabygirl.com

45E332EB77F     1390 Mon Mar 18 01:18:51  admin@mail.quantumcooler.net
(delivery temporarily suspended: connect to mailin-04.mx.aol.com[205.188.103.2]:25: Connection timed out)
                                         sags.gott@aol.com

-- 898 Kbytes in 424 Requests.

telnet quantumcooler.net 25:
Code:
Trying 68.62.190.207...
Connected to quantumcooler.net.
Escape character is '^]'.
220 www.quantumcooler.net ESMTP Postfix (Ubuntu)

telnet> Connection closed.
If you happened to have wanted me to telnet my mx record, here's
telnet mail.quantumcooler.net 25:
Code:
Trying 68.62.190.207...
Connected to mail.quantumcooler.net.
Escape character is '^]'.
220 www.quantumcooler.net ESMTP Postfix (Ubuntu)

telnet> Connection closed.
iptables -L
Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
fail2ban-courierimaps  tcp  --  anywhere             anywhere             multiport dports imaps
fail2ban-courierimap  tcp  --  anywhere             anywhere             multiport dports imap2
fail2ban-courierpop3s  tcp  --  anywhere             anywhere             multiport dports pop3s
fail2ban-courierpop3  tcp  --  anywhere             anywhere             multiport dports pop3
fail2ban-pureftpd  tcp  --  anywhere             anywhere             multiport dports ftp
fail2ban-sasl  tcp  --  anywhere             anywhere             multiport dports smtp
fail2ban-ssh  tcp  --  anywhere             anywhere             multiport dports ssh

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain fail2ban-courierimap (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-courierimaps (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-courierpop3 (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-courierpop3s (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-pureftpd (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-sasl (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere            

Chain fail2ban-ssh (1 references)
target     prot opt source               destination         
RETURN     all  --  anywhere             anywhere

I hope the outputs reveal what's wrong. I had to shorten the output of mailq as it was 898 Kbytes and this forum wouldn't let me post the message.
Reply With Quote
  #4  
Old 19th March 2013, 15:38
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

well... As you said, your mailq is tooo big.

Run
Code:
postsuper -d ALL
and try again. Be aware, it will delete all mailq entries.
Reply With Quote
  #5  
Old 19th March 2013, 15:54
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Okay. I ran sudo postsuper -d ALL and then ran mailq:
Quote:
Mail queue empty
Before doing that though, I ran sudo postsuper -d ALL and I tried to send a message from my server machine and it did not reach an outside email domain. I tried to send from an outside email and it did not reach my server machine. I then ran sudo postupser -d ALL again and then provided the output of mailq in the above quote.
Reply With Quote
  #6  
Old 19th March 2013, 15:59
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

Quote:
Originally Posted by Wsbs9GC View Post
Okay. I ran sudo postsuper -d ALL and then ran mailq:

Before doing that though, I ran sudo postsuper -d ALL and I tried to send a message from my server machine and it did not reach an outside email domain. I tried to send from an outside email and it did not reach my server machine. I then ran sudo postupser -d ALL again and then provided the output of mailq in the above quote.
run
Code:
echo "This is a test E-mail message." | mail -s "Test E-mail message" youremail@yourdomain.com

and then
Code:
tail -f /var/log/messages
and post here, what you have got from the last command.
Reply With Quote
  #7  
Old 19th March 2013, 16:08
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

tail -f /var/log/messages:
Code:
tail: cannot open `/var/log/messages' for reading: No such file or directory
I followed the ubuntu perfect server guide if that changes any filepaths. I checked in my mail client and I did receive the email though.
Reply With Quote
  #8  
Old 19th March 2013, 16:10
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
Default

My bad...

Code:
tail f /var/log/mail.log
Reply With Quote
  #9  
Old 19th March 2013, 16:15
Wsbs9GC Wsbs9GC is offline
Member
 
Join Date: Aug 2012
Posts: 36
Thanks: 1
Thanked 0 Times in 0 Posts
Default

tail -f /var/log/mail.log:
Code:
Mar 19 11:08:19 www postfix/smtp[30559]: connect to mta5.am0.yahoodns.net[74.6.136.244]:25: Connection timed out
Mar 19 11:08:49 www postfix/smtp[30559]: connect to mta7.am0.yahoodns.net[98.138.112.38]:25: Connection timed out
Mar 19 11:09:19 www postfix/smtp[30559]: connect to mta5.am0.yahoodns.net[98.138.112.38]:25: Connection timed out
Mar 19 11:09:49 www postfix/smtp[30559]: connect to mta7.am0.yahoodns.net[66.196.118.34]:25: Connection timed out
Mar 19 11:09:49 www postfix/smtp[30559]: D11922DEED2: to=<berlioz_bat@nokiamail.com>, relay=none, delay=688, delays=538/0.14/150/0, dsn=4.4.1, status=deferred (connect to mta7.am0.yahoodns.net[66.196.118.34]:25: Connection timed out)
Mar 19 11:10:02 www dovecot: imap-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Mar 19 11:10:02 www postfix/smtpd[30614]: connect from localhost.localdomain[127.0.0.1]
Mar 19 11:10:02 www dovecot: pop3-login: Disconnected (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured
Mar 19 11:10:02 www postfix/smtpd[30614]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Mar 19 11:10:02 www postfix/smtpd[30614]: disconnect from localhost.localdomain[127.0.0.1]
Reply With Quote
  #10  
Old 19th March 2013, 16:19
almere almere is offline
ISPConfig Developer
 
Join Date: Nov 2012
Location: Netherlands, Rotterdam
Posts: 231
Thanks: 20
Thanked 39 Times in 34 Posts
Send a message via Skype™ to almere
 
Default

Did you change your hostname?

you are connecting to postfix from localhost.localdomain, it should be you hostname. eg: s1.mydomain.com

http://www.howtoforge.com/perfect-se...ispconfig-3-p3

Please, follow the step #7
Reply With Quote
Reply

Bookmarks

Tags
can't send or receive, postfix

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix SMTP Auth to Dovecot Not Working -- HELP! Scratchpad Server Operation 6 12th April 2011 13:29
CGI and FormMail Cracklefish Installation/Configuration 17 13th October 2009 13:40
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
CentoS doesn't send the emails vaio1 Installation/Configuration 18 5th November 2008 17:51
maildir not created t_ras Installation/Configuration 3 1st July 2006 12:52


All times are GMT +2. The time now is 20:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.