Page 1 of 1
Missing UpdateChannels.txt
Posted: 2020-11-14 02:16
by palinka
I had a server crash recently and reinstalled spamassassin and for some reason its missing UpdateChannels.txt. I can't update without it. I looked over the interwebs for a copy but came up short (my google fu is white belt). Anyone care to share a copy?
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 10:33
by jimimaseye
I will fire up the computermator later and send it you.
[Entered by mobile. Excuse my spelling.]
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 15:04
by palinka
Thanks!

Re: Missing UpdateChannels.txt
Posted: 2020-11-14 15:42
by jimimaseye
This is the contents of my UpdateChannels.txt:
Code: Select all
updates.spamassassin.org
# xsaupdate.jam-software.com ## REMOVED - no longer issued in free version due to duplications.
sa.zmi.at
sought.rules.yerp.org
spamassassin.heinlein-support.de
(This is from my laptop. I dont remember adjusting/adding anything, it is dated 2016 as is the rest of the files in the folder, so this should be as installed but I wouldnt want to bet my sons life on it).
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 16:06
by palinka
Thank ye mightily!
Interesting ruleset. I don't recall seeing sa.zmi.at & sought.rules.yerp.org in my updates before. I wonder where i even obtained the channels i was using.
If updatechannels.txt is not part of jam SA, then i must have obtained it from a tutorial here. I wonder if it's ever been part of jam's install?
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 16:19
by jimimaseye
palinka wrote: ↑2020-11-14 16:06
If updatechannels.txt is not part of jam SA, then i must have obtained it from a tutorial here. I wonder if it's ever been part of jam's install?
It definitely is part of the Jam install. Dont know why you dont have it if you did a fresh install.
Ive looked further:
updates_spamassassin_org.cf =
standard spamassassin
xsaupdate_jam-software_com.cf =
standard Jam but I removed them due to duplicate rules
Code: Select all
include xsaupdate_jam-software_com/jam.cf
include xsaupdate_jam-software_com/x_jam_rescores.cf
spamassassin_heinlein-support_de.cf = I think Jam (German company) also added these (these are German language rules - I wouldnt be interested in that)
Code: Select all
include spamassassin_heinlein-support_de/20_blatspammer.cf
include spamassassin_heinlein-support_de/70_HS_body.cf
include spamassassin_heinlein-support_de/70_HS_header.cf
sa_zmi_at.cf = These also are German rules. Cant see why I would add them myself (so maybe also supplied by Jam)
Code: Select all
include sa_zmi_at/70_zmi_german.cf
sought_rules_yerp_org.cf = I think these were added by Jam but cant be sure.
Code: Select all
include sought_rules_yerp_org/20_sought.cf
include sought_rules_yerp_org/20_sought_fraud.cf
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 17:29
by SorenR
Sought rules are defunkt and zmi and heinlein are german language.
Which leaves "updates.spamassassin.org" as the only choice

Re: Missing UpdateChannels.txt
Posted: 2020-11-14 19:11
by palinka
SorenR wrote: ↑2020-11-14 17:29
Sought rules are defunkt and zmi and heinlein are german language.
Which leaves "updates.spamassassin.org" as the only choice
That greatly simplifies things.

Re: Missing UpdateChannels.txt
Posted: 2020-11-14 19:20
by palinka
So the update syntax should be:
Code: Select all
sa-update -v --nogpg --channel updates.spamassassin.org
Or just simply:
Code: Select all
sa-update --channel updates.spamassassin.org
?

?
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 19:26
by palinka
jimimaseye wrote: ↑2020-11-14 16:19
It definitely is part of the Jam install. Dont know why you dont have it if you did a fresh install.
Very strange indeed. I searched the folder. Nothing. I looked in program data too, in case something got put there (no, as expected).
Re: Missing UpdateChannels.txt
Posted: 2020-11-14 21:56
by jimimaseye
sa-update.bat
Code: Select all
cd C:\Program Files\JAM Software\SpamAssassin for Windows
sa-update -v --nogpg --channelfile UpdateChannels.txt
(updatechannels.txt is in C:\Program Files\JAM Software\SpamAssassin for Windows)
Re: Missing UpdateChannels.txt
Posted: 2020-11-15 04:54
by palinka
jimimaseye wrote: ↑2020-11-14 21:56
sa-update.bat
Code: Select all
cd C:\Program Files\JAM Software\SpamAssassin for Windows
sa-update -v --nogpg --channelfile UpdateChannels.txt
(updatechannels.txt is in C:\Program Files\JAM Software\SpamAssassin for Windows)
If there's only one usable channel, why not simply call it?
I looked up the arguments for sa-update.
Code: Select all
--channel channel Retrieve updates from this channel
Use multiple times for multiple channels
--channelfile file Retrieve updates from the channels in the file
--checkonly Check for update availability, do not install
--install filename Install updates directly from this file. Signature
verification will use "file.asc" and "file.sha1"
--allowplugins Allow updates to load plugin code
--gpgkey key Trust the key id to sign releases
Use multiple times for multiple keys
--gpgkeyfile file Trust the key ids in the file to sign releases
--gpghomedir path Store the GPG keyring in this directory
--gpg and --nogpg Use (or do not use) GPG to verify updates
(--gpg is assumed by use of the above
--gpgkey and --gpgkeyfile options)
--import file Import GPG key(s) from file into sa-update's
keyring. Use multiple times for multiple files
--updatedir path Directory to place updates, defaults to the
SpamAssassin site rules directory
(default: /home/parker/perl5/perlbrew/perls/perl-5.14.1/var/spamassassin/3.003003)
--refreshmirrors Force the MIRRORED.BY file to be updated
-D, --debug [area=n,...] Print debugging messages
-v, --verbose Be more verbose, like print updated channel names
-V, --version Print version
-h, --help Print usage message
I'm going to try sa-update -v --nogpg --channel updates.spamassassin.org in tonight's backup routine.
In my powershell backup script, -v is very helpful. If no fresh updates, I add a line to the email body so you know. That's to distinguish between an error and an informational message. That's one of the minor things that annoyed me about your otherwise really great backup script.
Code: Select all
$SAUD = "$SADir\sa-update.exe"
Try {
$SAUpdate = & $SAUD -v --nogpg --channel updates.spamassassin.org | Out-String
Debug $SAUpdate
Debug "Finished updating SpamAssassin in $(ElapsedTime $BeginSAUpdate)"
Email "[OK] SpamAssassin updated"
If ($SAUpdate -match "Update finished, no fresh updates were available"){
Email "[INFO] No fresh SpamAssassin updates available"
}
}
Catch {
Debug "[ERROR] SpamAssassin update : $Error"
Email "[ERROR] SpamAssassin update : Check Debug Log"
}
Re: Missing UpdateChannels.txt
Posted: 2020-11-15 10:30
by jimimaseye
If there's only one usable channel, why not simply call it?
I'm going to try sa-update -v --nogpg --channel updates.spamassassin.org
Sure. It's the same thing. The channel updates file method is useful if you require to list multiple channels (like as previously supplied by Jam) but also works with only 1.