Postfix/Dovecot cannot receive email from external sources

Discussion in 'Server Operation' started by angellus, Mar 16, 2014.

  1. angellus

    angellus New Member

    Hey all. I saw you guys post some good answers to questions similar to mine, so I decided to make an account and give it a try. I need to fix this quickly :(

    I recently was an idiot and foobared my server. I had a mail server running on it. On my new server, i am trying to set it back up and I cannot get it to work. I have almost the same exact configs from before. Everything works except I cannot receive emails from external sources. I can send emails find, I can receive forms from my own host, just not receive from another host. I have been searching around for couple of days just to get where I am. I just want to give up.

    Just to add, I am also able to connect through Outlook externally to receive my mail and send mail. If I send an email from myself to myself through Outlook, it works. It is not not my firewall or MX records.

    The error I get when trying to send an email from an external source is

    Remote Server returned '554 5.7.1 <[email protected]>: Recipient address rejected: Access denied'

    postconf -n

    Code:
     alias_database = $alias_maps
        alias_maps = hash:/etc/postfix/aliases
        broken_sasl_auth_clients = yes
        command_directory = /usr/bin
        config_directory = /etc/postfix
        daemon_directory = /usr/lib/postfix
        data_directory = /var/lib/postfix
        debug_peer_level = 2
        debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
        home_mailbox = .mail/
        html_directory = no
        inet_interfaces = all
        inet_protocols = all
        mail_owner = postfix
        mailq_path = /usr/bin/mailq
        manpage_directory = /usr/share/man
        mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain, www.$mydomain, ftp.$mydomain
        mydomain = mydomain.net
        myhostname = mail.mydomain.net
        mynetworks = 127.0.0.0/8
        myorigin = $mydomain
        newaliases_path = /usr/bin/newaliases
        queue_directory = /var/spool/postfix
        readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
        relay_domains =
        sample_directory = /etc/postfix/sample
        sendmail_path = /usr/sbin/sendmail
        setgid_group = postdrop
        smtp_tls_note_starttls_offer = yes
        smtp_use_tls = yes
        smtpd_banner = $myhostname ESMTP $mail_name
        smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks, check_relay_domains
        smtpd_sasl_auth_enable = yes
        smtpd_sasl_local_domain =
        smtpd_sasl_path = private/auth
        smtpd_sasl_security_options = noanonymous
        smtpd_sasl_type = dovecot
        smtpd_tls_CAfile = /path/to/ca
        smtpd_tls_auth_only = no
        smtpd_tls_cert_file = /path/to/cert
        smtpd_tls_key_file = /path/to/key
        smtpd_tls_loglevel = 1
        smtpd_tls_received_header = yes
        smtpd_tls_security_level = may
        smtpd_tls_session_cache_database = btree:/var/spool/postfix/smtpd_tls_cache
        smtpd_tls_session_cache_timeout = 3600s
        smtpd_use_tls = yes
        tls_random_source = dev:/dev/urandom
        unknown_local_recipient_reject_code = 550
    doveconf -n

    Code:
    # 2.2.11: /etc/dovecot/dovecot.conf
        # OS: Linux 3.10.33-1-lts x86_64
        auth_mechanisms = plain login
        disable_plaintext_auth = no
        log_path = /var/log/dovecot.log
        mail_location = maildir:~/.mail
        mbox_write_locks = fcntl
        passdb {
          driver = pam
        }
        protocols = imap pop3
        service auth {
          unix_listener /var/spool/postfix/private/auth {
            group = postfix
            mode = 0666
            user = postfix
          }
          unix_listener auth-userdb {
            group = postfix
            mode = 0660
            user = postfix
          }
        }
        service imap-login {
          inet_listener imap {
            port = 143
          }
          inet_listener imaps {
            port = 993
            ssl = yes
          }
        }
        ssl_cert = </path/to/cert
        ssl_key = </path/to/key
        userdb {
          driver = passwd
        }
        protocol pop3 {
          pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
          pop3_uidl_format = %08Xu%08Xv
        }
     

Share This Page