Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th December 2011, 06:35
Sigma2013 Sigma2013 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Postfix can't receive external emails

I am having issues with receiving emails from outside of my server. I can use telnet and send/receive emails from any email address. However, if I try to use my gmail I never get the message.

Any help would be greatly appreciated!

Here is main.cf
Code:
############## Postfix###############
#Date Modified 17th June 2008
#-------------------------------------------------------
smtpd_banner = $myhostname
biff = no
append_dot_mydomain = no
relayhost =
mynetworks = 127.0.0.0/8
inet_interfaces = all
mailbox_size_limit = 0
recipient_delimiter = +
alias_database = hash:/etc/postfix/aliases
alias_maps = $alias_database
myhostname = phoenix.mydomain.com
mydomain = $myhostname
myorigin = $myhostname
#mydestination = $myhostname, localhost.$mydomain, localhost
mydestination = $myhostname, localhost.$mydomain, $transport_maps
mail_spool_directory = /var/spool/mail
debug_peer_level = 2
debugger_command =
  PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
  xxgdb $daemon_directory/$process_name $process_id & sleep 5
disable_vrfy_command = no
readme_directory = /usr/share/doc/postfix-2.2.10/README_FILES
sample_directory = /usr/share/doc/postfix-2.2.10/samples
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
command_directory = /usr/sbin
manpage_directory = /usr/share/man
daemon_directory = /usr/libexec/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
queue_directory = /var/spool/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 450
####################postfix section ends here###############

#######################Virtual Domains Users and mailboxes###############
virtual_mailbox_domains = mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:12
virtual_transport = virtual
##############################Virtual section of main.cf ends##############
#################### SASL/TLS Authentication###########################
######SASL PART#########
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain =
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination
######TLS PART###########
smptpd_tls_cert_file = /etc/postfix/ssl/mailserver/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/mailserver/smtpd.key
smtpd_tls_CAfile = /etc/postfix/ssl/mailserver/cacert.pem
smtp_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_received_header = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_loglevel = 1
tls_random_source = dev:/dev/urandom
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_recieved_header = yes
###########################SASL/TLS Authentication ends here#############

Last edited by Sigma2013; 21st December 2011 at 16:37.
Reply With Quote
Sponsored Links
  #2  
Old 21st December 2011, 11:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Are there any errors in your mail log (in the /var/log/ directory)?

Does the MX record of your domain point to the correct server?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 21st December 2011, 16:40
Sigma2013 Sigma2013 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't see any errors. Just these warnings/failures.

Dec 21 09:25:49 phoenix postfix/smtp[7252]: certificate verification failed for mx3.hotmail.com: num=18:self signed certificate
Dec 21 09:25:49 phoenix postfix/smtp[7251]: certificate verification failed for mx4.hotmail.com: num=18:self signed certificate
Dec 21 09:25:49 phoenix postfix/smtp[7252]: warning: peer certificate has no subject CN
Dec 21 09:25:49 phoenix postfix/smtp[7251]: warning: peer certificate has no subject CN

The MX domain points to phoenix.mydomain.com. I did a DNS report and it doesn't show any errors. Phoenix is also our server hostname. Is that a problem?

Last edited by Sigma2013; 21st December 2011 at 16:47.
Reply With Quote
  #4  
Old 22nd December 2011, 14:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Does the A record for phoenix.mydomain.com point to the correct IP?

Is port 25 open to the outside, or does your firewall block it?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 23rd December 2011, 08:20
Sigma2013 Sigma2013 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The A record resolves to the correct IP. I can connect via telnet on port 25 and everything seems to work fine. All of my test emails from Gmail bounce back with this message:

The recipient server did not accept our requests to connect.[phoenix.renegadegaming.com. (10): Connection refused]

When I use my school email account and my personal ISP email account, the messages get through.

Last edited by Sigma2013; 23rd December 2011 at 08:35.
Reply With Quote
  #6  
Old 24th December 2011, 11:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Quote:
Originally Posted by Sigma2013 View Post
The recipient server did not accept our requests to connect.[phoenix.renegadegaming.com. (10): Connection refused]
What's in your mail log when this happens?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 24th December 2011, 17:50
zinnium zinnium is offline
Junior Member
 
Join Date: Nov 2011
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Default

did you remember to setup the DNS with the company you purchased the domain from for the mail??? There is a difference between the mail and the web DNS.

If its not setup correctly: You can shoot emails out of the webmai. but when emails come to you, they are resolved at the proper DNS record.

Last edited by zinnium; 24th December 2011 at 17:54.
Reply With Quote
  #8  
Old 24th December 2011, 18:56
Sigma2013 Sigma2013 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
What's in your mail log when this happens?
I had everything working for a short while. There was a default alias that was conflicting. Now I'm getting a new error. I sent a couple emails and they both bounce back with the error message below. The messages went through but I didn't get them until way after I sent it.

454 454 4.3.0 TLS not available due to local problem (state 9).

When I look in maillog I see a few of these:

certificate verification failed for gmail-smtp-in.l.google.com; num=18:self signed certificate
warning: peer certificate has no subject CN
warning: No server certs available. TLS won't be enabled

I tried sending an email and when I look in the maillog there is no record of my email in the log yet.

Quote:
Originally Posted by zinnium View Post
did you remember to setup the DNS with the company you purchased the domain from for the mail??? There is a difference between the mail and the web DNS.

If its not setup correctly: You can shoot emails out of the webmai. but when emails come to you, they are resolved at the proper DNS record.

I just set up the DNS records on the registrars site. We had transferred over to a new host and changed all the nameservers, etc to our new host. I didn't know you had to change it on both.
Reply With Quote
  #9  
Old 24th December 2011, 19:06
zinnium zinnium is offline
Junior Member
 
Join Date: Nov 2011
Posts: 25
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Yeah... its like each host is different.

Most of ours is purchased through 1&1 and there is a web DNS and mail DNS with them. I had this trouble on 1 of falko's perfect builds before until I realized it was me and not cent0S
Reply With Quote
  #10  
Old 25th December 2011, 01:01
Sigma2013 Sigma2013 is offline
Junior Member
 
Join Date: Dec 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I'm pretty sure I have the DNS/MX set up correctly. There were several typos for TLS from the tutorial. I went through and it looks like everything is working again.

Last edited by Sigma2013; 25th December 2011 at 01:30.
Reply With Quote
Reply

Bookmarks

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
How cai remove amavis from postfix ? gabrix Server Operation 16 2nd October 2012 09:58
Postfix: can send emails outside, none received daseagle Server Operation 9 11th October 2011 12:03
Cannot send or receive mail farbrorc Installation/Configuration 6 24th January 2010 11:56
PostFix can receive but can not send emails cjsdfw Server Operation 10 8th December 2009 08:11
421 Unexpected failure Lizard King Installation/Configuration 20 7th July 2009 20:43


All times are GMT +2. The time now is 04:42.


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