public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pmg-devel] [PATCH pmg-api/docs] make filter timeout configurable
@ 2023-09-11 14:23 Stoiko Ivanov
  2023-09-11 14:23 ` [pmg-devel] [PATCH pmg-api 1/4] templates: postfix: set same timeouts for before and after-queue Stoiko Ivanov
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Stoiko Ivanov @ 2023-09-11 14:23 UTC (permalink / raw)
  To: pmg-devel

This series improves mail-handling in case pmg-smtp-filter takes too long in
processing a mail.
Currently the timeout is based on postfix defaults which differ between
after-queue filtering (600s) and before-queue filtering (120s) (patch 1/4
unifies the timeout, and is meant as a stop-gap measure).

In both cases - once the timeout is reached the behavior is inconvenient
(to put it mildly):
* postfix detects the timeout and reports a temporary 4xx code to the
  sender, while pmg-smtp-filter sends the mail further after processing
  anyways
This results in such mails getting delivered multiple times to the
recipient (and you need the administrator of the server sending to PMG to
remove it from their queue, for the deliveries to stop).

Tested by adding a `sleep 200;` in PMG::Utils::analyze_virus_clam.

The docs patch is necessary for patch 3/5 (new config-options need to be
known in the doc-generator)

pmg-api:
Stoiko Ivanov (4):
  templates: postfix: set same timeouts for before and after-queue
  pmg-smtp-filter: refactor use of gettimeofday
  config: postfix: make smtp-filter-timeout configurable
  pmg-smtp-filter: die if processing took longer than the timeout

 src/PMG/Config.pm        |  6 ++++++
 src/bin/pmg-smtp-filter  | 22 +++++++++++++---------
 src/templates/main.cf.in |  5 ++++-
 3 files changed, 23 insertions(+), 10 deletions(-)

pmg-docs:
Stoiko Ivanov (1):
  doc-generator: add new option filter_timeout

 gen-pmg.conf.5-opts.pl | 1 +
 1 file changed, 1 insertion(+)

-- 
2.39.2





^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-12 20:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-11 14:23 [pmg-devel] [PATCH pmg-api/docs] make filter timeout configurable Stoiko Ivanov
2023-09-11 14:23 ` [pmg-devel] [PATCH pmg-api 1/4] templates: postfix: set same timeouts for before and after-queue Stoiko Ivanov
2023-09-11 14:23 ` [pmg-devel] [PATCH pmg-api 2/4] pmg-smtp-filter: refactor use of gettimeofday Stoiko Ivanov
2023-09-11 14:23 ` [pmg-devel] [PATCH pmg-api 3/4] config: postfix: make smtp-filter-timeout configurable Stoiko Ivanov
2024-01-12  9:15   ` Thomas Lamprecht
2023-09-11 14:23 ` [pmg-devel] [PATCH pmg-api 4/4] pmg-smtp-filter: die if processing took longer than the timeout Stoiko Ivanov
2024-01-12  9:19   ` Thomas Lamprecht
2023-09-11 14:23 ` [pmg-devel] [PATCH pmg-docs 1/1] doc-generator: add new option filter_timeout Stoiko Ivanov
2024-01-12  8:35 ` [pmg-devel] [PATCH pmg-api/docs] make filter timeout configurable Dominik Csapak
2024-01-12 19:59   ` Stoiko Ivanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal