From: "Max R. Carrara" <m.carrara@proxmox.com>
To: "Stoiko Ivanov" <s.ivanov@proxmox.com>, <pmg-devel@lists.proxmox.com>
Subject: Re: [pmg-devel] [PATCH pmg-api/package-rebuilds v3] improve fetchmail handling in PMG
Date: Mon, 29 Sep 2025 15:26:36 +0200 [thread overview]
Message-ID: <DD5BHA6SQTL2.15IY53X813U5T@proxmox.com> (raw)
In-Reply-To: <20250926192941.89086-1-s.ivanov@proxmox.com>
On Fri Sep 26, 2025 at 9:27 PM CEST, Stoiko Ivanov wrote:
> supersedes: https://lore.proxmox.com/pmg-devel/DD2PXG51NFKF.2D5G45FY3K66F@proxmox.com/T/#t
>
> v2->v3:
> * incoroporated parts of Max' feedback - thanks for the effort and looking
> at the details!
> * The package-rebuild patches are needed for fetchmail (or rather our
> integration to work - so they fix a currently broken behavior)
> * For pmg-api I amended the comment in the templated and added a patch,
> that restarts fetchmail on relevant config-changes.
>
> Added Max' R-b/T-b tags only to patch 1 for pmg-api, and patch 2 for
> package-rebuilds as those remain unchanged (save for a typo in the
> commit message of package-rebuilds)
>
> [...]
Gave this series another spin on my two-node PMG test cluster.
The tl;dr is: Everything appears to work as advertised. Nice job!
package-rebuilds (Patches #1 and #2):
- Even though those two patches were applied already, I've also applied
them locally, then built and installed the `fetchmail` package
- On the non-master node, the `/etc/default/fetchmail` file
didn't exist yet; upon installing the package, it appeared again
- On the master node, the `/etc/default/fetchmail` file existed already
because I created it manually before; upon installing the package, it
wasn't changed and remained the same (as expected)
pmg-api (Patches #3-5):
- Patch #3 remains unchanged, but for completeness's sake, I also tested
it again
- `fetchmail` was able to connect to our mail server with my
credentials + SSL enabled; works as advertised
- The comment in patch #4 now looks nicer, thanks for incorporating that
little bit of feedback!
- Patch #5 also works as advertised
- Created a bunch of dummy accounts via the GUI
- `fetchmail.service` continued to work as expected, despite the
restarts
- I wasn't able to trip `fetchmail.service` up through the GUI, so I
think that users that create / write / delete a lot of fetchmail
accounts should also be fine here
To elaborate more on patch #5, since I didn't get fetchmail to trip up,
I think it's perfectly fine to simply restart the service like that.
However, for future reference, if frequent restarts become a problem for
some reason, we can add a call to `sleep` in the `fetchmail.service` unit.
In particular, this would have to be done in `ExecStart=`, as any other
options (that I've tested) cause `systemctl restart` to hang. The
startup delay could be added in a crude way like this:
ExecStart=/usr/bin/bash -c "/usr/bin/sleep 60 && /usr/bin/fetchmail --daemon 300 $OPTIONS --nodetach -f /etc/fetchmailrc --pidfile /run/fetchmail/fetchmail.pid"
During frequent restarts, systemd will terminate the `sleep 60`
(gracefully) if fetchmail itself wasn't yet running; then, the delay
starts again.
Note that I'm not sure if `$OPTIONS` is substituted correctly here; I
only tested the bare minimum there. The best solution—should it actually
be necessary in the future—would probably be to supply a wrapper script
that contains the call to sleep and also passes `$OPTIONS` along to
fetchmail.
Anyway, with all of that aside: LGTM!
Consider:
Tested-by: Max R. Carrara <m.carrara@proxmox.com>
Reviewed-by: Max R. Carrara <m.carrara@proxmox.com>
_______________________________________________
pmg-devel mailing list
pmg-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pmg-devel
next prev parent reply other threads:[~2025-09-29 13:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-26 19:27 Stoiko Ivanov
2025-09-26 19:27 ` [pmg-devel] [PATCH package-rebuilds v3 1/2] fetchmail: d/rules: do not skip dh_installinit Stoiko Ivanov
2025-09-29 12:37 ` [pmg-devel] applied: " Thomas Lamprecht
2025-09-26 19:27 ` [pmg-devel] [PATCH package-rebuilds v3 2/2] fetchmail: improve shipped service file Stoiko Ivanov
2025-09-29 12:37 ` [pmg-devel] applied: " Thomas Lamprecht
2025-09-26 19:27 ` [pmg-devel] [PATCH pmg-api v3 1/3] fix #6798: fetchmail: adapt to changed sslproto semantics Stoiko Ivanov
2025-09-29 12:53 ` [pmg-devel] applied: " Thomas Lamprecht
2025-09-26 19:27 ` [pmg-devel] [PATCH pmg-api v3 2/3] templates: fetchmail: add comment where users can add manual accounts Stoiko Ivanov
2025-09-29 12:53 ` [pmg-devel] applied: " Thomas Lamprecht
2025-09-26 19:27 ` [pmg-devel] [PATCH pmg-api v3 3/3] api: fetchmail: restart fetchmail on config changes Stoiko Ivanov
2025-09-29 12:53 ` [pmg-devel] applied: " Thomas Lamprecht
2025-09-29 13:26 ` Max R. Carrara [this message]
2025-09-29 13:28 ` [pmg-devel] [PATCH pmg-api/package-rebuilds v3] improve fetchmail handling in PMG Max R. Carrara
2025-09-29 13:31 ` Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DD5BHA6SQTL2.15IY53X813U5T@proxmox.com \
--to=m.carrara@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
--cc=s.ivanov@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox