mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-21 15:17:01 +00:00
Implement HAProxy protocol support
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!
This commit is contained in:
12
test/t-18-haproxy/config/chasquid.conf
Normal file
12
test/t-18-haproxy/config/chasquid.conf
Normal file
@@ -0,0 +1,12 @@
|
||||
smtp_address: ":2025"
|
||||
submission_address: ":2587"
|
||||
submission_over_tls_address: ":2465"
|
||||
monitoring_address: ":2099"
|
||||
|
||||
mail_delivery_agent_bin: "test-mda"
|
||||
mail_delivery_agent_args: "%to%"
|
||||
|
||||
data_dir: "../.data"
|
||||
mail_log_path: "../.logs/mail_log"
|
||||
|
||||
haproxy_incoming: true
|
||||
Reference in New Issue
Block a user