Getmail and mailfilter

NethServer Version: 7.3.1611
Module: POP3_connector

Hello Nethserver Team

since February we are using nethserver as our production server and are quite happy with it.

I just discovered that I have a lot of error or warning messages in my root-mail account of the following type:

Warning: filter Filter_external spamc (allow_root_commands=“False”, arguments="(’-E’, ‘-s’, ‘250000’)", command=“spamc”, exitcodes_drop="(‘99’, ‘100’)", exitcodes_keep="(‘0’, ‘1’)", group=“amavis”, ignore_stderr=“False”, path="/usr/bin/spamc", unixfrom=“False”, user=“amavis”) returned fewer headers (46) than supplied (47)

I am using the POP3_connector to get emails from our provider into Nethserver. I have also the spam-check activated. Obviously there is a problem calling the external program spamc that checks messages for spam.
Is this just a warning message that can be ignored?

What irritates me, is that yesterday I think that we did not receive at least one email message. The sender informed me by telephone that he sent the email yesterday and I could verify that in the mail message log-file. there it looks like the message would have been delivered but we can’t find it in the inbox folder where it was supposed to be delivered (i also checked the spam folder).

Is it possible that if the spam check fails the message is not going to be delivered? Is there a way to recover it?

Thanks a lot in advance for your answer. If you need more information, please tell me.


I think yes.
From getmail manual (getmail configuration (version 5)):

ignore_stderr (boolean) — if set, getmail will not consider it an error if the filter writes to stderr. The default is false, which causes getmail to consider the delivery failed and leave the message on the server, proceeding to the next message. This prevents loss of mail if the filter writes to stderr but fails to exit nonzero when it encounters an error. Note that setting this option has serious implications; some poorly-written programs commonly used as mail filters can can mangle or drop mail but still exit 0, their only clue to failure being warnings emitted on stderr. Only change this setting if you are confident your filter always exits nonzero on error.

I don’t think getmail dropped the message, from the manual:

By default, if a filter writes anything to stderr, getmail will consider the delivery to have encountered an error. getmail will leave the message on the server and proceed to the next message. You must configure any filter you use not to emit messages to stderr except on errors — please see the documentation for your filter program for details. Optionally, if you know your filter can emit warnings on stderr under non-error conditions, you can set the ignore_stderr option.

In NS configuration ignore_stderr is not set.