When I send an email from a Gmail to an email on my postfix server I get 454 4.7.1 relay access denied. This is my main.cf:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
compatibility_level = 2
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
milter_default_action = accept
mydestination = $myhostname, $mydomain, mail.domain.com, localhost.$mydomain, localhost
mydomain = domain.com
myhostname = mail.domain.com
mynetworks = [::ffff:]/104 [::1]/128
myorigin = $mydomain
non_smtpd_milters = inet:
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_milters = inet:
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /root/mail.crt
smtpd_tls_key_file = /root/mail.key
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

This is the maillog

Mar  5 06:05:02 mail postfix/smtpd[2163]: connect from mail-ed1-f46.google.com[]
Mar  5 06:05:02 mail postfix/smtpd[2158]: disconnect from mail-ed1-f53.google.com[] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7
Mar  5 06:05:03 mail postfix/smtpd[2163]: NOQUEUE: reject: RCPT from mail-ed1-f46.google.com[]: 454 4.7.1 <me@domain.com>: Relay access denied; from=<me@gmail.com> to=<me@domain.com> proto=ESMTP helo=<mail-ed1-f46.google.com>
Mar  5 06:05:03 mail postfix/smtpd[2163]: disconnect from mail-ed1-f46.google.com[] ehlo=2 starttls=1 mail=1 rcpt=0/1 data=0/1 quit=1 commands=5/7

Same with all domains, no mail anymore on reception.

But since 2 min, i got mail come again. I have just add all my domain to postfix/main.cf

Before it was :

mydestination = $myhostname, serveur.pulsart-games.com, localhost.pulsart-games.com, localhost

I add my domain that dont received mail anymore like this :

mydestination = $myhostname, serveur.pulsart-games.com, localhost.pulsart-games.com, localhost, amns.fr, pulsart-games.com, agence-brunel.com

And now its seem to work.

Try it

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.