Re: Restarting spamd?
On 10 Nov 2013, at 09:46 , RW wrote: > On Sun, 10 Nov 2013 08:19:36 -0700 > LuKreme wrote: > >> After I run sa-learn, I noticed that spamd did not apply the changed >> rules. > > I assume that everywhere you have written sa-learn, you actually mean > sa-update. doh. Yes, I did. > sa-update && /etc/init.d/spamassassin reload Perfect. > It doesn't matter if you run it frequently since it tests whether your > rules are up to date by a simple dns query which can be cached by your > local cache. I'll run it daily in that case. I still remember the old days of, "don't check too often and don't check at 0 0 or 1 1". -- The older you get the more you need the people you knew when you were young.
Re: Restarting spamd?
RW skrev den 2013-11-10 17:46: On Sun, 10 Nov 2013 08:19:36 -0700 LuKreme wrote: After I run sa-learn, I noticed that spamd did not apply the changed rules. I assume that everywhere you have written sa-learn, you actually mean sa-update. # sa-update.sh sa-update sa-compile /etc/init.d/spampd restart this is what i do on gentoo note i use spampd not spamd/spamc, but the same is the order for spamd sa-compile need to have one more plugin enabled to be usefull
Re: Restarting spamd?
LuKreme skrev den 2013-11-10 16:19: After I run sa-learn, I noticed that spamd did not apply the changed rules. hmm, sa-laern is bayes, not spamassassin rules, if you update rules then it must restart spamd If I setup sa-learn to run automatically, I need to setup spamd to restart afterwards, nope this is inccorect, bayes is learning by rules and sa-learn, only need to restart spamd if rules are changed, for the sa-learn part it does not need restart of spamd I suppose. What's a reasonable interval for running sa-learn out of crontab? (I have it setup for weekly) this is another question outside of subject Or should I be doing something else? tell what you are doing would be a start :=)
Re: Restarting spamd?
On Sun, 10 Nov 2013 08:19:36 -0700 LuKreme wrote: > After I run sa-learn, I noticed that spamd did not apply the changed > rules. I assume that everywhere you have written sa-learn, you actually mean sa-update. > If I setup sa-learn to run automatically, I need to setup spamd to > restart afterwards, I suppose. From the manpage: Note that "sa-update" will not restart "spamd" or otherwise cause a scanner to reload the now-updated ruleset automatically. Instead, "sa-update" is typically used in something like the following manner: sa-update && /etc/init.d/spamassassin reload This works because "sa-update" only returns an exit status of 0 if it has successfully downloaded and installed an updated ruleset. There's probably some kind of periodic script supplied by your OS's Spamassassin package. > What's a reasonable interval for > running sa-learn out of crontab? (I have it setup for weekly) It doesn't matter if you run it frequently since it tests whether your rules are up to date by a simple dns query which can be cached by your local cache.
Re: Restarting spamd?
On 11/10/2013 10:19 AM, LuKreme wrote: After I run sa-learn, I noticed that spamd did not apply the changed rules. If I setup sa-learn to run automatically, I need to setup spamd to restart afterwards, I suppose. What's a reasonable interval for running sa-learn out of crontab? (I have it setup for weekly) Or should I be doing something else? We try hard to publish updates nightly so once per day at max is the highest. Regards, KAM
Restarting spamd?
After I run sa-learn, I noticed that spamd did not apply the changed rules. If I setup sa-learn to run automatically, I need to setup spamd to restart afterwards, I suppose. What's a reasonable interval for running sa-learn out of crontab? (I have it setup for weekly) Or should I be doing something else? -- I've never seen religious faith move mountains, but I've seen what it does to skyscrapers.
Re: Unknown option: a when restarting spamd
Geoff Soper wrote: > I've recently moved from calling spamassasin to using spamc/spamd. Today > I had a "/etc/rc.d/init.d/spamd restart" fail with the message "Unknown > option: a". Googling this led me to the /etc/sysconfig/spamassassin and > /etc/rc.d/init.d/spamd files, both of which specified the "a" option > (the former file overriding the latter file). > > What would the "a" option be and why did the two files specify it when > spamd doesn't accept it? > The -a option was removed AGES ago. You need to update your start scripts and read the README/INSTALL docs. I forget what version, might be 3.0 or possibly as far back as 2.55. Michael
Re: Unknown option: a when restarting spamd
On Sat, Jan 06, 2007 at 03:39:30AM +, Geoff Soper wrote: > What would the "a" option be and why did the two files specify it when > spamd doesn't accept it? No idea. Neither spamassassin nor spamd have/had a "-a" option from what I can see. Some crazy distribution's add-on ? -- Randomly Selected Tagline: "6+2=8. Now describe why."- Joe about his Calculus class pgpNyyzMSjZLE.pgp Description: PGP signature
Unknown option: a when restarting spamd
I've recently moved from calling spamassasin to using spamc/spamd. Today I had a "/etc/rc.d/init.d/spamd restart" fail with the message "Unknown option: a". Googling this led me to the /etc/sysconfig/spamassassin and /etc/rc.d/init.d/spamd files, both of which specified the "a" option (the former file overriding the latter file). What would the "a" option be and why did the two files specify it when spamd doesn't accept it? Thanks, Geoff
Re: Restarting SPAMD
On Wed, March 23, 2005 8:24 pm, Matt said: >>Which distribution are you using? > > I am running Fedora Core 2 and have SA 3.0.2 installed by rpm. I only > have > SSH access to this box. No keyboard or monitor on it. In that case, as root: service spamassassin restart The command above basically invokes the script others have pointed to.../etc/init.d/spamassassin -- Regards, Matt Florido
RE: Restarting SPAMD
I think this is how I have mine setup (it's been a while). I have an icon pointing to this command. /etc/rc.d/init.d/spamassassin restart Check to see if you have the 'spamassassin' file in init.d for use with the above command. -Original Message- From: jdow [mailto:[EMAIL PROTECTED] Sent: Thursday, March 24, 2005 12:14 AM To: users@spamassassin.apache.org Subject: Re: Restarting SPAMD From: "Matt" <[EMAIL PROTECTED]> > >Which distribution are you using? > > I am running Fedora Core 2 and have SA 3.0.2 installed by rpm. I only have > SSH access to this box. No keyboard or monitor on it. > > >If it's RedHat or Mandrake, for example, you're not starting it correctly. > >For them there is an /etc/init.d aka /etc/rc.d/init.d entry for starting > >and stopping spamd using the "service" script as with "service spamassassin > >restart". > > None on mine. > > >Otherwise you have to use kill and the command below. > > So: > > /usr/bin/spamd -d -c -m 5 -r /var/run/spamd.pid > > Do I need to invoke it like that so I can kill it? > > Thanks. > > Matt > > >> I start SPAMD like so in rc.local. > > > >> /usr/bin/spamd -d -c -m 5 [EMAIL PROTECTED] SpamAssassin]# ps x|grep spamd N ?Ss 0:02 /usr/bin/spamd -d -c -m1 -H m ?S 1:03 spamd child [EMAIL PROTECTED] SpamAssassin]# kill N;ps x|grep spamd The first gives you spamd's process number, N. The second kills that process ID and confirms spamd is gone. You might see the ps report for the grep, however. Ignore it. Of course, the value stored in /var/run/spamd.pid can be used, too, if you happened to run it the way you showed. With Linux there are many ways of doing things. You need to do this as root. If you are running RedHat, Mandrake, SUSE, or any other that uses init.d then your installation is not quite right. If you are a dedicated do it by hand type I'd suggest you're gnawing off a rather largish bite of learning, not that this is a bad thing. If your system does use init.d and some aspect of your install technique did not generate the init.d/ spamassassin file you need then I could email you the one I have. {^_^}
Re: Restarting SPAMD
From: "Matt" <[EMAIL PROTECTED]> > >Which distribution are you using? > > I am running Fedora Core 2 and have SA 3.0.2 installed by rpm. I only have > SSH access to this box. No keyboard or monitor on it. > > >If it's RedHat or Mandrake, for example, you're not starting it correctly. > >For them there is an /etc/init.d aka /etc/rc.d/init.d entry for starting > >and stopping spamd using the "service" script as with "service spamassassin > >restart". > > None on mine. > > >Otherwise you have to use kill and the command below. > > So: > > /usr/bin/spamd -d -c -m 5 -r /var/run/spamd.pid > > Do I need to invoke it like that so I can kill it? > > Thanks. > > Matt > > >> I start SPAMD like so in rc.local. > > > >> /usr/bin/spamd -d -c -m 5 [EMAIL PROTECTED] SpamAssassin]# ps x|grep spamd N ?Ss 0:02 /usr/bin/spamd -d -c -m1 -H m ?S 1:03 spamd child [EMAIL PROTECTED] SpamAssassin]# kill N;ps x|grep spamd The first gives you spamd's process number, N. The second kills that process ID and confirms spamd is gone. You might see the ps report for the grep, however. Ignore it. Of course, the value stored in /var/run/spamd.pid can be used, too, if you happened to run it the way you showed. With Linux there are many ways of doing things. You need to do this as root. If you are running RedHat, Mandrake, SUSE, or any other that uses init.d then your installation is not quite right. If you are a dedicated do it by hand type I'd suggest you're gnawing off a rather largish bite of learning, not that this is a bad thing. If your system does use init.d and some aspect of your install technique did not generate the init.d/ spamassassin file you need then I could email you the one I have. {^_^}
Re: Restarting SPAMD
Which distribution are you using? I am running Fedora Core 2 and have SA 3.0.2 installed by rpm. I only have SSH access to this box. No keyboard or monitor on it. If it's RedHat or Mandrake, for example, you're not starting it correctly. For them there is an /etc/init.d aka /etc/rc.d/init.d entry for starting and stopping spamd using the "service" script as with "service spamassassin restart". None on mine. Otherwise you have to use kill and the command below. So: /usr/bin/spamd -d -c -m 5 -r /var/run/spamd.pid Do I need to invoke it like that so I can kill it? Thanks. Matt I start SPAMD like so in rc.local. /usr/bin/spamd -d -c -m 5
Re: Restarting SPAMD
Which distribution are you using? If it's RedHat or Mandrake, for example, you're not starting it correctly. For them there is an /etc/init.d aka /etc/rc.d/init.d entry for starting and stopping spamd using the "service" script as with "service spamassassin restart". Otherwise you have to use kill and the command below. {^_^} - Original Message - From: "Matt" <[EMAIL PROTECTED]> > I start SPAMD like so in rc.local. > > /usr/bin/spamd -d -c -m 5 > > I imagine it must be restarted to pick up any changes in the rule sets? > > Now how do I restart it? I imagine I need to do something with a pid file > to kill it but am unfamiliar with that. No linux guru here. > > Is there a script I can put in /etc/init.d/ that would support just doing > "spamd start" and "spamd restart", etc? Where can I find a copy if so? > > Thanks. > > Matt >
Re: Restarting SPAMD
- Original Message - From: "Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 23, 2005 8:45 PM Subject: Restarting SPAMD I start SPAMD like so in rc.local. /usr/bin/spamd -d -c -m 5 I imagine it must be restarted to pick up any changes in the rule sets? Now how do I restart it? /etc/init.d/spamassassin [restart] [stop] [start] (yes, this restarts/stops/starts spamd) -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.8.0 - Release Date: 3/21/2005
Restarting SPAMD
I start SPAMD like so in rc.local. /usr/bin/spamd -d -c -m 5 I imagine it must be restarted to pick up any changes in the rule sets? Now how do I restart it? I imagine I need to do something with a pid file to kill it but am unfamiliar with that. No linux guru here. Is there a script I can put in /etc/init.d/ that would support just doing "spamd start" and "spamd restart", etc? Where can I find a copy if so? Thanks. Matt
Re: Restarting spamd after config change.
Robert Markin wrote: > Hello, > > Can I simply SIGHUP my spamd process after making changes to local.cf, > or do I have to kill the pid then /usr/bin/spamd -c -d > > Simply put, does SIGHUP keep any flags that I may be using after my > executable? It should. > > Also, do I need to use these flags at all? The man page shows -c as > "create user prefs" and -d as "daemonize. > > I know that I don't use "user_prefs" so that is obvious. But do I > need to tell it to daemonize spamd? Well, if you want it to daemonize, which you almost certainly do, then yes. The alternative is for spamd to run in console mode, which is really only useful for testing debugging.
Re: Restarting spamd after config change.
Robert Markin wrote: Hello, Can I simply SIGHUP my spamd process after making changes to local.cf, or do I have to kill the pid then /usr/bin/spamd -c -d Simply put, does SIGHUP keep any flags that I may be using after my executable? Also, do I need to use these flags at all? The man page shows -c as "create user prefs" and -d as "daemonize. I know that I don't use "user_prefs" so that is obvious. But do I need to tell it to daemonize spamd? The man page also says something about the -r flag to write the pid to a file. Any thoughts? Robert Does anybody have any advice on the cleanest way to reload the config without stopping spamd first?
Restarting spamd after config change.
Hello, Can I simply SIGHUP my spamd process after making changes to local.cf, or do I have to kill the pid then /usr/bin/spamd -c -d Simply put, does SIGHUP keep any flags that I may be using after my executable? Also, do I need to use these flags at all? The man page shows -c as "create user prefs" and -d as "daemonize. I know that I don't use "user_prefs" so that is obvious. But do I need to tell it to daemonize spamd? The man page also says something about the -r flag to write the pid to a file. Any thoughts? Robert
Re: restarting spamd (3.02)
At 02:55 PM 1/15/2005, [EMAIL PROTECTED] wrote: /usr/local/bin/spamd -d -x -u qscand -r /var/run/spamd.pid I used to run a script to kill and restart spamd every time I made a config change (ie, whitelist) because it was said that older versions of SA needed a full restart. I tried a SIGHUP for the parent spamd id, and although the log shows the signal received, the processes die and I have to start spamd manually. According to man spamd, you parameter set is incompatible with using SIGHUP: -u username, --username=username Run as the named user. If this option is not set, the default behaviour is to setuid() to the user running spamc, if spamd is running as root. Note: ``--username=root'' disables the setuid() functionality and leaves spamd running as root. Note: If this option is set to a non-root user, and spamd is to run on a privileged port (any < 1024, default 783 or via -p), the parent will not be able to be sent a SIGHUP to reload the configuration.
restarting spamd (3.02)
I just upgraded to SA 3.0.2 from 2.6x and got it running ok, but noticed a couple of issues: SA 3.0.2 doesn't write to the pidfile the way it used to. The man pages still show that the -r switch will make it do this, but using the same startup script and restart script that I've been using all along, it doesn't work. The permissions are the same for /var/run and the scripts are run by root, and the user that spamd runs as is the same: /usr/local/bin/spamd -d -x -u qscand -r /var/run/spamd.pid I used to run a script to kill and restart spamd every time I made a config change (ie, whitelist) because it was said that older versions of SA needed a full restart. I tried a SIGHUP for the parent spamd id, and although the log shows the signal received, the processes die and I have to start spamd manually. Ideas? James Smallacombe PlantageNet, Inc. CEO and Janitor [EMAIL PROTECTED] http://3.am =