1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2025-12-18 14:47:03 +00:00

Change the default MDA binary to "maildrop"

The current default is "procmail" for historical reasons, but the
program has been unmaintained for years and its use is not generally
advisable.

This patch changes the default MDA binary to "maildrop", which is a more
modern and reasonable MDA to use.

We keep the courier.Procmail name for now, as that's internal, but it
may be changed later.  Its documentation is updated to note that the
name is just for reference but it actually works with almost any binary.
This commit is contained in:
Alberto Bertogli
2017-03-08 00:19:45 +00:00
parent cb6500b993
commit 159aa97e8a
5 changed files with 31 additions and 27 deletions

View File

@@ -29,8 +29,8 @@
# This should point to the binary to use to deliver email to local users.
# The content of the email will be passed via stdin.
# If it exits unsuccessfully, we assume the mail was not delivered.
# Default: "procmail".
#mail_delivery_agent_bin: "procmail"
# Default: "maildrop".
#mail_delivery_agent_bin: "maildrop"
# Command line arguments for the mail delivery agent. One per argument.
# Some replacements will be done.

View File

@@ -52,7 +52,7 @@ func Load(path string) (*Config, error) {
}
if c.MailDeliveryAgentBin == "" {
c.MailDeliveryAgentBin = "procmail"
c.MailDeliveryAgentBin = "maildrop"
}
if len(c.MailDeliveryAgentArgs) == 0 {
c.MailDeliveryAgentArgs = append(c.MailDeliveryAgentArgs,

View File

@@ -52,7 +52,7 @@ type Config struct {
// This should point to the binary to use to deliver email to local users.
// The content of the email will be passed via stdin.
// If it exits unsuccessfully, we assume the mail was not delivered.
// Default: "procmail".
// Default: "maildrop".
MailDeliveryAgentBin string `protobuf:"bytes,6,opt,name=mail_delivery_agent_bin,json=mailDeliveryAgentBin" json:"mail_delivery_agent_bin,omitempty"`
// Command line arguments for the mail delivery agent. One per argument.
// Some replacements will be done.
@@ -100,25 +100,25 @@ func init() {
func init() { proto.RegisterFile("config.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 317 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x91, 0xdf, 0x4e, 0xc2, 0x30,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, 0xdf, 0xe9, 0xa4, 0x0a, 0x1f, 0xc1, 0xf2,
0x07, 0x26, 0xfe, 0x5b, 0x53, 0x3e, 0x0f, 0xa2, 0x45, 0xd5, 0x4e, 0xfe, 0xec, 0x4d, 0x30, 0xe4,
0x67, 0xac, 0x4d, 0x57, 0xc9, 0xc0, 0x8b, 0x36, 0xbd, 0xa0, 0x55, 0xcd, 0x33, 0xf0, 0xfc, 0x9a,
0xe1, 0xe7, 0xac, 0x56, 0xb0, 0x91, 0x41, 0x97, 0xca, 0x2b, 0x2c, 0x1a, 0x44, 0x87, 0x9c, 0xc1,
0x36, 0x58, 0xd4, 0x1c, 0x2f, 0x7c, 0x94, 0x79, 0x57, 0xca, 0xe5, 0x1a, 0xc9, 0x32, 0x6a, 0x54,
0x19, 0xa9, 0x87, 0x15, 0x9e, 0xd6, 0x94, 0x8f, 0x59, 0x9f, 0x9a, 0x16, 0x2e, 0x97, 0xa5, 0x8a,
0x6b, 0xd1, 0x25, 0xad, 0x5b, 0xc1, 0x27, 0x97, 0xbf, 0x20, 0x4a, 0x9b, 0xf4, 0x73, 0xef, 0xbe,
0x02, 0x00, 0x00, 0xff, 0xff, 0x04, 0x0f, 0xa4, 0xff, 0xec, 0x01, 0x00, 0x00,
// 320 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x6c, 0x91, 0xcd, 0x4e, 0x02, 0x31,
0x10, 0x80, 0x83, 0xab, 0xfc, 0x14, 0x50, 0x68, 0x34, 0x56, 0x4f, 0xc8, 0x05, 0x12, 0xa3, 0x17,
0x63, 0x3c, 0x23, 0x1c, 0x35, 0x31, 0xf0, 0x00, 0xcd, 0x2c, 0x5b, 0xba, 0x93, 0xd0, 0x76, 0xd3,
0x29, 0x06, 0x79, 0x4d, 0x5f, 0xc8, 0x6c, 0xd1, 0xc5, 0x44, 0x8f, 0xf3, 0x7d, 0xdf, 0x64, 0x27,
0x5b, 0x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x3c, 0x04, 0xe7, 0x49, 0xb4, 0x62,
0xd3, 0xdb, 0x8b, 0x45, 0xc5, 0xf9, 0x88, 0x9d, 0x65, 0xde, 0x15, 0x72, 0x99, 0x83, 0x87, 0x65,
0x50, 0x9e, 0x04, 0x8b, 0xe9, 0x69, 0x89, 0xa7, 0x15, 0xe5, 0x43, 0xd6, 0x8d, 0x97, 0xae, 0x9d,
0x96, 0x05, 0x84, 0x5c, 0xb4, 0x63, 0xd6, 0x2e, 0xe1, 0x8b, 0xd3, 0x6f, 0x10, 0xf2, 0xb4, 0x1e,
0x1f, 0xf7, 0xe1, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x04, 0x0f, 0xa4, 0xff, 0xec, 0x01, 0x00, 0x00,
}

View File

@@ -30,7 +30,7 @@ message Config {
// This should point to the binary to use to deliver email to local users.
// The content of the email will be passed via stdin.
// If it exits unsuccessfully, we assume the mail was not delivered.
// Default: "procmail".
// Default: "maildrop".
string mail_delivery_agent_bin = 6;
// Command line arguments for the mail delivery agent. One per argument.

View File

@@ -18,7 +18,11 @@ var (
errTimeout = fmt.Errorf("Operation timed out")
)
// Procmail delivers local mail via procmail.
// Procmail delivers local mail by executing a local binary, like procmail or
// maildrop. It is named after procmail just for reference, it works with any
// binary that:
// - Receives the email to deliver via stdin.
// - Exits with code EX_TEMPFAIL (75) for transient issues.
type Procmail struct {
Binary string // Path to the binary.
Args []string // Arguments to pass.