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 hostname@ | from hostname@example.org | ||
host smtp.yandex.ru | host smtp.yandex.ru | ||
port 465 | port 465 | ||
| Line 9: | Line 9: | ||
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 hostname@example.org | ||
password <password> | password <password> | ||
| Line 16: | Line 16: | ||
* <code>/etc/aliases</code> | * <code>/etc/aliases</code> | ||
<pre> | <pre> | ||
default: user@ | default: user@example.org | ||
</pre> | </pre> | ||
* Add to the end of <code>/etc/nail.rc</code>: | * Add to the end of <code>/etc/nail.rc</code>: | ||
<pre>set from="hostname <hostname@ | <pre>set from="hostname <hostname@example.org>"</pre> | ||
* <code># /etc/rc.d/rc.postfix stop</code> | * <code># /etc/rc.d/rc.postfix stop</code> | ||
* <code># removepkg postfix</code> | * <code># removepkg postfix</code> | ||
| Line 28: | Line 28: | ||
<pre> | <pre> | ||
MAILADDR root | MAILADDR root | ||
MAILFROM "hostname <hostname@ | MAILFROM "hostname <hostname@example.org>" | ||
</pre> | </pre> | ||
[[Category: Linux]] | [[Category: Linux]] | ||
Revision as of 22:00, 6 August 2022
/etc/msmtprc
account default from hostname@example.org host smtp.yandex.ru port 465 auth on tls on tls_starttls off tls_trust_file /etc/ssl/certs/ca-certificates.crt user hostname@example.org password <password> aliases /etc/aliases
/etc/aliases
default: user@example.org
- Add to the end of
/etc/nail.rc:
set from="hostname <hostname@example.org>"
# /etc/rc.d/rc.postfix stop# removepkg postfix# rm -r /etc/postfix# rm /etc/rc.d/rc.postfix# ln -s /usr/bin/msmtp /usr/sbin/sendmail- If using
mdadm, add to /etc/mdadm.conf:
MAILADDR root MAILFROM "hostname <hostname@example.org>"