Wsgetmail issue - carriage return in FROM, SUBJECT, TO

We have replaced fetchmail to wsgetmail.
WSgetmail starts procmail to push the e-mails to rt-mailgate.
It worked great until the external script occasionaly executed by procmail returned an error.
After the analysis, it turned out that procmail showed signs β€œ^M” (carriage return) in the fields: FROM, TO, SUBJECT.

Wsgetmail adds ^M on the end of these fields each time.

Have you considered using the option stripcr in wsgetmail? From the docs:

stripcr

Set this to 1 to make wsgetmail convert the messages from the CRLF line-ending encoding to the LF line-ending encoding.

This emulates the fetchmail option of the same name, which enabled the stripcr option if an MDA was declared. The feature is similar, but you need to enable it explicitly in your configuration.

This option is helpful if you are forwarding email to a Linux utility that doesn’t work with CRLF line-endings.

1 Like

Could you share your relevant wsgetmail,json configuration to get it to work with procmail?

stripcr comes with the new wsgetmail version helped! :slight_smile: