0

I keep having this exception when I send an email to my Postfix/Dovecot/Postgresql VPS server:

  localhost postfix/smtpd[495]: connect from mail-aa-bb-cc.google.com[11.22.33.44]
  localhost postfix/smtpd[495]: NOQUEUE: reject: RCPT from mail-aa-bb-cc.google.com[11.22.33.44]: 450 4.1.1 <my_postfix_domain1@domain.com>: Recipient address rejected: unverified address: host mail.my_postfix_domain.com[private/dovecot-lmtp] said: 451 4.3.0 <my_postfix_domain1@domain.com> Temporary internal error (in reply to RCPT TO command); from=<my_good_gmail_mail@gmail.com> to=<my_postfix_domain1@domain.com> proto=ESMTP helo=<mail-aa-bb-cc.google.com>
  localhost postfix/smtpd[495]: disconnect from mail-aa-bb-cc.google.com[11.22.33.44] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
  localhost postfix/smtpd[521]: connect from mail-wm0-f50.google.com[33.44.55.66]
  localhost postfix/smtpd[521]: NOQUEUE: reject: RCPT from mail-wm0-f50.google.com[33.44.55.66]: 450 4.1.1 <my_postfix_domain1@domain.com>: Recipient address rejected: unverified address: host mail.my_postfix_domain.com[private/dovecot-lmtp] said: 451 4.3.0 <my_postfix_domain1@domain.com> Temporary internal error (in reply to RCPT TO command); from=<my_good_gmail_mail@gmail.com> to=<my_postfix_domain1@domain.com> proto=ESMTP helo=<mail-wm0-f50.google.com>

What can be a possible cause? Which config data should I include?

1)

$ sudo postconf -n
alias_database =
alias_maps =
allow_percent_hack = no
biff = no
command_directory = /usr/bin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/bin
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
disable_vrfy_command = yes
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mail_spool_directory = /var/mail/local
mailbox_size_limit = 0
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 51200000
meta_directory = /etc/postfix
mydestination = $mydomain, localhost.$mydomain, localhost
mydomain = my_domain123.com
myhostname = mail.my_domain123.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix
recipient_delimiter = +
sample_directory = /etc/postfix
sendmail_path = /usr/bin/sendmail
setgid_group = postdrop
shlib_directory = /usr/lib/postfix
show_user_unknown_table_name = no
smtp_dns_support_level = dnssec
smtp_tls_security_level = dane
smtp_tls_session_cache_database = btree:${data_directory}/smtp_tlscache
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_reverse_client_hostname, reject_unauth_pipelining
smtpd_data_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_multi_recipient_bounce, reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_unauth_pipelining
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_pipelining
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous, noplaintext
smtpd_sasl_tls_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/mail.my_domain123.com/fullchain.pem
smtpd_tls_dh1024_param_file = /etc/ssl/dh2048.pem
smtpd_tls_dh512_param_file = /etc/ssl/dh512.pem
smtpd_tls_key_file = /etc/letsencrypt/live/mail.my_domain123.com/privkey.pem
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1, TLSv1.2
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_tlscache
strict_rfc821_envelopes = yes
swap_bangpath = no
tls_high_cipherlist = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
tls_ssl_options = no_ticket, no_compression
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_mailbox_domains = pgsql:/etc/postfix/virtual_mailbox_domains.cf
virtual_mailbox_maps = pgsql:/etc/postfix/virtual_mailbox_maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp

And 2):

  $ sudo postconf -M
  smtp       inet  n       -       n       -       -       smtpd
  pickup     unix  n       -       n       60      1       pickup
  cleanup    unix  n       -       n       -       0       cleanup
  qmgr       unix  n       -       n       300     1       qmgr
  tlsmgr     unix  -       -       n       1000?   1       tlsmgr
  rewrite    unix  -       -       n       -       -       trivial-rewrite
  bounce     unix  -       -       n       -       0       bounce
  defer      unix  -       -       n       -       0       bounce
  trace      unix  -       -       n       -       0       bounce
  verify     unix  -       -       n       -       1       verify
  flush      unix  n       -       n       1000?   0       flush
  proxymap   unix  -       -       n       -       -       proxymap
  proxywrite unix  -       -       n       -       1       proxymap
  smtp       unix  -       -       n       -       -       smtp
  relay      unix  -       -       n       -       -       smtp -o syslog_name=postfix/$service_name
  showq      unix  n       -       n       -       -       showq
  error      unix  -       -       n       -       -       error
  retry      unix  -       -       n       -       -       error
  discard    unix  -       -       n       -       -       discard
  local      unix  -       n       n       -       -       local
  virtual    unix  -       n       n       -       -       virtual
  lmtp       unix  -       -       n       -       -       lmtp
  anvil      unix  -       -       n       -       1       anvil
  scache     unix  -       -       n       -       1       scache
  smtp       inet  n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=no
  submission inet  n       -       y       -       -       smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_sasl_type=dovecot -o smtpd_sasl_path=private/auth -o smtpd_sasl_security_options=noanonymous -o milter_macro_daemon_name=ORIGINATING -o smtpd_helo_required=no -o smtpd_helo_restrictions= -o cleanup_service_name=submission-header-cleanup

In terms of receiving mail - no problem. Sending - I haven't tried.

  • postconf -n is a good place to start, as is postconf -M. – 84104 May 29 '18 at 18:53
  • @84104 updated. – Ивандронович May 30 '18 at 3:18
0

It would appear you don't have your table for recipient access setup. You need to ensure that you have a route for the mail to go to. Below is my recipient access restrictions on my smtp relay in the cloud

smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipient_access, permit_mynetworks, permit_auth_destination, reject_unauth_destination

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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