Postfix can't receive external emails

Discussion in 'HOWTO-Related Questions' started by Sigma2013, Dec 20, 2011.

  1. Sigma2013

    Sigma2013 New Member

    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: Dec 21, 2011
  2. falko

    falko Super Moderator ISPConfig Developer

    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?
     
  3. Sigma2013

    Sigma2013 New Member

    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: Dec 21, 2011
  4. falko

    falko Super Moderator ISPConfig Developer

    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?
     
  5. Sigma2013

    Sigma2013 New Member

    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: Dec 23, 2011
  6. falko

    falko Super Moderator ISPConfig Developer

    What's in your mail log when this happens?
     
  7. zinnium

    zinnium New Member

    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: Dec 24, 2011
  8. Sigma2013

    Sigma2013 New Member

    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.


    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.
     
  9. zinnium

    zinnium New Member

    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
     
  10. Sigma2013

    Sigma2013 New Member

    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: Dec 25, 2011
  11. Sigma2013

    Sigma2013 New Member

    I am able to receive mail now. I now noticed another issue. I am having trouble authenticating SMTP. I tried testing using Outlook and telnet and both times authentication fails. I get a "Relay access denied" error message.
     
  12. zinnium

    zinnium New Member

    Go up to the build you are using or at least a similar one, and see if there is a mail error problem note by falko. Falko has addressed some issues with the mail service on his builds. typically its located on the last page after the ispconfig install.

    here is an example, see part 20 of: http://www.howtoforge.com/perfect-server-debian-squeeze-with-bind-and-dovecot-ispconfig-3-p6

    might be a solution there.

    I am assuming you have the DNS settings 100%, and its just a build issue.
     

Share This Page