mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-23 15:37:01 +00:00
This patch implements support for incoming connections wrapped in the HAProxy protocol v1. This is useful when running chasquid behind a HAProxy server, as it needs the original source IP to perform SPF checks. This patch is a reimplementation of one originally provided by Denys Vitali in pull request #15, except the logic for the protocol handling is moved to a new package, and the smtpsrv.Conn handling of the source IP is simplified. It is marked as experimental for now, since we want to give it a bit more exposure just in case the option/api needs adjustment. Thanks a lot to Denys Vitali (@denysvitali in github) for sending the original patch for this, and helping test it!
98 lines
3.5 KiB
Plaintext
98 lines
3.5 KiB
Plaintext
|
|
# Default hostname to use when saying hello.
|
|
# This is used to say hello to clients (for aesthetic purposes), and as the
|
|
# HELO/EHLO domain on outgoing SMTP connections (so ideally it would resolve
|
|
# back to the server, but it isn't a big deal if it doesn't).
|
|
# Default: the system's hostname.
|
|
#hostname: "mx.example.com"
|
|
|
|
# Maximum email size, in megabytes.
|
|
# Default: 50.
|
|
#max_data_size_mb: 50
|
|
|
|
# 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".
|
|
#smtp_address: "systemd"
|
|
#smtp_address: ":25"
|
|
|
|
# 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".
|
|
#submission_address: "systemd"
|
|
#submission_address: ":587"
|
|
|
|
# Address for the monitoring http server.
|
|
# Do NOT expose this to the public internet.
|
|
# Default: no monitoring http server.
|
|
#monitoring_address: "127.0.0.1:1099"
|
|
|
|
# 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: "maildrop".
|
|
#mail_delivery_agent_bin: "maildrop"
|
|
|
|
# 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).
|
|
#mail_delivery_agent_args: "-f"
|
|
#mail_delivery_agent_args: "%from%"
|
|
#mail_delivery_agent_args: "-d"
|
|
#mail_delivery_agent_args: "%to_user%"
|
|
|
|
# Directory where we store our persistent data.
|
|
# Default: "/var/lib/chasquid"
|
|
#data_dir: "/var/lib/chasquid"
|
|
|
|
# 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: "+".
|
|
#suffix_separators: "+"
|
|
|
|
# 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: ".".
|
|
#drop_characters: "."
|
|
|
|
# Path where to write the mail log to.
|
|
# If "<syslog>", log using the syslog (at MAIL|INFO priority).
|
|
# If "<stdout>", log to stdout; if "<stderr>", log to stderr.
|
|
# Default: <syslog>
|
|
#mail_log_path: "<syslog>"
|
|
|
|
# Enable dovecot authentication.
|
|
# If set to true, users not found in chasquid's user databases will be
|
|
# authenticated via dovecot.
|
|
# Default: false
|
|
#dovecot_auth: false
|
|
|
|
# Dovecot userdb and client socket paths.
|
|
# Most of the time this is not needed, as chasquid will auto-detect their
|
|
# location by searching standard paths.
|
|
# Default: "" (autodetect)
|
|
#dovecot_userdb_path: ""
|
|
#dovecot_client_path: ""
|
|
|
|
# Expect incoming SMTP connections to use the HAProxy protocol.
|
|
# EXPERIMENTAL - Might change in backwards-incompatible ways.
|
|
# If set to true, this allows deploying chasquid behind a HAProxy server, as
|
|
# the address information is preserved, and SPF checks can be performed
|
|
# properly.
|
|
# Default: false
|
|
#haproxy_incoming: false
|