User Tools

Site Tools


how_to:configure_srs

Differences

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

Link to this comparison view

Next revision
Previous revision
how_to:configure_srs [2025/08/18 16:18] – created paulhow_to:configure_srs [2025/08/18 16:28] (current) paul
Line 4: Line 4:
  
 This involves adding a couple of functions to rewrite outgoing return paths in 'relayout.lua' or 'mxout.lua' as appropriate and a couple of functions to redirect rewritten bounce message recipients in 'smtpsvr.lua' This involves adding a couple of functions to rewrite outgoing return paths in 'relayout.lua' or 'mxout.lua' as appropriate and a couple of functions to redirect rewritten bounce message recipients in 'smtpsvr.lua'
 +
 +In earlier versions of VPOP3 (or if you don't want the bounce-redirection function of SRS), you can use basic Sender Rewriting using the 'Return path Settings' tab of the Mail Sender in the VPOP3 settings. Set 'SMTP Return Path:' to 'If the original address is not local, set to', and enter a local email address which won't have forwarding or autoresponders set - eg postmaster@yourdomain.com
  
 The below is a basic implementation based on https://www.libsrs2.net/srs/srs.pdf The below is a basic implementation based on https://www.libsrs2.net/srs/srs.pdf
Line 12: Line 14:
 Edit 'mydomain' to be your domain, and 'mykey' to be a secret code for security hashing Edit 'mydomain' to be your domain, and 'mykey' to be a secret code for security hashing
  
-<code>mydomain = "pscs.co.uk";+<file lua [enable_line_numbers="true"] relayout.lua>mydomain = "example.com";
 mykey = "bobble"; mykey = "bobble";
  
Line 36: Line 38:
 function Mod32(x) function Mod32(x)
     return string.sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", x + 1, x + 1);     return string.sub("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", x + 1, x + 1);
-end</code>+end</file>
  
 ====smtpsvr.lua==== ====smtpsvr.lua====
 Edit 'mydomain' to be your domain, and 'mykey' to be a secret code for security hashing. These should be the same values as in the other script Edit 'mydomain' to be your domain, and 'mykey' to be a secret code for security hashing. These should be the same values as in the other script
  
-<code>+<file Lua [enable_line_numbers="true"] smtpsvr.lua> 
 +mydomain = "example.com"; 
 +mykey = "bobble"; 
 function MapRecipient(rcpt, rcptlist, mailfrom) function MapRecipient(rcpt, rcptlist, mailfrom)
     if mailfrom == "" then     if mailfrom == "" then
Line 77: Line 82:
     return string.find("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", x) - 1;     return string.find("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567", x) - 1;
 end end
-</code>+</file>
how_to/configure_srs.1755530328.txt.gz · Last modified: 2025/08/18 16:18 by paul