už delší dobu si uvědomuji, že mi vlastně nechodí notifikace. Mám nastaveno standradní nastavení přes Turris smtp server. Všiml jsem si, že už se to tady nárazově řešilo, ale bez nějakého konkrétního výsledku a vlastní přeposílač nemám.
Platí ještě stará logika?
/usr/sbin/sendmail → ../bin/msmtp
The Turris Omnia uses msmtp as its mail sending agent, configured via /etc/msmtprc
Zpráva se mi sice do /tmp uloží, ale /usr/sbin/sendmail jsem nenašel a msmtprc má poslední úpravu z roku 2023 :
# Example for a system wide configuration file
# A system wide configuration file is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
account default
# The SMTP smarthost
host mail.oursite.example
# Use TLS on port 465. On this port, TLS starts without STARTTLS.
port 465
tls on
tls_starttls off
# Construct envelope-from addresses of the form "user@oursite.example"
from %U@oursite.example
# Do not allow programs to override this envelope-from address via -f
allow_from_override off
# Always set a From header that matches the envelope-from address
set_from_header on
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
syslog LOG_MAIL
Očekával bych smtp.turris.cz a auth parametry?, čemuž i odpovídá test:
# msmtp -S
msmtp: cannot locate host mail.oursite.example: Name does not resolve
Pokud pouze upravím from, tak to nestačí, nicméně předpokládám, že nastavení by se mělo měnit na základě úpravy v reForis.
# msmtp -S
msmtp: cannot connect to smtp.turris.cz, port 465: Connection refused
Ano, to mám shodně. Zde bych řekl, že je soubor aktuální, reaguje mi na změny zadané v reforisu. Podle mě je chyba na straně anstavení samotného msmtp.
Konfigurace /etc/msmtprc se ale na několika místech liší, především řádek
je zapoznámkován, a dále některé údaje jsou jinak…
/etc/msmtprc
# Example for a system wide configuration file
# for details see forum:
# Guide for setting custom email notifications through turris.cz
# https://forum.turris.cz/t/guide-for-setting-custom-email-notifications-through-turris-cz/2318
# A system wide configuration file is optional.
# If it exists, it usually defines a default account.
# This allows msmtp to be used like /usr/sbin/sendmail.
account default
# The SMTP smarthost
#host mail.oursite.example
# account notifier
from turris@notify.turris.cz
host smtp.turris.cz
# host smtp.seznam.cz
# Use TLS on port 465
port 465
tls on
tls_certcheck off
tls_starttls off
auth on
# user is router serial number, found by command `atsha204cmd serial-number`
# password is generated by passwordeval command
user `my_router_serial`
passwordeval "echo 'efefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef' | atsha204cmd challenge-response | awk '{print tolower($0)}'"
timeout 5
# account default : notifier
# account notifier : default
syslog LOG_MAIL
aliases /etc/aliases
# Construct envelope-from addresses of the form "user@oursite.example"
#from %U@oursite.example
# Syslog logging with facility LOG_MAIL instead of the default LOG_USER
#syslog LOG_MAIL
Ano, ten host jsem už měnil, zkusil jsem okopčit i ten zbytek, ale i tak dostanu, opět:
msmtp: cannot connect to smtp.turris.cz, port 465: Connection refused
Nicméně to může způsobeno špatnou autentifikací. Stejně potřebuji, aby se inicializovala tato změna, což se neprovádí, vidno si služba pro změnu souboru vůbec nešáhne.
Dle starých údajů z původní wiki jsem passwordeval nenašel. Nicméně jsme se zkusil řídit následujícím,
Ale jsem stále na stejném. Každopádně stále si myslím, že celou změnu by mělo spustit změna/uložení v reforis nastavení v notifikaci. Zkusil jsem přeinstalovat msmtp balík, dostal jsem tím opět defaul konfiguraci viz výše. A k tomu mi nějak turrisák vykysl a po rebootu jsem nenačetl web. Přes pkgupdate jsem musel doinstalovat chybějící. Takže aby nebyla nuda