Re: spamd does not start
On 10.10.2014 3:35, LuKreme wrote: > On Tuesday, October 7, 2014, 10:56:54 PM, LuKreme wrote: > >>> >> On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: >>> > I ran sa-update & sa-compile. > >>> >> Should sa-compile be run after sa-update? > >>> Of course it should. I assumed && where I wrote &. I was writing email, not bash. signature.asc Description: OpenPGP digital signature
Re: spamd does not start
On 09 Oct 2014, at 18:35 , LuKreme wrote: > No, that is not what it says. > > $ man 1 bash > … > The control operators && and || denote AND lists and OR lists, > respectively. An AND list has the form Sorry for duplicating other’s posts, I replied to the original message out of the “replies to me” folder without checking the overall list folder. -- 'The gods,' he said. 'Imprisoned in a thought. And perhaps they were never more than a dream.' --Sourcery
Re: spamd does not start
> On 08 Oct 2014, at 16:23 , Duane Hill wrote: > > On Wednesday, October 8, 2014, 3:11:06 PM, LuKreme wrote: > >>> On 08 Oct 2014, at 04:56 , Duane Hill wrote: >>> >>> On Tuesday, October 7, 2014, 10:56:54 PM, LuKreme wrote: >>> On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: > I ran sa-update & sa-compile. >>> Should sa-compile be run after sa-update? >>> I have a crontab entry: >>> 16 1 * * * /usr/local/bin/sa-update && /usr/local/etc/rc.d/sa-spamd restart >>> should I add an sa-compile call? >>> >>> I am on FreeBSD here. This is what I use: >>> >>> Content of sa_update.sh: >>> >>> #!/bin/sh >>> >>> /usr/local/bin/sa-update -D --nogpg >>> >>> if [ $? -eq 0 ] ; then >>> /usr/local/bin/sa-compile >>> /usr/local/etc/rc.d/sa-spamd restart >>> exit 0 >>> else >>> exit 0 >>> fi >>> >>> This way, sa-compile is ran and spamd is restarted only when there is >>> an update. I then use the script in a cron which runs once per day. >>> >>> I believe the way you have it, spamd will get restarted every time >>> your cron is ran whether there is an update or not. > >> It will get restarted if the sa-update process finishes cleanly >> (that’s what && does) which I think is the same as if [ $? -eq 0]; > >> So, I’ll add an sa-compile in there, thanks. > > No. && is a way of chaining commands together. Your cron says run > sa-update and then restart spamd. In other words, when sa-update > finishes running, regardless if there was an update applied or not, > restart spamd. No, that is not what it says. $ man 1 bash … The control operators && and || denote AND lists and OR lists, respectively. An AND list has the form command1 && command2 command2 is executed if, and only if, command1 returns an exit status of zero. -- What if there were no hypothetical questions?
Re: spamd does not start
On Thu, 2014-10-09 at 18:08 +0700, Olivier Nicole wrote: > But you don't do a -lint before restarting SA: if an update was to break > SA (like a big Perl syntax error in a rule, or you are working on a > plugin on your production system, you feel safe because as long as you > don't restart spamd, any bad modification you make will not break SA), > you have stoppped the one that is currently working (and that could keep > working despite the update) amd you find yourself trying to restart a > broken version of SA. > This isn't my production system: that is updated daily by the standard RedHat cron job. This copy of SA is only run when I'm writing/modifying rules or (much less often) working in a plugin. It is stopped 99% of the time. It goes without saying that I use -lint during rule or plugin development. I'm certain that there is a lot in this script you could criticise, but it does exactly what I need: pulls down any updated rules on a weekly basis and finds any obvious errors in the download by starting and stopping spamd and reporting its operation via logwatch. I posted it to show anybody who doesn't use bash case statements just how readable they can make a shell script. Martin
Re: spamd does not start
Martin, > I do something similar on my SA rules development system (I also have SA > installed on this laptop but it is normally not running, which has the > side effect of disabling the standard Fedora sa-update cron job because > this won't run sa-update if it can't find the spamd daemon). My more > complex equivalent is a bash script rather than Perl which starts and > stops SA after a successful update in order to check that all is in > order. This is it. I think the use of the case...esac construct makes it > easier to read: But you don't do a -lint before restarting SA: if an update was to break SA (like a big Perl syntax error in a rule, or you are working on a plugin on your production system, you feel safe because as long as you don't restart spamd, any bad modification you make will not break SA), you have stoppped the one that is currently working (and that could keep working despite the update) amd you find yourself trying to restart a broken version of SA. Best regards, Olivier > === > #!/bin/bash > # > # Update the Spamassassin rules > # > sau=/usr/bin/sa-update > > if [ -x $sau ] > then > $sau > err=$? > case $err in > 0) echo "Spamassassin rules update completed."; > service spamassassin restart; > service spamassassin stop; > echo "Spamassassin restarted and then stopped." ;; > > 1) echo "No Spamassassin rule updates available.";; > > 2) echo "Spamassassin rules updates available"; > echo "Site pre files lint check failed."; > echo "Fix the files and try again.";; > > *) echo "Spamassassin rules update failed: error=$err" > esac > else > echo "Error: $sau does not exist" > exit 0 > fi > === > >> And in any case, send myself an email if something went wrong. >> > I get the mail 'for free' because I run logwatch, which picks up > anything logged by crond (i.e. anything sent to stdout and stderr by a > cron job) and mails it to root and, of course, I set up the mail aliases > so mail sent to root is redirected to my usual login. > >> Being executed only once a day, the extra load of a Perl script is >> neglectible. >> > Agreed. > > > Martin > > > > --
Re: spamd does not start
On Thu, 2014-10-09 at 11:50 +0700, Olivier Nicole wrote: > Hi, > > > /usr/local/bin/sa-update && /usr/local/bin/sa-compile && > > /usr/local/etc/rc.d/sa-spamd restart > > > > the only time spamd would restart is if sa-update AND sa-compile were > > successfully completed, correct? > Yes, that's correct. > Sorry for jumping in the conversation... I have solved that issue by > calling sa-update from a script (perl) and I do a spamassassin -lint > before ever trying to restart spamd (or amavisd in my case), so I am > sure that I will only restart on something clean. > > That way, I can also update some rules that are not on sa-update. > I do something similar on my SA rules development system (I also have SA installed on this laptop but it is normally not running, which has the side effect of disabling the standard Fedora sa-update cron job because this won't run sa-update if it can't find the spamd daemon). My more complex equivalent is a bash script rather than Perl which starts and stops SA after a successful update in order to check that all is in order. This is it. I think the use of the case...esac construct makes it easier to read: === #!/bin/bash # # Update the Spamassassin rules # sau=/usr/bin/sa-update if [ -x $sau ] then $sau err=$? case $err in 0) echo "Spamassassin rules update completed."; service spamassassin restart; service spamassassin stop; echo "Spamassassin restarted and then stopped." ;; 1) echo "No Spamassassin rule updates available.";; 2) echo "Spamassassin rules updates available"; echo "Site pre files lint check failed."; echo "Fix the files and try again.";; *) echo "Spamassassin rules update failed: error=$err" esac else echo "Error: $sau does not exist" exit 0 fi === > And in any case, send myself an email if something went wrong. > I get the mail 'for free' because I run logwatch, which picks up anything logged by crond (i.e. anything sent to stdout and stderr by a cron job) and mails it to root and, of course, I set up the mail aliases so mail sent to root is redirected to my usual login. > Being executed only once a day, the extra load of a Perl script is > neglectible. > Agreed. Martin
Re: spamd does not start
Hi, > /usr/local/bin/sa-update && /usr/local/bin/sa-compile && > /usr/local/etc/rc.d/sa-spamd restart > > the only time spamd would restart is if sa-update AND sa-compile were > successfully completed, correct? Sorry for jumping in the conversation... I have solved that issue by calling sa-update from a script (perl) and I do a spamassassin -lint before ever trying to restart spamd (or amavisd in my case), so I am sure that I will only restart on something clean. That way, I can also update some rules that are not on sa-update. And in any case, send myself an email if something went wrong. Being executed only once a day, the extra load of a Perl script is neglectible. Best regards, Olivier
Re: spamd does not start
On Wednesday, October 8, 2014, 6:31:08 PM, Martin confabulated: > On Wed, 2014-10-08 at 16:46 -0600, Amir Caspi wrote: >> On Oct 8, 2014, at 4:23 PM, Duane Hill wrote: >> > >> > No. && is a way of chaining commands together. Your cron says run >> > sa-update and then restart spamd. In other words, when sa-update >> > finishes running, regardless if there was an update applied or not, >> > restart spamd. >> >> Unless I am mistaken, I believe this is not correct. On *nix systems, >> && is the logical "and" operator, and it can be used to chain commands >> as dependencies. >> > Correct. >> && short-circuits on failure, so if the first command returns zero, >> the "and" would fail and the second command never runs. The second >> command is only evaluated if the first returns non-zero ("true"). >> > Incorrect. sh and its descendants such as bash and ksh reverse the > representation of true and false with respect to C and its descendants: > in shell scripts a value of zero is TRUE and non-zero is FALSE. > This is a necessary feature since, by convention, under UNIX/Linux or > any other POSIX-compliant OS a program returns zero on success and a > non-zero value on failure. The non zero exit code *may* be a value > showing what the error was but this isn't guaranteed: all you can say is > that a non-zero exit code indicates that the program didn't complete its > usual activity. >> Hence, spamd is restarted only if sa-update actually loads an update, >> and not otherwise. >> > Correct: "a && b" in a shell script means run b iff a was successful >> This is the same reason why you can also see commands like: >> do_this || die >> in perl scripts, because the logical "or" operator || will >> short-circuit on success, hence the "fallback" command never gets run >> if the first one succeeded. >> > True, but be aware that Perl, like C, C++, Java, represents false by > zero and true by non-zero values - the reverse of a Unix/Linux/POSIX > shell script. > In all cases there's no danger of confusion as long as you write logical > statements that are either boolean algebra that makes no attempt to > represent the value of a logical variable or only represents it by the > literals TRUE and FALSE. Thanks for clarifying everything. So, if I had: /usr/local/bin/sa-update && /usr/local/bin/sa-compile && /usr/local/etc/rc.d/sa-spamd restart the only time spamd would restart is if sa-update AND sa-compile were successfully completed, correct? -- Duane Hill duih...@gmail.com "If at first you don't succeed, so much for sky diving."
Re: spamd does not start
On Wed, 2014-10-08 at 16:46 -0600, Amir Caspi wrote: > On Oct 8, 2014, at 4:23 PM, Duane Hill wrote: > > > > No. && is a way of chaining commands together. Your cron says run > > sa-update and then restart spamd. In other words, when sa-update > > finishes running, regardless if there was an update applied or not, > > restart spamd. > > Unless I am mistaken, I believe this is not correct. On *nix systems, > && is the logical "and" operator, and it can be used to chain commands > as dependencies. > Correct. > && short-circuits on failure, so if the first command returns zero, > the "and" would fail and the second command never runs. The second > command is only evaluated if the first returns non-zero ("true"). > Incorrect. sh and its descendants such as bash and ksh reverse the representation of true and false with respect to C and its descendants: in shell scripts a value of zero is TRUE and non-zero is FALSE. This is a necessary feature since, by convention, under UNIX/Linux or any other POSIX-compliant OS a program returns zero on success and a non-zero value on failure. The non zero exit code *may* be a value showing what the error was but this isn't guaranteed: all you can say is that a non-zero exit code indicates that the program didn't complete its usual activity. > Hence, spamd is restarted only if sa-update actually loads an update, > and not otherwise. > Correct: "a && b" in a shell script means run b iff a was successful > This is the same reason why you can also see commands like: > do_this || die > in perl scripts, because the logical "or" operator || will > short-circuit on success, hence the "fallback" command never gets run > if the first one succeeded. > True, but be aware that Perl, like C, C++, Java, represents false by zero and true by non-zero values - the reverse of a Unix/Linux/POSIX shell script. In all cases there's no danger of confusion as long as you write logical statements that are either boolean algebra that makes no attempt to represent the value of a logical variable or only represents it by the literals TRUE and FALSE. Martin Martin
Re: spamd does not start
Looks like I'm late to the party. :-) --- Amir thumbed via iPhone > On Oct 8, 2014, at 4:46 PM, Amir Caspi wrote: > >> On Oct 8, 2014, at 4:23 PM, Duane Hill wrote: >> >> No. && is a way of chaining commands together. Your cron says run >> sa-update and then restart spamd. In other words, when sa-update >> finishes running, regardless if there was an update applied or not, >> restart spamd. > > Unless I am mistaken, I believe this is not correct. On *nix systems, && is > the logical "and" operator, and it can be used to chain commands as > dependencies. && short-circuits on failure, so if the first command returns > zero, the "and" would fail and the second command never runs. The second > command is only evaluated if the first returns non-zero ("true"). Hence, > spamd is restarted only if sa-update actually loads an update, and not > otherwise. > > This is the same reason why you can also see commands like: > do_this || die > in perl scripts, because the logical "or" operator || will short-circuit on > success, hence the "fallback" command never gets run if the first one > succeeded. >
Re: spamd does not start
On Wednesday, October 8, 2014, 5:38:20 PM, John wrote: > On Wed, 8 Oct 2014, Duane Hill wrote: >> No. && is a way of chaining commands together. > ...where the second command is only executed if the first command exited > with a zero status. && stops on failure. > try: > true && echo "was true" > false && echo "was false" > If you want it to execute the subsequent command regardless of exit status > of the first command, use a plain ; I stand corrected. I discovered that. Sorry for the noise. -- Duane Hill duih...@gmail.com "If at first you don't succeed, so much for sky diving."
Re: spamd does not start
On Oct 8, 2014, at 4:23 PM, Duane Hill wrote: > > No. && is a way of chaining commands together. Your cron says run > sa-update and then restart spamd. In other words, when sa-update > finishes running, regardless if there was an update applied or not, > restart spamd. Unless I am mistaken, I believe this is not correct. On *nix systems, && is the logical "and" operator, and it can be used to chain commands as dependencies. && short-circuits on failure, so if the first command returns zero, the "and" would fail and the second command never runs. The second command is only evaluated if the first returns non-zero ("true"). Hence, spamd is restarted only if sa-update actually loads an update, and not otherwise. This is the same reason why you can also see commands like: do_this || die in perl scripts, because the logical "or" operator || will short-circuit on success, hence the "fallback" command never gets run if the first one succeeded.
Re: spamd does not start
On Wed, 8 Oct 2014 17:23:36 -0500 Duane Hill wrote: > No. && is a way of chaining commands together. && is a logical AND > Your cron says run > sa-update and then restart spamd. In other words, when sa-update > finishes running, regardless if there was an update applied or not, > restart spamd. No, it's conditional. A && B has a logical value, if A is false then A && B can't possibly be true so B isn't evaluated, this is called short-circuiting.
Re: spamd does not start
On Wednesday, October 8, 2014, 5:31:07 PM, Dave wrote: > On 2014-10-08 15:23, Duane Hill wrote: >> No. && is a way of chaining commands together. Your cron says run >> sa-update and then restart spamd. In other words, when sa-update >> finishes running, regardless if there was an update applied or not, >> restart spamd. > I thought that ; would chain commands together and run both in sequence > regardless of the results, whereas && is a conditional for if the > previous command succeeded and || was a conditional for if the previous > command failed? > At least in bash... I stand corrected. I found this: && will automatically run the command on the right, as long as the command on the left executes without an error return code. Sorry for the noise. -- Duane Hill duih...@gmail.com "If at first you don't succeed, so much for sky diving."
Re: spamd does not start
On Wed, 8 Oct 2014, Duane Hill wrote: No. && is a way of chaining commands together. ...where the second command is only executed if the first command exited with a zero status. && stops on failure. try: true && echo "was true" false && echo "was false" If you want it to execute the subsequent command regardless of exit status of the first command, use a plain ; -- John Hardin KA7OHZhttp://www.impsec.org/~jhardin/ jhar...@impsec.orgFALaholic #11174 pgpk -a jhar...@impsec.org key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C AF76 D822 E6E6 B873 2E79 --- Rights can only ever be individual, which means that you cannot gain a right by joining a mob, no matter how shiny the issued badges are, or how many of your neighbors are part of it. -- Marko --- 860 days since the first successful private support mission to ISS (SpaceX)
Re: spamd does not start
On 2014-10-08 15:23, Duane Hill wrote: No. && is a way of chaining commands together. Your cron says run sa-update and then restart spamd. In other words, when sa-update finishes running, regardless if there was an update applied or not, restart spamd. I thought that ; would chain commands together and run both in sequence regardless of the results, whereas && is a conditional for if the previous command succeeded and || was a conditional for if the previous command failed? At least in bash... -- Dave Warren http://www.hireahit.com/ http://ca.linkedin.com/in/davejwarren
Re: spamd does not start
On Wednesday, October 8, 2014, 3:11:06 PM, LuKreme wrote: >> On 08 Oct 2014, at 04:56 , Duane Hill wrote: >> >> On Tuesday, October 7, 2014, 10:56:54 PM, LuKreme wrote: >> >>> On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: I ran sa-update & sa-compile. >> >>> Should sa-compile be run after sa-update? >> >>> I have a crontab entry: >> >>> 16 1 * * * /usr/local/bin/sa-update && >>> /usr/local/etc/rc.d/sa-spamd restart >> >>> should I add an sa-compile call? >> >> I am on FreeBSD here. This is what I use: >> >> Content of sa_update.sh: >> >> #!/bin/sh >> >> /usr/local/bin/sa-update -D --nogpg >> >> if [ $? -eq 0 ] ; then >> /usr/local/bin/sa-compile >> /usr/local/etc/rc.d/sa-spamd restart >> exit 0 >> else >> exit 0 >> fi >> >> This way, sa-compile is ran and spamd is restarted only when there is >> an update. I then use the script in a cron which runs once per day. >> >> I believe the way you have it, spamd will get restarted every time >> your cron is ran whether there is an update or not. > It will get restarted if the sa-update process finishes cleanly > (that’s what && does) which I think is the same as if [ $? -eq 0]; > So, I’ll add an sa-compile in there, thanks. No. && is a way of chaining commands together. Your cron says run sa-update and then restart spamd. In other words, when sa-update finishes running, regardless if there was an update applied or not, restart spamd. The part in my shell script you mentioned '[ $? -eq 0]' tests to see if the exit result of running sa-update is not equal to zero. If the result is not equal to zero, meaning an update was loaded, run sa-compile and restart spamd. -- Duane Hill duih...@gmail.com "If at first you don't succeed, so much for sky diving."
Re: spamd does not start
> On 08 Oct 2014, at 04:56 , Duane Hill wrote: > > On Tuesday, October 7, 2014, 10:56:54 PM, LuKreme wrote: > >> On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: >>> I ran sa-update & sa-compile. > >> Should sa-compile be run after sa-update? > >> I have a crontab entry: > >> 16 1 * * * /usr/local/bin/sa-update && >> /usr/local/etc/rc.d/sa-spamd restart > >> should I add an sa-compile call? > > I am on FreeBSD here. This is what I use: > > Content of sa_update.sh: > > #!/bin/sh > > /usr/local/bin/sa-update -D --nogpg > > if [ $? -eq 0 ] ; then > /usr/local/bin/sa-compile > /usr/local/etc/rc.d/sa-spamd restart > exit 0 > else > exit 0 > fi > > This way, sa-compile is ran and spamd is restarted only when there is > an update. I then use the script in a cron which runs once per day. > > I believe the way you have it, spamd will get restarted every time > your cron is ran whether there is an update or not. It will get restarted if the sa-update process finishes cleanly (that’s what && does) which I think is the same as if [ $? -eq 0]; So, I’ll add an sa-compile in there, thanks. -- Internet was down last night. Turns out I have two kids. They seem pretty well-behaved
Re: spamd does not start
On October 8, 2014 5:56:54 AM LuKreme wrote: 16 1 * * * /usr/local/bin/sa-update && /usr/local/etc/rc.d/sa-spamd restart should I add an sa-compile call? If the plugin for precompiled body rules is enabled yes, check plugins in pre file
Re: spamd does not start
On Tue, 7 Oct 2014 21:56:54 -0600 LuKreme wrote: > On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: > > I ran sa-update & sa-compile. > > Should sa-compile be run after sa-update? > > I have a crontab entry: > > 16 1 * * * /usr/local/bin/sa-update > && /usr/local/etc/rc.d/sa-spamd restart > > should I add an sa-compile call? It's not essential to compile rules, it speeds things up by a useful amount on busy servers but may not save as many cpu cycles as it takes to do the compilation on light loads. You have to uncomment the line: loadplugin Mail::SpamAssassin::Plugin::Rule2XSBody in v320.pre for the compiled version to actually be used. I think most people that compile rules do it after every update. but AFAIK it's not essential - modified and new rules are just left to perl if you don't.
Re: spamd does not start
On Tuesday, October 7, 2014, 10:56:54 PM, LuKreme wrote: > On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: >> I ran sa-update & sa-compile. > Should sa-compile be run after sa-update? > I have a crontab entry: > 16 1 * * * /usr/local/bin/sa-update && > /usr/local/etc/rc.d/sa-spamd restart > should I add an sa-compile call? I am on FreeBSD here. This is what I use: Content of sa_update.sh: #!/bin/sh /usr/local/bin/sa-update -D --nogpg if [ $? -eq 0 ] ; then /usr/local/bin/sa-compile /usr/local/etc/rc.d/sa-spamd restart exit 0 else exit 0 fi This way, sa-compile is ran and spamd is restarted only when there is an update. I then use the script in a cron which runs once per day. I believe the way you have it, spamd will get restarted every time your cron is ran whether there is an update or not. -- Duane Hill duih...@gmail.com "If at first you don't succeed, so much for sky diving."
Re: spamd does not start
On 07 Oct 2014, at 11:45 , Jari Fredrisson wrote: > I ran sa-update & sa-compile. Should sa-compile be run after sa-update? I have a crontab entry: 16 1 * * * /usr/local/bin/sa-update && /usr/local/etc/rc.d/sa-spamd restart should I add an sa-compile call? -- 'It's still a lie. Like the lie about masks.' 'What lie about masks?' 'The way people say they hide faces.' 'They do hide faces,' said Nanny Ogg. 'Only the one on the outside.' --Maskerade
Re: spamd does not start
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 7.10.2014 20:38, Reindl Harald wrote: > > Am 07.10.2014 um 19:34 schrieb Jari Fredrisson: >> On 7.10.2014 20:29, Karsten Bräckelmann wrote: >>> On Tue, 2014-10-07 at 18:55 +0300, Jari Fredrisson wrote: I built SA 3.4 using cpan to my old Debian Squeeze-lts. root@hurricane:~# time service spamassassin start Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/bin/spamd line 2960. real0m1.230s I read that line in spamd and it talks about two bugs. And a long timeout needed. But this dies at once, hardly a timeout? >>> It states the "child process exited or timed out". Indeed, obviously not >>> a timeout, so the child process simply exited. >>> >>> Anything in syslog left by the child? >>> >>> >> Thanks! >> >> Oct 7 19:49:52 hurricane spamd[7500]: config: no rules were found! Do >> you need to run 'sa-update'? >> >> Sad me > > well, you need to run "sa-update" if you did not already - the rules are not part of the package because they are typically updated each day with the shipped cron script > Yes yes. I ran sa-update & sa-compile. I just wonder how I had not done so earlier... Same head, same mistakes. Old head. -BEGIN PGP SIGNATURE- Version: GnuPG v2 iEYEARECAAYFAlQ0JqQACgkQKL4IzOyjSrZjOgCgzOnSDpkgHqJFU+15aL5Bbm42 UlsAnjWJJXlU8pJ6Cec0uUuN7huGeZaO =RtJx -END PGP SIGNATURE-
Re: spamd does not start
Am 07.10.2014 um 19:34 schrieb Jari Fredrisson: On 7.10.2014 20:29, Karsten Bräckelmann wrote: On Tue, 2014-10-07 at 18:55 +0300, Jari Fredrisson wrote: I built SA 3.4 using cpan to my old Debian Squeeze-lts. root@hurricane:~# time service spamassassin start Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/bin/spamd line 2960. real0m1.230s I read that line in spamd and it talks about two bugs. And a long timeout needed. But this dies at once, hardly a timeout? It states the "child process exited or timed out". Indeed, obviously not a timeout, so the child process simply exited. Anything in syslog left by the child? Thanks! Oct 7 19:49:52 hurricane spamd[7500]: config: no rules were found! Do you need to run 'sa-update'? Sad me well, you need to run "sa-update" if you did not already - the rules are not part of the package because they are typically updated each day with the shipped cron script signature.asc Description: OpenPGP digital signature
Re: spamd does not start
On 7.10.2014 20:29, Karsten Bräckelmann wrote: > On Tue, 2014-10-07 at 18:55 +0300, Jari Fredrisson wrote: >> I built SA 3.4 using cpan to my old Debian Squeeze-lts. >> >> root@hurricane:~# time service spamassassin start >> Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or >> timed out without signaling production of a PID file: exit 255 at >> /usr/local/bin/spamd line 2960. >> >> real0m1.230s >> I read that line in spamd and it talks about two bugs. And a long >> timeout needed. But this dies at once, hardly a timeout? > It states the "child process exited or timed out". Indeed, obviously not > a timeout, so the child process simply exited. > > Anything in syslog left by the child? > > Thanks! Oct 7 19:49:52 hurricane spamd[7500]: spamd: successfully daemonized Oct 7 19:49:52 hurricane spamd[7500]: spamd: Preloading modules with HOME=/tmp/spamd-7500-init Oct 7 19:49:52 hurricane spamd[7500]: config: using "/etc/mail/spamassassin" for site rules pre files Oct 7 19:49:52 hurricane spamd[7500]: config: read file /etc/mail/spamassassin/init.pre Oct 7 19:49:52 hurricane spamd[7500]: config: read file /etc/mail/spamassassin/v310.pre Oct 7 19:49:52 hurricane spamd[7500]: config: read file /etc/mail/spamassassin/v312.pre Oct 7 19:49:52 hurricane spamd[7500]: config: read file /etc/mail/spamassassin/v320.pre Oct 7 19:49:52 hurricane spamd[7500]: config: read file /etc/mail/spamassassin/v330.pre Oct 7 19:49:52 hurricane spamd[7500]: config: read file /etc/mail/spamassassin/v340.pre Oct 7 19:49:52 hurricane spamd[7500]: config: using "/usr/local/share/spamassassin" for sys rules pre files Oct 7 19:49:52 hurricane spamd[7500]: config: using "/usr/local/share/spamassassin" for default rules dir Oct 7 19:49:52 hurricane spamd[7500]: config: no rules were found! Do you need to run 'sa-update'? Oct 7 19:49:53 hurricane spamd[7498]: child process [7500] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/bin/spamd line 2960. Sad me.
Re: spamd does not start
On Tue, 2014-10-07 at 18:55 +0300, Jari Fredrisson wrote: > I built SA 3.4 using cpan to my old Debian Squeeze-lts. > > root@hurricane:~# time service spamassassin start > Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or > timed out without signaling production of a PID file: exit 255 at > /usr/local/bin/spamd line 2960. > > real0m1.230s > I read that line in spamd and it talks about two bugs. And a long > timeout needed. But this dies at once, hardly a timeout? It states the "child process exited or timed out". Indeed, obviously not a timeout, so the child process simply exited. Anything in syslog left by the child? -- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}
Re: spamd does not start
On 7.10.2014 18:58, Axb wrote: > On 10/07/2014 05:55 PM, Jari Fredrisson wrote: >> I built SA 3.4 using cpan to my old Debian Squeeze-lts. >> >> root@hurricane:~# time service spamassassin start >> Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or >> timed out without signaling production of a PID file: exit 255 at >> /usr/local/bin/spamd line 2960. >> >> real0m1.230s >> user0m0.220s >> sys 0m0.016s >> >> I read that line in spamd and it talks about two bugs. And a long >> timeout needed. But this dies at once, hardly a timeout? >> >> > > have you tried to add -D to the init script and see what is says > root@hurricane:~# service spamassassin start Starting SpamAssassin Mail Filter Daemon: Oct 7 19:49:52.142 [7498] dbg: logger: adding facilities: all Oct 7 19:49:52.146 [7498] dbg: logger: logging level is DBG Oct 7 19:49:52.275 [7498] dbg: logger: calling setlogsock(unix) Oct 7 19:49:52.275 [7498] dbg: logger: opening syslog with unix socket Oct 7 19:49:52.276 [7498] dbg: logger: successfully connected to syslog/unix Oct 7 19:49:52.276 [7498] dbg: logger: successfully added syslog method Oct 7 19:49:52.279 [7498] dbg: spamd: will perform setuids? 0 Oct 7 19:49:52.282 [7498] dbg: spamd: socket module of choice: IO::Socket::INET 1.31, Socket 2.015, have PF_INET, no PF_INET6, using Socket::getaddrinfo, AI_ADDRCONFIG is supported Oct 7 19:49:52.283 [7498] dbg: spamd: socket specification: "192.168.1.117", IP address: 192.168.1.117, port: 783 Oct 7 19:49:52.283 [7498] dbg: spamd: attempting to listen on IP addresses: 192.168.1.117, port 783 Oct 7 19:49:52.286 [7498] dbg: spamd: creating IO::Socket::INET socket: Listen: 128, LocalAddr: 192.168.1.117, LocalPort: 783, Proto: tcp, ReuseAddr: 1, Type: 1 Oct 7 19:49:52.287 [7498] dbg: spamd: server listen sockets fd bit field: 0100 Oct 7 19:49:52.288 [7498] dbg: logger: adding facilities: all Oct 7 19:49:52.290 [7498] dbg: logger: logging level is DBG Oct 7 19:49:52.291 [7498] dbg: generic: SpamAssassin version 3.4.0 Oct 7 19:49:52.292 [7498] dbg: generic: Perl 5.010001, PREFIX=/usr/local, DEF_RULES_DIR=/usr/local/share/spamassassin, LOCAL_RULES_DIR=/etc/mail/spamassassin, LOCAL_STATE_DIR=/var/lib/spamassassin Oct 7 19:49:52.295 [7498] dbg: config: timing enabled Oct 7 19:49:52.295 [7498] dbg: config: score set 0 chosen. child process [7500] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/bin/spamd line 2960. Nothing new, I'm afraid.
Re: spamd does not start
On 10/07/2014 05:55 PM, Jari Fredrisson wrote: I built SA 3.4 using cpan to my old Debian Squeeze-lts. root@hurricane:~# time service spamassassin start Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/bin/spamd line 2960. real0m1.230s user0m0.220s sys 0m0.016s I read that line in spamd and it talks about two bugs. And a long timeout needed. But this dies at once, hardly a timeout? have you tried to add -D to the init script and see what is says
spamd does not start
I built SA 3.4 using cpan to my old Debian Squeeze-lts. root@hurricane:~# time service spamassassin start Starting SpamAssassin Mail Filter Daemon: child process [4868] exited or timed out without signaling production of a PID file: exit 255 at /usr/local/bin/spamd line 2960. real0m1.230s user0m0.220s sys 0m0.016s I read that line in spamd and it talks about two bugs. And a long timeout needed. But this dies at once, hardly a timeout?
Re: spamd does not start
Thanks to Alan, Dan. I found two Socket.pm, one is v1.72 and the other v1.5. # find ./ -name "Socket.pm" -print ./5.6.1/i386-linux-thread-multi/IO/Socket.pm ./5.6.1/i386-linux-thread-multi/Socket.pm ./site_perl/5.6.1/i386-linux-thread-multi/Socket.pm # find ./ -name "Socket.so" -print ./5.6.1/i386-linux-thread-multi/auto/Socket/Socket.so ./site_perl/5.6.1/i386-linux-thread-multi/auto/Socket/Socket.so My spamd is ok to start after removed older ones. On Fri, 3 Dec 2004 08:51:16 -0600 "Smart,Dan" <[EMAIL PROTECTED]> wrote: > Search for the .pm and .so components of the installed packages. I found > that I had more than one version saved in different perl library locations. > When I did a locate DNS.pm, etc, I found them, then made sure I was left > with one copy of the most recent version. That fixed my SPAMD problem > (actually was a problem with Time::HiRes and Net::DNS) > > <> > > > > > > -Original Message- > > From: xoops?? [mailto:[EMAIL PROTECTED] > > Sent: Friday, December 03, 2004 1:00 AM > > To: users@spamassassin.apache.org > > Subject: spamd does not start > > > > Hi, > > > > I have newly installed spamassassin-3.0.1 into linux box > > 2.4.18-22 running qmail with qmail-queue patch. > > Having a trouble to start spamd with SPAMDOPTIONS="-x -u > > spamd -H /home/spamd -d": > > > > "Starting spamd: Bareword "SO_REUSEPORT" not allowed while > > "strict subs" in use at > > /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. > > Compilation failed in require at > > /usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. > > Compilation failed in require at /usr/bin/spamd line 38. > > BEGIN failed--compilation aborted at /usr/bin/spamd line 38. > > > > I installed prerequisited modules, HTML::Parser, DB_File > > Net::DNS, BerkeleyDB, Net::SMTP, Mail::SPF::Query, IP::Country::Fast. > > And it's wonder another linux box with the same > > configuration is running allright. > > > > Thanks for any help. > > > > Hodaka > > > > > xoopsÀ±ºÇl <[EMAIL PROTECTED]>
RE: spamd does not start
Search for the .pm and .so components of the installed packages. I found that I had more than one version saved in different perl library locations. When I did a locate DNS.pm, etc, I found them, then made sure I was left with one copy of the most recent version. That fixed my SPAMD problem (actually was a problem with Time::HiRes and Net::DNS) <> > -Original Message- > From: xoops?? [mailto:[EMAIL PROTECTED] > Sent: Friday, December 03, 2004 1:00 AM > To: users@spamassassin.apache.org > Subject: spamd does not start > > Hi, > > I have newly installed spamassassin-3.0.1 into linux box > 2.4.18-22 running qmail with qmail-queue patch. > Having a trouble to start spamd with SPAMDOPTIONS="-x -u > spamd -H /home/spamd -d": > > "Starting spamd: Bareword "SO_REUSEPORT" not allowed while > "strict subs" in use at > /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. > Compilation failed in require at > /usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. > Compilation failed in require at /usr/bin/spamd line 38. > BEGIN failed--compilation aborted at /usr/bin/spamd line 38. > > I installed prerequisited modules, HTML::Parser, DB_File > Net::DNS, BerkeleyDB, Net::SMTP, Mail::SPF::Query, IP::Country::Fast. > And it's wonder another linux box with the same > configuration is running allright. > > Thanks for any help. > > Hodaka > >
Re: spamd does not start
jdow wrote: (B> From: "alan premselaar" <[EMAIL PROTECTED]> (B> To: "xoops$B (B> Cc: (B> Sent: 2004 December, 02, Thursday 23:27 (B> Subject: Re: spamd does not start (B> (B> (B> (B>>xoops$B> (B>>>Hi, (B>>> (B>>>I have newly installed spamassassin-3.0.1 into linux box 2.4.18-22 (B> (B> running qmail with qmail-queue patch. (B> (B>>>Having a trouble to start spamd with SPAMDOPTIONS="-x -u spamd -H (B> (B> /home/spamd -d": (B> (B>>> "Starting spamd: Bareword "SO_REUSEPORT" not allowed while "strict (B> (B> subs" in use at /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. (B> (B>>>Compilation failed in require at (B> (B> /usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. (B> (B>>>Compilation failed in require at /usr/bin/spamd line 38. (B>>>BEGIN failed--compilation aborted at /usr/bin/spamd line 38. (B>>> (B>>>I installed prerequisited modules, HTML::Parser, DB_File Net::DNS, (B> (B> BerkeleyDB, Net::SMTP, Mail::SPF::Query, IP::Country::Fast. (B> (B>>>And it's wonder another linux box with the same configuration is (B> (B> running allright. (B> (B>>>Thanks for any help. (B>>> (B>>>Hodaka (B>>> (B>> (B>>Hodaka-san, (B>> (B>> what version of IO::Socket do you have installed? you may need to (B>>update it. I haven't personally experienced this problem, but i've got (B>>the latest IO::Socket installed from CPAN. (B>> (B>>hope this helps (B>> (B>>alan (B> (B> (B> Please, could you use a smaller font. This one spreads the message all over (B> my screen and I can't read it. It's like (B> one word per line. (B> (B> {O.O}(And that's sarcasm if you don't get it.) (B> (B> (Bdon't know what you're talking about. I only use plain text email so (Bthere shouldn't be any font size control. The only thing I can think of (Bis that in replying to the original message, the charset (ISO-2022-JP) (Bwas retained and perhaps you have really small fonts settings for (BISO-2022-JP type mail in your mail client :p (B (Balan
Re: spamd does not start
My IO::Socket version is 1.26 which is up to date, CPAN says. Alan, is my font readable in your screen ? Thanks. > > Hi, > > > > I have newly installed spamassassin-3.0.1 into linux box 2.4.18-22 running > > qmail with qmail-queue patch. > > Having a trouble to start spamd with SPAMDOPTIONS="-x -u spamd -H > > /home/spamd -d": > > > > "Starting spamd: Bareword "SO_REUSEPORT" not allowed while "strict subs" > > in use at /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. > > Compilation failed in require at > > /usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. > > Compilation failed in require at /usr/bin/spamd line 38. > > BEGIN failed--compilation aborted at /usr/bin/spamd line 38. > > > > I installed prerequisited modules, HTML::Parser, DB_File Net::DNS, > > BerkeleyDB, Net::SMTP, Mail::SPF::Query, IP::Country::Fast. > > And it's wonder another linux box with the same configuration is running > > allright. > > > > Thanks for any help. > > > > Hodaka > > > > Hodaka-san, > > what version of IO::Socket do you have installed? you may need to > update it. I haven't personally experienced this problem, but i've got > the latest IO::Socket installed from CPAN. > > hope this helps > > alan > [EMAIL PROTECTED]
Re: spamd does not start
From: "alan premselaar" <[EMAIL PROTECTED]> (BTo: "xoops$B (BCc: (BSent: 2004 December, 02, Thursday 23:27 (BSubject: Re: spamd does not start (B (B (B> xoops$B > Hi, (B> > (B> > I have newly installed spamassassin-3.0.1 into linux box 2.4.18-22 (Brunning qmail with qmail-queue patch. (B> > Having a trouble to start spamd with SPAMDOPTIONS="-x -u spamd -H (B/home/spamd -d": (B> > (B> > "Starting spamd: Bareword "SO_REUSEPORT" not allowed while "strict (Bsubs" in use at /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. (B> > Compilation failed in require at (B/usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. (B> > Compilation failed in require at /usr/bin/spamd line 38. (B> > BEGIN failed--compilation aborted at /usr/bin/spamd line 38. (B> > (B> > I installed prerequisited modules, HTML::Parser, DB_File Net::DNS, (BBerkeleyDB, Net::SMTP, Mail::SPF::Query, IP::Country::Fast. (B> > And it's wonder another linux box with the same configuration is (Brunning allright. (B> > (B> > Thanks for any help. (B> > (B> > Hodaka (B> > (B> (B> Hodaka-san, (B> (B> what version of IO::Socket do you have installed? you may need to (B> update it. I haven't personally experienced this problem, but i've got (B> the latest IO::Socket installed from CPAN. (B> (B> hope this helps (B> (B> alan (B (BPlease, could you use a smaller font. This one spreads the message all over (Bmy screen and I can't read it. It's like (Bone word per line. (B (B{O.O}(And that's sarcasm if you don't get it.)
Re: spamd does not start
xoops$B Hi, (B> (B> I have newly installed spamassassin-3.0.1 into linux box 2.4.18-22 running (B> qmail with qmail-queue patch. (B> Having a trouble to start spamd with SPAMDOPTIONS="-x -u spamd -H /home/spamd (B> -d": (B> (B> "Starting spamd: Bareword "SO_REUSEPORT" not allowed while "strict subs" in (B> use at /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. (B> Compilation failed in require at (B> /usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. (B> Compilation failed in require at /usr/bin/spamd line 38. (B> BEGIN failed--compilation aborted at /usr/bin/spamd line 38. (B> (B> I installed prerequisited modules, HTML::Parser, DB_File Net::DNS, (B> BerkeleyDB, Net::SMTP, Mail::SPF::Query, IP::Country::Fast. (B> And it's wonder another linux box with the same configuration is running (B> allright. (B> (B> Thanks for any help. (B> (B> Hodaka (B> (B (BHodaka-san, (B (B what version of IO::Socket do you have installed? you may need to (Bupdate it. I haven't personally experienced this problem, but i've got (Bthe latest IO::Socket installed from CPAN. (B (Bhope this helps (B (Balan
spamd does not start
Hi, (B (BI have newly installed spamassassin-3.0.1 into linux box 2.4.18-22 running (Bqmail with qmail-queue patch. (BHaving a trouble to start spamd with SPAMDOPTIONS="-x -u spamd -H /home/spamd (B-d": (B (B "Starting spamd: Bareword "SO_REUSEPORT" not allowed while "strict subs" in (Buse at /usr/lib/perl5/5.6.1/IO/Socket/INET.pm line 160. (BCompilation failed in require at (B/usr/lib/perl5/5.6.1/i386-linux-thread-multi/IO/Socket.pm line 21. (BCompilation failed in require at /usr/bin/spamd line 38. (BBEGIN failed--compilation aborted at /usr/bin/spamd line 38. (B (BI installed prerequisited modules, HTML::Parser, DB_File Net::DNS, BerkeleyDB, (BNet::SMTP, Mail::SPF::Query, IP::Country::Fast. (BAnd it's wonder another linux box with the same configuration is running (Ballright. (B (BThanks for any help. (B (BHodaka