Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:services:email:smtp.client [2024/10/14 17:38] – [Installation] bartprokopdocs:guide-user:services:email:smtp.client [2024/10/14 22:52] – typo fix bartprokop
Line 73: Line 73:
 ==== Installation ==== ==== Installation ====
 <code>opkg install msmtp-mta</code> <code>opkg install msmtp-mta</code>
-Installing `msmtp-mtapackage will also create necessary `sendmail` symlinks. If you do not need `sendmailcommand (unlikely) then install only `msmtppackage.+Installing ''%%msmtp-mta%%'' package will also create necessary ''%%sendmail%%'' symlink. If you do not need ''%%sendmail%%'' command (unlikely) then install only ''%%msmtp%%'' package. 
 ==== Configuration ==== ==== Configuration ====
 +For router configuration, you very likely do not want to receive emails to local mailboxes. Define aliases file ''%%/etc/aliases.msmtp%%'' to send all local mails to your admin email:
 +
 +<code>
 +default: admin@example.com
 +</code>
 +
 Place your configuration in ''%%/etc/msmtprc%%''. There is an existing ''%%default%%''-block in the included config file so if you want to call ''%%msmtp%%'' without specifying an account, then you need to rename the existing ''%%default%%''-block to something else. Place your configuration in ''%%/etc/msmtprc%%''. There is an existing ''%%default%%''-block in the included config file so if you want to call ''%%msmtp%%'' without specifying an account, then you need to rename the existing ''%%default%%''-block to something else.
  
Line 88: Line 95:
  
 defaults defaults
 +aliases /etc/aliases.msmtp
 +
 account default account default
  
Line 103: Line 112:
 </code> </code>
  
-Now symlink ''%%msmtp%%'' to ''%%sendmail%%'' with ''%%ln -s /usr/bin/msmtp /usr/sbin/sendmail%%''. +Now symlink ''%%msmtp%%'' to ''%%sendmail%%'' with ''%%ln -s /usr/bin/msmtp /usr/sbin/sendmail%%'' - this is not necessary if ''%%msmtp-mta%%'' was installed instead of ''%%msmtp%%''.
  
 Also you may configure env variables ''EMAIL'' for From address and ''SMTPSERVER'' to specify smarthost. Also you may configure env variables ''EMAIL'' for From address and ''SMTPSERVER'' to specify smarthost.
  • Last modified: 2024/12/14 23:20
  • by stokito