1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-07 17:47:14 +00:00

courier: Tidy up the Procmail courier

This patch tidies up the Procmail courier:
 - Move the configuration options to the courier instance, instead of using
   global variables.
 - Implement more useful string replacement options.
 - Use exec.CommandContext for running the command with a timeout.

As a consequence of the first item, the queue now takes the couriers via its
constructor.
This commit is contained in:
Alberto Bertogli
2016-09-23 00:45:21 +01:00
parent d05b8ef189
commit 667358d72e
11 changed files with 69 additions and 69 deletions

View File

@@ -55,7 +55,7 @@ func Load(path string) (*Config, error) {
}
if len(c.MailDeliveryAgentArgs) == 0 {
c.MailDeliveryAgentArgs = append(c.MailDeliveryAgentArgs,
"-d", "%user%")
"-f", "%from%", "-d", "%to_user%")
}
if c.DataDir == "" {