qmail-lmtp helper script: Mail bounces when mailman is not listening
The qmail-lmtp script will return hard errors (error code 100) on any error except for smtp soft fails. This also happens when mailman is not running or refuses connections. As it happens, for me, mailman3 occasional refuses connections on the lmtp service port although it is running. I don't know why, I am still debugging.
Anyway, mail should never bounce just because a service is not running. It is good practice to consider this a temporary failure.
I replaced the exit code in the last line of the script with 111 to only ever generate soft failures for the time being. I am not sure if that is a good solution for the long term, but at the moment, my users don't get confusing bounces anymore.