#1121659 fetchmail: Multiple bounce messages from exim4 because fetchmail did not delete bad email from POP3 account

Package:
fetchmail
Source:
fetchmail
Description:
SSL enabled POP3, APOP, IMAP mail gatherer/forwarder
Submitter:
Kingsley G. Morse Jr.
Date:
2025-12-01 01:07:01 UTC
Severity:
normal
#1121659#5
Date:
2025-11-30 09:00:35 UTC
From:
To:
Hi Laszlo,

Thanks for maintaining fetchmail.

I run it many times every day.

The main reason I'm writing is to share how I
stopped repeated bounce messages from exim4 by
changing fetchmail's default configuration.

The immediate symptom was a company hosting a POP3
account complained that I was sending too many
emails.

exim4 kept sending bounce messages when fetchmail
tried to deliver an email with a line longer than
allowed by RFC 5322 2.1.1.

I think the reason why exim4 sent multiple bounce
messages was fetchmail

    left the offending email in the POP3 account
    and

    asked exim4 to deliver it again, each time
    fetchmail was run.

fetchmail has the option "set no softbounce".

But Debian's default configuration doesn't use it.

fetchmail's man page describes

    "set no softbounce"

as

    "Delete permanently undeliverable mail. It is
    recommended to use this option if the
    configuration has been thoroughly tested."

I

    added "set no softbounce" to fetchmail's
    configuration and

    restarted my fetchmail daemon.

I saw 2 spams with lines longer than allowed by
RFC 5322 2.1.1 since then.

It seems to me that both were handled better.

a.) They were properly deleted from my POP3 inbox
    after the first time exim4 rejected them and

b.) only one line in exim4's log file looks like a
    bounce.

In the interest of being complete and accurate, I
also upgraded my version of fetchmail from 6.5.6-1
to 6.6.1-1.

However, fecthmail's man page for "set no
softbounce" suggests to me that it's a more likely
explanation for the fix.

Feel free to let me know if you happen to have any
questions or concerns.

Kind regards,
Kingsley


*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

#1121659#10
Date:
2025-11-30 10:03:00 UTC
From:
To:
Am 30.11.25 um 10:00 schrieb Kingsley G. Morse Jr.:

Did you use daemon mode?

Can you provide the fetchmail log including the bounce before and after
your configuration change?

I would like to see if there's a bug lingering somewhere in the
"softbounce" logic. The main purpose is "don't delete mail", so if we
leave the message on the server for later reattempts, we shouldn't send
bounce mail.

#1121659#15
Date:
2025-12-01 00:17:59 UTC
From:
To:
Hi Matthias,

Thank you for responsibly asking reasonable
questions.

My humble comments follow yours, below....

Yes.

Unfortunately, no.

I agree bounce messages shouldn't be sent while
mail is kept on the server for later reattempts.

It seems to me that a complication is it's not
fetchmail sending bounce messages.

It's exim4.

My understanding is Debian's default configuration
is in the file named

    /etc/exim4/exim4.conf.template

under

    acl_check_data:

It says to "deny" mail with lines longer than 998
octets ( as required by RFC 5322 2.1.1 ).

For your convenience, I left a test email in .eml
format that

    has a long line

    wasn't deleted at my POP3 mail server and

    led to multiple bounce messages being sent

at

http://loaner.com/test_mail.eml


Maybe you could use it to

    replicate the bounces and

    look for a lingering bug somewhere in the "softbounce"
    logic.

Feel free to let me know if you happen to have any
questions or concerns.

Thanks,
Kingsley