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:emailrelay [2022/07/05 13:15] – [Useful options] stokitodocs:guide-user:services:email:emailrelay [2023/01/28 18:36] stokito
Line 35: Line 35:
 | ''client_tls'' | integer | no | //0// | For //proxy// mode. See //--client-tls// | | ''client_tls'' | integer | no | //0// | For //proxy// mode. See //--client-tls// |
 | ''client_auth'' | string | no | //(none)// | For //proxy// mode. See //--client-auth// and /etc/emailrelay.auth | | ''client_auth'' | string | no | //(none)// | For //proxy// mode. See //--client-auth// and /etc/emailrelay.auth |
 +| ''extra_cmdline'' | string | no | //(none)// | Extra command line options. See http://emailrelay.sourceforge.net/#reference_md_Reference for command line reference |
  
 ==== Server ==== ==== Server ====
Line 69: Line 69:
         option mode 'cmdline'         option mode 'cmdline'
         # specify all arguments that should be passed to emailrelay here         # specify all arguments that should be passed to emailrelay here
-        # see https://emailrelay.sourceforge.net/reference.html for command line reference+        # see http://emailrelay.sourceforge.net/#reference_md_Reference for command line reference
         option extra_cmdline '--some-other --cmdline-options'         option extra_cmdline '--some-other --cmdline-options'
 </code> </code>
Line 76: Line 76:
 ==== Configure TLS ==== ==== Configure TLS ====
  
-[[:docs:guide-user:services:tls:certs|Obrain a TLS cert]]+[[:docs:guide-user:services:tls:certs|Obtain a TLS cert]]
 Then configure ''server_tls'' option and put private key and then after a comma a fullchain. Then configure ''server_tls'' option and put private key and then after a comma a fullchain.
 ==== Mails storage location ==== ==== Mails storage location ====
Line 94: Line 94:
 Add to ''/etc/config/firewall'': Add to ''/etc/config/firewall'':
 <code> <code>
-config rule                                      +config rule 
-        option name 'Allow-SMTP'                 +        option name 'Allow-WAN-SMTP' 
-        option target 'ACCEPT'                   +        option target 'ACCEPT' 
-        option src 'wan'                         +        option src 'wan' 
-        option proto 'tcp'                       +        option proto 'tcp' 
-        option dest_port '25'                    +        option dest_port '25' 
-        option enabled '1                      +config rule 
-                                                 +        option name 'Allow-WAN-SMTP-Submission
-config rule                                      +        option target 'ACCEPT' 
-        option name 'Allow-POP'                  +        option src 'wan' 
-        option target 'ACCEPT'                   +        option proto 'tcp' 
-        option src 'wan'                         +        option dest_port '587'   
-        option proto 'tcp'                       +config rule 
-        option dest_port '110'                   +        option name 'Allow-WAN-POP' 
-        option enabled '1'  +        option target 'ACCEPT' 
 +        option src 'wan' 
 +        option proto 'tcp' 
 +        option dest_port '110'
 </code> </code>
  
 +You can add these rules with command line:
 +
 +<code>
 +uci add firewall rule
 +uci set firewall.wan_https_turris_rule=rule
 +uci set firewall.wan_https_turris_rule.name='Allow-WAN-SMTP'
 +uci set firewall.wan_https_turris_rule.src='wan'
 +uci set firewall.wan_https_turris_rule.proto='tcp'
 +uci set firewall.wan_https_turris_rule.dest_port='25'
 +uci set firewall.wan_https_turris_rule.target='ACCEPT'
 +
 +uci add firewall rule
 +uci set firewall.wan_https_turris_rule=rule
 +uci set firewall.wan_https_turris_rule.name='Allow-WAN-SMTP-Submission'
 +uci set firewall.wan_https_turris_rule.src='wan'
 +uci set firewall.wan_https_turris_rule.proto='tcp'
 +uci set firewall.wan_https_turris_rule.dest_port='587'
 +uci set firewall.wan_https_turris_rule.target='ACCEPT'
 +
 +
 +uci add firewall rule
 +uci set firewall.wan_https_turris_rule=rule
 +uci set firewall.wan_https_turris_rule.name='Allow-WAN-POP'
 +uci set firewall.wan_https_turris_rule.src='wan'
 +uci set firewall.wan_https_turris_rule.proto='tcp'
 +uci set firewall.wan_https_turris_rule.dest_port='110'
 +uci set firewall.wan_https_turris_rule.target='ACCEPT'
 +
 +uci commit firewall
 +service firewall restart
 +</code>
  • Last modified: 2023/01/29 19:40
  • by stokito