I am having some trouble setting up an email server with postfix and dovecot. I have set up the config files but am getting the error:
Nov 22 23:49:09 server postfix/smtpd[31487]: connect from unknown[*.*.*.*]
Nov 22 23:49:09 server postfix/smtpd[31487]: NOQUEUE: reject: RCPT from unknown[*.*.*.*]: 454 4.7.1 <example@external.com>: Relay access denied; from=<example@internal.com> to=<example@external.com> proto=ESMTP helo=<[*.*.*.*]>
Nov 22 23:49:09 server postfix/smtpd[31487]: disconnect from unknown[*.*.*.*] ehlo=2 starttls=1 mail=1 rcpt=0/1 quit=1 commands=5/6
The server can successfully receive emails from external sources and send mail from the console.
Here is my postconf -n
:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = localhost
myhostname = mail.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/letsencrypt/live/example.com/cert.pem
smtpd_tls_key_file = /etc/letsencrypt/live/example.com/privkey.pem
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = lmtp:unix:private/dovecot-lmtp
I have tried various things with the smtpd recipient/relay restrictions, but nothing has worked. Any help would be greatly appreciated.
Запрет на ретрансляцию ссылается на ошибку аутентификации SMTP.
Большинство серверов сегодня не используют открытую ретрансляцию для отправки, поэтому вы должны проверить конфигурацию почтового клиента для аутентификации на сервере SMTP.
.