System mail: Difference between revisions

From Notes to self
Jump to navigation Jump to search
No edit summary
No edit summary
Line 2: Line 2:
<pre>
<pre>
account default
account default
from <user>@yandex.ru
from <ya-user>@yandex.ru
set_from_header on
set_from_header on
host smtp.yandex.ru
host smtp.yandex.ru
Line 10: 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>
user <ya-user>
password <password>
password <password>



Revision as of 18:49, 9 December 2022

  • /etc/msmtprc
account default
from <ya-user>@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 <ya-user>
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 -F<hostname> "$@"