giova...@paclan.it writes:

> On 11/7/23 18:38, Cecil Westerhof wrote:
>> Matus UHLAR - fantomas <uh...@fantomas.sk> writes:
>> 
>>>>> On Tue, Nov 07, 2023 at 02:28:38AM +0100, Cecil Westerhof wrote:
>>>>>> https://spamassassin.apache.org/full/3.1.x/doc/spamc.html says:
>>>>>>     -L learn type
>>>>>>         Send message to spamd for learning. The learn type can be
>>>>>>         either spam, ham or forget. The exitcode for spamc will be set
>>>>>>         to 5 if the message was learned, or 6 if it was already
>>>>>>         learned.
>>>>>>
>>>>>>         Note that the spamd must run with the --allow-tell option for
>>>>>>         this to work.
>>>
>>>> "George A. Theall via users" <users@spamassassin.apache.org> writes:
>>>>> How are you running spamd?  With -l / --allow-tell?
>>>
>>> On 07.11.23 15:01, Cecil Westerhof wrote:
>>>>     --pidfile=/run/spamd.pid --username=imaps --allow-tell
>>>> --create-prefs --max-children 5 --helper-home-dir
>>>>
>>>> And the learning does work. But I have to use the generated text
>>>> instead of the exit codes.
>>>
>>> I'm afraid that for --allow-tell and --username=imaps you need all
>>> mailboxes to be writable under "imaps" user, e.g. virtual users or
>>> similar.
>> They are imaps -> imap over ssh.
>> But that is not the problem. Spamc does what it should be doing,
>> except that it gives back 0 instead of 5 or 6.
>> 
> It seems to be a documentation bug, see
> https://bz.apache.org/SpamAssassin/show_bug.cgi?id=6069 and
> https://bz.apache.org/SpamAssassin/show_bug.cgi?id=1201#c47

I understand, but do not agree. Long ago this was the case, but a lot
of programs give a non zero return code back without it being an
error. Even sa-update: here 1 means that there were no updates. I do
not see that as an error.
I hope I do not have to change my script in the near future because
sa-update is going to return zero when there are no updates.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Reply via email to