-1

HELP! Haha. 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.

EDIT: 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 : Recipient address rejected: Access denied'

EDITEDIT: Also found this error:

Mar 16 19:28:30 mydomain postfix/smtpd[28215]: connect from mail-ob0-f179.google.com[209.85.214.179] Mar 16 19:28:31 mydomain postfix/smtpd[28215]: Anonymous TLS connection established from mail-ob0-f179.google.com[209.85.214. 179]: TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits) Mar 16 19:28:31 mydomain postfix/smtpd[28215]: NOQUEUE: reject: RCPT from mail-ob0-f179.google.com[209.85.214.179]: 554 5.7.1 : Recipient address rejected: Access denied; from= to= proto=ESMTP helo=

postconf -n

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

# 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
}
  • Have you set an mx record in your dns? – Christopher Perrin Mar 16 '14 at 18:49
  • Yes. This use to work on the old server and error even indicates that it is reaching the server, just bouncing off. – angellusmortis Mar 16 '14 at 19:13
0

I suspect that the problem is you are using check_relay_domains - I believe this has been deprecated (and here) and you now use "reject_unauth_destination" for smtpd_recipient_restrictions

  • That would make sense, because I am on a new version of them now. I will test and let you know. – angellusmortis Mar 16 '14 at 23:25
  • No dice. It does nothing. However I was able to find a new error I encountered to post. Thanks for the attempt. – angellusmortis Mar 16 '14 at 23:41
  • Bit of a long shot, but try adding reject_unauth_destination to the end of the smtpd_recipient_restrictions. It worked for someone at ubuntuforums.org/showthread.php?t=1277902. – davidgo Mar 17 '14 at 0:06
  • I already tried that. When you mentioned it, I tried it with all three of the original, the three plus reject_unauth, the first two plus reject_unauth and I also tried commenting out the line all together. – angellusmortis Mar 17 '14 at 1:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.