Mailing List Archive

Getting error 74
Since some time I see that when I want to update the spamassassin
filters I get error 74 for every email that I use to train the
filters. What could be happening here?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
On 01.11.23 12:50, Cecil Westerhof wrote:
>Since some time I see that when I want to update the spamassassin
>filters I get error 74 for every email that I use to train the
>filters. What could be happening here?

/usr/include/sysexits.h:#define EX_IOERR 74 /* input/output error */

looks like you have problem reading or writing.

If you want less generic answer, please provide info what command you
execute and what is the exact error.


--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Linux - It's now safe to turn on your computer.
Linux - Teraz mozete pocitac bez obav zapnut.
Re: Getting error 74 [ In reply to ]
On 2023-11-01 at 07:50:38 UTC-0400 (Wed, 01 Nov 2023 12:50:38 +0100)
Cecil Westerhof <Cecil@decebal.nl>
is rumored to have said:

> Since some time I see that when I want to update the spamassassin
> filters I get error 74 for every email that I use to train the
> filters. What could be happening here?

We really would need a lot more context to answer that.

In SOME contexts, '74' is defined as EX_IOERR. That would indicate a
problem with the underlying storage (OR network connection, in some
cases) used for your Bayes database.

What database are you using for Bayes?

What tool are you using to learn messages?

What platform are you running on? (OS, distro, perl version, etc.)

What version of SpamAssassin are you using?

I see that you asked about this same issue(?) on this mailing list in
October 2018 but I do not see any resolution from that time...


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


--
Bill Cole
bill@scconsult.com or billcole@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
Re: Getting error 74 [ In reply to ]
Bill Cole <sausers-20150205@billmail.scconsult.com> writes:

> On 2023-11-01 at 07:50:38 UTC-0400 (Wed, 01 Nov 2023 12:50:38 +0100)
> Cecil Westerhof <Cecil@decebal.nl>
> is rumored to have said:
>
>> Since some time I see that when I want to update the spamassassin
>> filters I get error 74 for every email that I use to train the
>> filters. What could be happening here?
>
> We really would need a lot more context to answer that.

Using scripts that hide things has his problems. :-(

The script was using:
sa-update

And when I run that from the command line I get:
gpg: WARNING: unsafe ownership on homedir '/etc/spamassassin/sa-update-keys'

Using --nogpg does not give this warning.
But I prefer not having an unsafe ownership.
Sadly after running with --nogpg I do not get the when I run it
without.

The directory itself has drwx------, what seems OK to me.
Or is it about /etc/spamassassin? This has drwxr-xr-x.


> In SOME contexts, '74' is defined as EX_IOERR. That would indicate a
> problem with the underlying storage (OR network connection, in some
> cases) used for your Bayes database.
>
> What database are you using for Bayes?

I do not know. How can I find this out?
Installed about ten years ago on the then current Debian with the
defaults.


> What tool are you using to learn messages?

I was confused. It was sa-update that went wrong.


> What platform are you running on? (OS, distro, perl version, etc.)

Debian 12.
sa-update version 4.0.0 / svn1900642
running on Perl version 5.36.0


> What version of SpamAssassin are you using?

4.0.0


> I see that you asked about this same issue(?) on this mailing list in
> October 2018 but I do not see any resolution from that time...

I did not remember that.
This time it was probably because of the update to Debian 12. But
there was not a new version in 2018.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
>> On 2023-11-01 at 07:50:38 UTC-0400 (Wed, 01 Nov 2023 12:50:38 +0100)
>> Cecil Westerhof <Cecil@decebal.nl>
>> is rumored to have said:

)On 01.11.23 16:02, Cecil Westerhof wrote:
>Using scripts that hide things has his problems. :-(
>
>The script was using:
> sa-update
>
>And when I run that from the command line I get:
> gpg: WARNING: unsafe ownership on homedir '/etc/spamassassin/sa-update-keys'

>> In SOME contexts, '74' is defined as EX_IOERR. That would indicate a
>> problem with the underlying storage (OR network connection, in some
>> cases) used for your Bayes database.
>>
>> What database are you using for Bayes?
>
>I do not know. How can I find this out?

sa-update does not use BAYES database.

>Installed about ten years ago on the then current Debian with the
>defaults.
>
>
>> What tool are you using to learn messages?
>
>I was confused. It was sa-update that went wrong.
>
>
>> What platform are you running on? (OS, distro, perl version, etc.)
>
>Debian 12.
>sa-update version 4.0.0 / svn1900642
> running on Perl version 5.36.0

Debian 12 contains SpamAssassion 4.0.0-6.

It also updates rules daily, if you set CRON=1 in /etc/default/spamassassin

did you install SpamAssassin from debian packages or using other way?


--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The only substitute for good manners is fast reflexes.
Re: Getting error 74 [ In reply to ]
Cecil Westerhof wrote on 2/11/23 4:02 am:
> And when I run that from the command line I get:
> gpg: WARNING: unsafe ownership on homedir '/etc/spamassassin/sa-update-keys'

That is referring to the owner of the directory
/etc/spamassassin/sa-update-keys not the permissions. ls -al
/etc/spamassassin/sa-update-keys will show you the owner and group of
the directory and its files in addition to showing the permissions.

gpg wants the file owner to be the same as the user gpg is running as.
If you see that the file owner is root, change it to the non-root user
that sa-update is actually running as.
Re: Getting error 74 [ In reply to ]
Sidney Markowitz <sidney@sidney.com> writes:

> Cecil Westerhof wrote on 2/11/23 4:02 am:
>> And when I run that from the command line I get:
>> gpg: WARNING: unsafe ownership on homedir '/etc/spamassassin/sa-update-keys'
>
> That is referring to the owner of the directory

Argh, you are right. To many hours work, not enough hours sleep. :'-{


> /etc/spamassassin/sa-update-keys not the permissions. ls -al
> /etc/spamassassin/sa-update-keys will show you the owner and group of
> the directory and its files in addition to showing the permissions.
>
> gpg wants the file owner to be the same as the user gpg is running as.
> If you see that the file owner is root, change it to the non-root user
> that sa-update is actually running as.

At the moment sa-update is running as root, while the owner is imaps.
Spamd is also running as root.
Probably best to change running those programs as imaps I suppose?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
Matus UHLAR - fantomas <uhlar@fantomas.sk> writes:

>>> What platform are you running on? (OS, distro, perl version, etc.)
>>
>>Debian 12.
>>sa-update version 4.0.0 / svn1900642
>> running on Perl version 5.36.0
>
> Debian 12 contains SpamAssassion 4.0.0-6.

Strange. When running 'apt update' I get:
All packages are up to date.

Maybe I need to ask a question on a Debian group.


> It also updates rules daily, if you set CRON=1 in /etc/default/spamassassin

I use my own bash script to update the rules.


> did you install SpamAssassin from debian packages or using other way?

I really do not know for sure. I thought default packages, but it is
to long ago.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
"Reindl Harald (privat)" <harry@rhsoft.net> writes:

>>> We really would need a lot more context to answer that.
>> Using scripts that hide things has his problems. :-(
>> The script was using:
>> sa-update
>> And when I run that from the command line I get:
>> gpg: WARNING: unsafe ownership on homedir '/etc/spamassassin/sa-update-keys'
>> The directory itself has drwx------, what seems OK to me.
>> Or is it about /etc/spamassassin? This has drwxr-xr-x.
>
> OWNERSHIP is *not* permissions

I was a bit confused when searching and responding. :'-{

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
>>>> What platform are you running on? (OS, distro, perl version, etc.)
>>>Debian 12.
>>>sa-update version 4.0.0 / svn1900642
>>> running on Perl version 5.36.0

>Matus UHLAR - fantomas <uhlar@fantomas.sk> writes:
>> Debian 12 contains SpamAssassion 4.0.0-6.

On 02.11.23 21:43, Cecil Westerhof wrote:
>Strange. When running 'apt update' I get:
> All packages are up to date.
>
>Maybe I need to ask a question on a Debian group.

"apt-cache policy spamassassin spamd" might tell you more.

>> It also updates rules daily, if you set CRON=1 in /etc/default/spamassassin
>
>I use my own bash script to update the rules.

This may have created the problem you have.
debian-installed SA updates run under user debian-spamd user.

>> did you install SpamAssassin from debian packages or using other way?
>
>I really do not know for sure. I thought default packages, but it is
>to long ago.

this is quite important because packages installed and maintained using
packaging system are easier to debug/fix
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
I just got lost in thought. It was unfamiliar territory.
Re: Getting error 74 [ In reply to ]
Cecil Westerhof <Cecil@decebal.nl> writes:

> Matus UHLAR - fantomas <uhlar@fantomas.sk> writes:
>
>>>> What platform are you running on? (OS, distro, perl version, etc.)
>>>
>>>Debian 12.
>>>sa-update version 4.0.0 / svn1900642
>>> running on Perl version 5.36.0
>>
>> Debian 12 contains SpamAssassion 4.0.0-6.
>
> Strange. When running 'apt update' I get:
> All packages are up to date.

It is installed:
spamd/stable,now 4.0.0-6 all [installed]

Sadly 'sa-update -V' only shows part of the information. But I have
the latest version. :-D

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
>>>>> What platform are you running on? (OS, distro, perl version, etc.)

>>>>Debian 12.
>>>>sa-update version 4.0.0 / svn1900642
>>>> running on Perl version 5.36.0

>> Matus UHLAR - fantomas <uhlar@fantomas.sk> writes:
>>> Debian 12 contains SpamAssassion 4.0.0-6.

>Cecil Westerhof <Cecil@decebal.nl> writes:
>> Strange. When running 'apt update' I get:
>> All packages are up to date.

On 05.11.23 13:54, Cecil Westerhof wrote:
>It is installed:
> spamd/stable,now 4.0.0-6 all [installed]
>
>Sadly 'sa-update -V' only shows part of the information. But I have
>the latest version. :-D

my sa-update procused the same output.

I guess your scripts and system scripts clash somehow.

My recommendation is to check permissions in /var/lib/spamassassin/ and
/var/lib/spamassassin/4.000000/ to see idf you didn't break something
and let system scripts to do the update.
--
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
2B|!2B, that's a question!
Re: Getting error 74 [ In reply to ]
Matus UHLAR - fantomas <uhlar@fantomas.sk> writes:

>>>>>> What platform are you running on? (OS, distro, perl version, etc.)
>
>>>>>Debian 12.
>>>>>sa-update version 4.0.0 / svn1900642
>>>>> running on Perl version 5.36.0
>
>>> Matus UHLAR - fantomas <uhlar@fantomas.sk> writes:
>>>> Debian 12 contains SpamAssassion 4.0.0-6.
>
>>Cecil Westerhof <Cecil@decebal.nl> writes:
>>> Strange. When running 'apt update' I get:
>>> All packages are up to date.
>
> On 05.11.23 13:54, Cecil Westerhof wrote:
>>It is installed:
>> spamd/stable,now 4.0.0-6 all [installed]
>>
>>Sadly 'sa-update -V' only shows part of the information. But I have
>>the latest version. :-D
>
> my sa-update procused the same output.
>
> I guess your scripts and system scripts clash somehow.
>
> My recommendation is to check permissions in /var/lib/spamassassin/ and
> /var/lib/spamassassin/4.000000/ to see idf you didn't break something
> and let system scripts to do the update.

The update is done by sa-update. I use only a script around it, but
the script calls sa-update.

From now on this script is not run as root anymore, but as
debian-spamd.

I also tried to do this with the service, but that gave a lot of
errors I have to investigate. So for the moment the service is still
run as root.

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof
Re: Getting error 74 [ In reply to ]
Cecil Westerhof <Cecil@decebal.nl> writes:

> The update is done by sa-update. I use only a script around it, but
> the script calls sa-update.
>
> From now on this script is not run as root anymore, but as
> debian-spamd.
>
> I also tried to do this with the service, but that gave a lot of
> errors I have to investigate. So for the moment the service is still
> run as root.

I found out what I had to do. I added to the command-line:
--username=debian-spamd

Now the child processes are run as user debian-spamd, but the main is
still run as root. Is that correct?
Because the man-page says:
Run as the named user.

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