1

Postfix отключить relay

(03/12/2022 11:12:20 отредактировано arivano)

Тема: Postfix отключить relay

Приветствую знатоков.
Не судите строго, не бейте сильно, но нужна помощь по настройке Postfix.
В прошлом году было решение перейти на работу с почтовыми сервисами Office365. Собрав инфу в инете я благополучно перенастроил Postfix и все работало.
Суть перенастройки в следующем:
В файл /etc/postfix/main.cf добавлены следующие строки:

#Office365
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noplaintext noanonymous
smtp_sender_dependent_authentication = yes
smtp_connection_cache_on_demand = no
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_dependent
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_tls_security_level = may

Добавлен файл /etc/postfix/sasl_passwd с содержимым

[smtp.office365.com]:587    wialon@srv_addr:password

Добавлен файл /etc/postfix/sender_dependent с содержимым

wialon@srv_addr    [smtp.office365.com]:587

И добавлен файл /etc/postfix/sender_canonical с содержимым

wialon@wialon-local.wialon-local    wialon@srv_addr

На днях спускают директиву вернуть всё как прежде. Файл main.cf был восстановлен из копии. Сейчас он вот такой:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = wialon-local.wialon-local
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = wialon-local.wialon-local, localhost.wialon-local, localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
message_size_limit = 0

Но, в логах при отправке почты все равно проскакивает строка

Dec  3 08:05:55 wialon-local postfix/smtp[2722]: BB80B2032A: to=<recepient@srv_addr>, relay=srv_addr.mail.eo.outlook.com[104.47.14.36]:25, delay=15, delays=0.01/0.01/15/0.1, dsn=5.7.606, status=bounced (host srv_addr.mail.eo.outlook.com[104.47.14.36] said: 550 5.7.606 Access denied, banned sending IP [111.111.111.111]. To request removal from this list please visit https://sender.office.com/ and follow the directions. For more information please go to  http://go.microsoft.com/fwlink/?LinkID=526655 AS(1430) [VI1EUR04FT054.eop-eur04.prod.protection.outlook.com] (in reply to RCPT TO command))
Dec  3 08:05:55 wialon-local postfix/cleanup[2702]: 3ADD720562: message-id=<20221203080555.3ADD720562@wialon-local.wialon-local> 

Прошу помощи, как избавиться от relay на outlook.com. Где еще может быть эта настройка?

2

Postfix отключить relay

Re: Postfix отключить relay

Вопрос решили, тема закрыта. Всем спасибо!