Все просто:
Добавляем в конец файла /etc/postfix/main.cf
# Отправка писем через яндекс с авторизацией
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/mailpasswd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
smtp_sasl_mechanism_filter = login
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
sender_canonical_maps = hash:/etc/postfix/canonical
smtp_generic_maps = hash:/etc/postfix/generic
smtp_use_tls = yes
Содержание файлов:
/etc/postfix/mailpasswd
[smtp.yandex.ru] user.report@yandex.ru:password
/etc/postfix/sender_relay
@_имя_сервера_с_доменом [smtp.yandex.ru]
@localhost.localdomain [smtp.yandex.ru]
/etc/postfix/canonical
@localhost.localdomain user.report@yandex.ru
@pbx.localdomain user.report@yandex.ru
/etc/postfix/generic
root@localhost user.report@yandex.ru
asterisk@localhost user.report@yandex.ru
root user.report@yandex.ru
После всех добавлений в файлы сделать команды:
postmap /etc/postfix/mailpasswd
postmap /etc/postfix/sender_relay
postmap /etc/postfix/canonical
postmap /etc/postfix/generic
Оригинал
https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=37&LESSON_ID=5506
Добавляем в конец файла /etc/postfix/main.cf
# Отправка писем через яндекс с авторизацией
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/mailpasswd
smtp_sasl_security_options = noanonymous
smtp_sasl_type = cyrus
smtp_sasl_mechanism_filter = login
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
sender_canonical_maps = hash:/etc/postfix/canonical
smtp_generic_maps = hash:/etc/postfix/generic
smtp_use_tls = yes
Содержание файлов:
/etc/postfix/mailpasswd
[smtp.yandex.ru] user.report@yandex.ru:password
/etc/postfix/sender_relay
@_имя_сервера_с_доменом [smtp.yandex.ru]
@localhost.localdomain [smtp.yandex.ru]
/etc/postfix/canonical
@localhost.localdomain user.report@yandex.ru
@pbx.localdomain user.report@yandex.ru
/etc/postfix/generic
root@localhost user.report@yandex.ru
asterisk@localhost user.report@yandex.ru
root user.report@yandex.ru
После всех добавлений в файлы сделать команды:
postmap /etc/postfix/mailpasswd
postmap /etc/postfix/sender_relay
postmap /etc/postfix/canonical
postmap /etc/postfix/generic
Оригинал
https://dev.1c-bitrix.ru/learning/course/?COURSE_ID=37&LESSON_ID=5506
Комментариев нет:
Отправить комментарий