mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
Make the max queue size and give up time configurable
Today, the maximum number of items in the queue, as well as how long we keep attempting to send each item, is hard-coded and not changed by end users. While they are totally adequate for chasquid's main use cases, it can still be useful for some users to change them. So this patch adds two new configuration options for those settings. They're marked experimental for now, so we can adjust them if needed after they get more exposure. Thanks to Lewis Ross-Jones <lewis_r_j@hotmail.com> for suggesting this improvement, and help with testing it.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43)
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -15,29 +16,12 @@
|
||||
.ft R
|
||||
.fi
|
||||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
. ds PI pi
|
||||
. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
|
||||
. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
|
||||
. ds L" ""
|
||||
. ds R" ""
|
||||
. ds C` ""
|
||||
. ds C' ""
|
||||
'br\}
|
||||
.el\{\
|
||||
. ds -- \|\(em\|
|
||||
. ds PI \(*p
|
||||
. ds L" ``
|
||||
. ds R" ''
|
||||
. ds C`
|
||||
. ds C'
|
||||
'br\}
|
||||
@@ -68,82 +52,20 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
. \" fudge factors for nroff and troff
|
||||
.if n \{\
|
||||
. ds #H 0
|
||||
. ds #V .8m
|
||||
. ds #F .3m
|
||||
. ds #[ \f1
|
||||
. ds #] \fP
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
|
||||
. ds #V .6m
|
||||
. ds #F 0
|
||||
. ds #[ \&
|
||||
. ds #] \&
|
||||
.\}
|
||||
. \" simple accents for nroff and troff
|
||||
.if n \{\
|
||||
. ds ' \&
|
||||
. ds ` \&
|
||||
. ds ^ \&
|
||||
. ds , \&
|
||||
. ds ~ ~
|
||||
. ds /
|
||||
.\}
|
||||
.if t \{\
|
||||
. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
|
||||
. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
|
||||
. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
|
||||
. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
|
||||
. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
|
||||
. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
|
||||
.\}
|
||||
. \" troff and (daisy-wheel) nroff accents
|
||||
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
|
||||
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
|
||||
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
|
||||
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
|
||||
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
|
||||
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
|
||||
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
|
||||
.ds ae a\h'-(\w'a'u*4/10)'e
|
||||
.ds Ae A\h'-(\w'A'u*4/10)'E
|
||||
. \" corrections for vroff
|
||||
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
|
||||
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
|
||||
. \" for low resolution devices (crt and lpr)
|
||||
.if \n(.H>23 .if \n(.V>19 \
|
||||
\{\
|
||||
. ds : e
|
||||
. ds 8 ss
|
||||
. ds o a
|
||||
. ds d- d\h'-1'\(ga
|
||||
. ds D- D\h'-1'\(hy
|
||||
. ds th \o'bp'
|
||||
. ds Th \o'LP'
|
||||
. ds ae ae
|
||||
. ds Ae AE
|
||||
.\}
|
||||
.rm #[ #] #H #V #F C
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "chasquid.conf 5"
|
||||
.TH chasquid.conf 5 "2020-11-12" "" ""
|
||||
.TH chasquid.conf 5 2025-06-07 "" ""
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
.nh
|
||||
.SH "NAME"
|
||||
.SH NAME
|
||||
chasquid.conf(5) \-\- chasquid configuration file
|
||||
.SH "SYNOPSIS"
|
||||
.SH SYNOPSIS
|
||||
.IX Header "SYNOPSIS"
|
||||
\&\fBchasquid.conf\fR\|(5) is \fBchasquid\fR\|(1)'s main configuration file.
|
||||
.SH "DESCRIPTION"
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
The file is in protocol buffers' text format.
|
||||
.PP
|
||||
@@ -152,12 +74,12 @@ Comments start with \f(CW\*(C`#\*(C'\fR. Empty lines are allowed. Values are of
|
||||
\&\f(CW\*(C`false\*(C'\fR).
|
||||
.PP
|
||||
Some values might be repeated, for example the listening addresses.
|
||||
.SH "OPTIONS"
|
||||
.SH OPTIONS
|
||||
.IX Header "OPTIONS"
|
||||
.IP "\fBhostname\fR (string):" 8
|
||||
.IX Item "hostname (string):"
|
||||
Default hostname to use when saying hello. This is used to say hello to
|
||||
clients (for aesthetic purposes), and as the \s-1HELO/EHLO\s0 domain on outgoing \s-1SMTP\s0
|
||||
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.
|
||||
.IP "\fBmax_data_size_mb\fR (int):" 8
|
||||
@@ -165,26 +87,26 @@ big deal if it doesn't). Default: the system's hostname.
|
||||
Maximum email size, in megabytes. Default: 50.
|
||||
.IP "\fBsmtp_address\fR (repeated string):" 8
|
||||
.IX Item "smtp_address (repeated string):"
|
||||
Addresses to listen on for \s-1SMTP\s0 (usually port 25). Default: \*(L"systemd\*(R", which
|
||||
Addresses to listen on for SMTP (usually port 25). Default: "systemd", which
|
||||
means systemd passes sockets to us. systemd sockets must be named with
|
||||
\&\fBFileDescriptorName=smtp\fR.
|
||||
.IP "\fBsubmission_address\fR (repeated string):" 8
|
||||
.IX Item "submission_address (repeated string):"
|
||||
Addresses to listen on for submission (usually port 587). Default: \*(L"systemd\*(R",
|
||||
Addresses to listen on for submission (usually port 587). Default: "systemd",
|
||||
which means systemd passes sockets to us. systemd sockets must be named with
|
||||
\&\fBFileDescriptorName=submission\fR.
|
||||
.IP "\fBsubmission_over_tls_address\fR (repeated string):" 8
|
||||
.IX Item "submission_over_tls_address (repeated string):"
|
||||
Addresses to listen on for submission-over-TLS (usually port 465). Default:
|
||||
\&\*(L"systemd\*(R", which means systemd passes sockets to us. systemd sockets must be
|
||||
"systemd", which means systemd passes sockets to us. systemd sockets must be
|
||||
named with \fBFileDescriptorName=submission_tls\fR.
|
||||
.IP "\fBmonitoring_address\fR (string):" 8
|
||||
.IX Item "monitoring_address (string):"
|
||||
Address for the monitoring \s-1HTTP\s0 server. Do \s-1NOT\s0 expose this to the public
|
||||
Address for the monitoring HTTP server. Do NOT expose this to the public
|
||||
internet. Default: no monitoring server.
|
||||
.IP "\fBmail_delivery_agent_bin\fR (string):" 8
|
||||
.IX Item "mail_delivery_agent_bin (string):"
|
||||
Mail delivery agent (\s-1MDA,\s0 also known as \s-1LDA\s0) to use. This should point
|
||||
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: \fImaildrop\fR.
|
||||
@@ -236,12 +158,30 @@ overridden using the \f(CW\*(C`dovecot_userdb_path\*(C'\fR and \f(CW\*(C`dovecot
|
||||
needed.
|
||||
.IP "\fBhaproxy_incoming\fR (bool):" 8
|
||||
.IX Item "haproxy_incoming (bool):"
|
||||
\&\fB\s-1EXPERIMENTAL\s0\fR, might change in backwards-incompatible ways.
|
||||
\&\fBEXPERIMENTAL\fR, might change in backwards-incompatible ways.
|
||||
.Sp
|
||||
If true, expect incoming \s-1SMTP\s0 connections to use the HAProxy protocol.
|
||||
If true, expect incoming SMTP connections to use the HAProxy protocol.
|
||||
This allows deploying chasquid behind a HAProxy server, as the address
|
||||
information is preserved, and \s-1SPF\s0 checks can be performed properly.
|
||||
information is preserved, and SPF checks can be performed properly.
|
||||
Default: \f(CW\*(C`false\*(C'\fR.
|
||||
.IP "\fBmax_queue_items\fR (int):" 8
|
||||
.IX Item "max_queue_items (int):"
|
||||
\&\fBEXPERIMENTAL\fR, might change in backwards-incompatible ways.
|
||||
.Sp
|
||||
Maximum number of items in the queue.
|
||||
.Sp
|
||||
If we have this many items in the queue, we reject new incoming email. Be
|
||||
careful when increasing this, as we keep all items in memory.
|
||||
Default: \f(CW200\fR (but may change in the future).
|
||||
.IP "\fBgive_up_send_after\fR (string):" 8
|
||||
.IX Item "give_up_send_after (string):"
|
||||
\&\fBEXPERIMENTAL\fR, might change in backwards-incompatible ways.
|
||||
.Sp
|
||||
How long do we keep retrying sending an email before we give up. Once we give
|
||||
up, a DSN will be sent back to the sender.
|
||||
.Sp
|
||||
The format is a Go duration string (e.g. "48h" or "360m"; note days are not a
|
||||
supported unit). Default: \f(CW"20h"\fR (but may change in the future).
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBchasquid\fR\|(1)
|
||||
|
||||
@@ -118,6 +118,26 @@ Some values might be repeated, for example the listening addresses.
|
||||
information is preserved, and SPF checks can be performed properly.
|
||||
Default: `false`.
|
||||
|
||||
- **max\_queue\_items** (int):
|
||||
|
||||
**EXPERIMENTAL**, might change in backwards-incompatible ways.
|
||||
|
||||
Maximum number of items in the queue.
|
||||
|
||||
If we have this many items in the queue, we reject new incoming email. Be
|
||||
careful when increasing this, as we keep all items in memory.
|
||||
Default: `200` (but may change in the future).
|
||||
|
||||
- **give\_up\_send\_after** (string):
|
||||
|
||||
**EXPERIMENTAL**, might change in backwards-incompatible ways.
|
||||
|
||||
How long do we keep retrying sending an email before we give up. Once we give
|
||||
up, a DSN will be sent back to the sender.
|
||||
|
||||
The format is a Go duration string (e.g. "48h" or "360m"; note days are not a
|
||||
supported unit). Default: `"20h"` (but may change in the future).
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
[chasquid(1)](chasquid.1.md)
|
||||
|
||||
@@ -122,6 +122,26 @@ This allows deploying chasquid behind a HAProxy server, as the address
|
||||
information is preserved, and SPF checks can be performed properly.
|
||||
Default: C<false>.
|
||||
|
||||
=item B<max_queue_items> (int):
|
||||
|
||||
B<EXPERIMENTAL>, might change in backwards-incompatible ways.
|
||||
|
||||
Maximum number of items in the queue.
|
||||
|
||||
If we have this many items in the queue, we reject new incoming email. Be
|
||||
careful when increasing this, as we keep all items in memory.
|
||||
Default: C<200> (but may change in the future).
|
||||
|
||||
=item B<give_up_send_after> (string):
|
||||
|
||||
B<EXPERIMENTAL>, might change in backwards-incompatible ways.
|
||||
|
||||
How long do we keep retrying sending an email before we give up. Once we give
|
||||
up, a DSN will be sent back to the sender.
|
||||
|
||||
The format is a Go duration string (e.g. "48h" or "360m"; note days are not a
|
||||
supported unit). Default: C<"20h"> (but may change in the future).
|
||||
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
Reference in New Issue
Block a user