mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
Picking the domain used in the DSN message "From" header is more complicated than it needs to be, causing confusing code paths and having different uses for the hostname, which should be purely aesthetic. This patch makes the queue pick the DSN "From" domain from the message itself, by looking for a local domain in either the sender or the original recipients. We should find at least one, otherwise it'd be relaying. This allows the code to be simplified, and we can narrow the scope of the hostname option even further.
74 lines
2.6 KiB
Protocol Buffer
74 lines
2.6 KiB
Protocol Buffer
|
|
syntax = "proto3";
|
|
|
|
message Config {
|
|
// Default hostname to use when saying hello.
|
|
// This is used to say hello to clients, for aesthetic purposes.
|
|
// Default: the system's hostname.
|
|
string hostname = 1;
|
|
|
|
// Maximum email size, in megabytes.
|
|
// Default: 50.
|
|
int64 max_data_size_mb = 2;
|
|
|
|
// Addresses to listen on for SMTP (usually port 25).
|
|
// Default: "systemd", which means systemd passes sockets to us.
|
|
// systemd sockets must be named with "FileDescriptorName=smtp".
|
|
repeated string smtp_address = 3;
|
|
|
|
// Addresses to listen on for submission (usually port 587).
|
|
// Default: "systemd", which means systemd passes sockets to us.
|
|
// systemd sockets must be named with "FileDescriptorName=submission".
|
|
repeated string submission_address = 4;
|
|
|
|
// Address for the monitoring http server.
|
|
// Do NOT expose this to the public internet.
|
|
// Default: no monitoring http server.
|
|
string monitoring_address = 5;
|
|
|
|
// Mail delivery agent (MDA, also known as LDA) to use.
|
|
// 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".
|
|
string mail_delivery_agent_bin = 6;
|
|
|
|
// Command line arguments for the mail delivery agent. One per argument.
|
|
// Some replacements will be done.
|
|
// On an email sent from marsnik@mars to venera@venus:
|
|
// - %from% -> from address (marsnik@mars)
|
|
// - %from_user% -> from user (marsnik)
|
|
// - %from_domain% -> from domain (mars)
|
|
// - %to% -> to address (venera@venus)
|
|
// - %to_user% -> to user (venera)
|
|
// - %to_domain% -> to domain (venus)
|
|
//
|
|
// Default: "-f", "%from%", "-d", "%to_user%" (adequate for procmail
|
|
// and maildrop).
|
|
repeated string mail_delivery_agent_args = 7;
|
|
|
|
// Directory where we store our persistent data.
|
|
// Default: "/var/lib/chasquid"
|
|
string data_dir = 8;
|
|
|
|
// Suffix separator, to perform suffix removal of local users.
|
|
// For example, if you set this to "-+", email to local user
|
|
// "user-blah" and "user+blah" will be delivered to "user".
|
|
// Including "+" is strongly encouraged, as it is assumed for email
|
|
// forwarding.
|
|
// Default: "+".
|
|
string suffix_separators = 9;
|
|
|
|
// Characters to drop from the user part on local emails.
|
|
// For example, if you set this to "._", email to local user
|
|
// "u.se_r" will be delivered to "user".
|
|
// Default: ".".
|
|
string drop_characters = 10;
|
|
|
|
// Path where to write the mail log to.
|
|
// If "<syslog>", log using the syslog (at MAIL|INFO priority).
|
|
// Default: <syslog>
|
|
string mail_log_path = 11;
|
|
}
|
|
|