Fetchmail repeats on block-filter PMG 8.1.4

Hi everyone,

I have two fetchmail configurations in my Proxmox cluster, and I’m encountering an issue with how blocked emails are handled.

Currently, the emails are delivered via SMTP, but if a filter action marks an email as "block," the email remains on the original server. During the next fetchmail iteration, the same email is processed again, creating an infinite loop. This results in repeatedly circling through the blocked emails and rechecking them against block lists. As a consequence, my block-list call limit is quickly exhausted.

The only workaround I’ve found is to whitelist all fetchmail entries, effectively accepting all emails. However, I don’t consider this a viable solution as it defeats the purpose of filtering.

Has anyone encountered this issue before? Are there any recommendations to prevent this looping behavior or to ensure blocked emails are properly handled (e.g., deleted after being flagged)?

Any advice is greatly appreciated!

P.S. this behavior is new after upgrading from major 7 to 8.

Thanks in advance!

Christian
 
could you please share the logs for such a mail - especially also the fetchmail logs?

EDIT: please also share the (anonymized) fetchmailrc
 
Last edited:
P.S. this behavior is new after upgrading from major 7 to 8.
I don't think anything that relates to this changed between PMG 7 and 8 ...

So I think it is because I use before-queue filtering. If a filter jumps in, it blocks fetchmail, which then does not delete the mail and tries again.
I think in queue filtering, this problem should not occur.
This could be - with before-queue filtering `pmg-smtp-filter` (which does rule-processing and spamanalysis etc.) responds with a 5xx permanent error-code, with after-queue filtering it simply responds with 250 and discards the message.

You could try to set the option:
`set no softbounce` globally (rather at the top) of the fetchmailrc - see `man fetchmailrc`.
to adapt the fetchmailrc template in PMG see:
https://pmg.proxmox.com/pmg-docs/pmg-admin-guide.html#pmgconfig_template_engine

Let us know if this works for you!
 
Last edited: