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 [2023/04/02 10:49] – [Overview] stokitodocs:guide-user:services:email:smtp.client [2024/10/14 22:52] – typo fix bartprokop
Line 72: Line 72:
  
 ==== Installation ==== ==== Installation ====
-<code>opkg install msmtp</code>+<code>opkg install msmtp-mta</code> 
 +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. 
 ==== Sending mail ==== ==== Sending mail ====
 <code> <code>
  • Last modified: 2024/12/14 23:20
  • by stokito