OS:
[root@nas ~]# cat /etc/redhat-release
CentOS release 6.7 (Final)
[root@nas ~]# uname -a
Linux nas 2.6.32-573.3.1.el6.x86_64 #1 SMP Thu Aug 13 22:55:16 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Install required compotes:
[root@nas ~]# yum install cyrus-sasl-plain -y
[root@nas ~]# yum install mail -y
[root@nas ~]# vi /etc/postfix/main.cf
to the end:
# pdd.yandex.ru: SMTP-Relay config
relayhost =
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
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
[root@nas ~]# vi /etc/postfix/canonical
@belomor.nl [email protected]
[root@nas ~]# vi /etc/postfix/sasl_passwd
smtp.yandex.ru [email protected]:MYPASSWD
[root@nas ~]# vi /etc/postfix/sender_relay
@belomor.nl smtp.yandex.ru
[root@nas ~]# postmap /etc/postfix/canonical
[root@nas ~]# postmap /etc/postfix/sasl_passwd
[root@nas ~]# postmap /etc/postfix/generic
[root@nas ~]# postmap /etc/postfix/sender_relay
[root@nas ~]# service postfix restart
[root@nas ~]# echo “MESSAGE” | mail -r “[email protected] (NAS SERVER)” -s “SUBJECT” [email protected]
[root@nas ~]# tail -f /var/log/maillog | grep “status=sent”
Dec 20 02:58:53 nas postfix/smtp[23981]: 6DEA63220718: to=<[email protected]>, relay=smtp.yandex.ru[213.180.193.38]:25, delay=1.3, delays=0.02/0/0.55/0.69, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued on smtp4h.mail.yandex.net as 1450565933-USGDET3ys6-wrFeS5vD)
:)
[root@nas ~]# date
Sun Dec 20 03:01:30 AZT 2015