System mail: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 2: | Line 2: | ||
<pre> | <pre> | ||
account default | account default | ||
from | from yandex-username@yandex.ru | ||
set_from_header on | |||
host smtp.yandex.ru | host smtp.yandex.ru | ||
port 465 | port 465 | ||
| Line 9: | Line 10: | ||
tls_starttls off | tls_starttls off | ||
tls_trust_file /etc/ssl/certs/ca-certificates.crt | tls_trust_file /etc/ssl/certs/ca-certificates.crt | ||
user | user yandex-username | ||
password <password> | password <password> | ||
| Line 18: | Line 19: | ||
default: user@example.org | default: user@example.org | ||
</pre> | </pre> | ||
* If using <code>mdadm</code>, add to /etc/mdadm.conf: | * If using <code>mdadm</code>, add to /etc/mdadm.conf: | ||
<pre> | <pre> | ||
MAILADDR root | MAILADDR root | ||
</pre> | </pre> | ||
* <code># /etc/rc.d/rc.postfix stop</code> | * <code># /etc/rc.d/rc.postfix stop</code> | ||
| Line 29: | Line 27: | ||
* <code># rm -r /etc/postfix</code> | * <code># rm -r /etc/postfix</code> | ||
* <code># rm /etc/rc.d/rc.postfix</code> | * <code># rm /etc/rc.d/rc.postfix</code> | ||
* <code> | * <code>/usr/sbin/sendmail</code> | ||
<pre> | |||
#!/bin/bash | |||
/usr/bin/msmtp -Fhostname "$@" | |||
</pre> | |||
[[Category: Linux]] | [[Category: Linux]] | ||
Revision as of 18:46, 9 December 2022
/etc/msmtprc
account default from yandex-username@yandex.ru set_from_header on host smtp.yandex.ru port 465 auth on tls on tls_starttls off tls_trust_file /etc/ssl/certs/ca-certificates.crt user yandex-username password <password> aliases /etc/aliases
/etc/aliases
default: user@example.org
- If using
mdadm, add to /etc/mdadm.conf:
MAILADDR root
# /etc/rc.d/rc.postfix stop# removepkg postfix# rm -r /etc/postfix# rm /etc/rc.d/rc.postfix/usr/sbin/sendmail
#!/bin/bash /usr/bin/msmtp -Fhostname "$@"