You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Jari Fredriksson <ja...@iki.fi> on 2009/06/02 22:06:05 UTC

An idea for spamc (failsafe option)

I have two spamd hosts, and spamc calls them seemingly random or doing some kind of load balance. -H option if I remeber right.

Sometimes one of those are down when doing maintance or something..

When spamc encouters "connection refused" it keeps retrying as told with --connect-retries

But if the connection is refused, there simply is no-one listening. How about trying the other alternatives?

I may write this patch some day, but it might be cool to have in the official version.

One of my spamd machines has only 128 megabytes RAM, and I have to shut down spamd during the weekly sa-update/sa-compile.

Another machine has 256 RAM, and I have to shutdown spamd because it seems it's backup to DVD routine needs lots of ram while writing to DVD.

If spamc could cope with these outages, there would not be a need to alter nameserver configuration, spamc just would try another name found from dns.

How's that, folks?





Re: An idea for spamc (failsafe option)

Posted by Matus UHLAR - fantomas <uh...@fantomas.sk>.
> Jari Fredriksson wrote:
> > But if the connection is refused, there simply is no-one
> > listening. How about trying the other alternatives?

On 02.06.09 23:04, Bob Proulx wrote:
> The documentation leads me to believe it does that now.
> 
>            If host resolves to multiple addresses, then spamc will
>            fail-over to the other addresses, if the first one cannot
>            be connected to.  It will first try all addresses of one
>            host before it tries the next one in the list.
> 
> However the killer bad thing for me is this:
> 
> 	   Note that this fail-over behaviour is incompatible with -x;
>            if that switch is used, fail-over will not occur.
> 
> I am not willing to stop filtering mail through spamassassin if my
> spamd machine is unavailble for a moment, such as during a rare
> reboot.  Therefore I want to use the -x option.  Otherwise if all
> machines are unavailable the spam is just sent through!  I want it to
> queue in that case.  The machines will come back online and then drain
> the mail queue.

I don't like this behaviour too, there's bug Bug 5359 about this.

-- 
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.
It's now safe to throw off your computer.

Re: An idea for spamc (failsafe option)

Posted by Jari Fredriksson <ja...@iki.fi>.
> Jari Fredriksson wrote:
> 
> However the killer bad thing for me is this:
> 
>    Note that this fail-over behaviour is incompatible
>           with -x; if that switch is used, fail-over will
> not occur. 
> 
> I am not willing to stop filtering mail through
> spamassassin if my spamd machine is unavailble for a
> moment, such as during a rare reboot.  Therefore I want
> to use the -x option.  Otherwise if all machines are
> unavailable the spam is just sent through!  I want it to
> queue in that case.  The machines will come back online
> and then drain the mail queue. 

Ditto. I use -x and not willing to drop it :( Nice to know the fail-over is still implemented!

> Sporting! :-)  But if working for you then efficient and
> likely a greener solution than the power hogs that most
> are using. 
> 
>> ...  and I have to
>> shut down spamd during the weekly sa-update/sa-compile.

My 256 RAM machine does it daily, but the older Pentium Pro with 128 megs ram spends so long in the sa-compile process thrashing swapfile so I made it weekly. Hmm, but then I had spamd still running... not that it is off I might try daily again.


> 
> Weekly?  I do this daily.  The sought.cf rules are a
> godsend. 
> 

Yes.

Re: An idea for spamc (failsafe option)

Posted by Bob Proulx <bo...@proulx.com>.
Jari Fredriksson wrote:
> I have two spamd hosts, and spamc calls them seemingly random or
> doing some kind of load balance. -H option if I remeber right.

The documentation says that it just randomizes the ordering of the
addresses.  So if luck is with you then you will split the load among
all of the addresses.  But there are times when that doesn't work.

> But if the connection is refused, there simply is no-one
> listening. How about trying the other alternatives?

The documentation leads me to believe it does that now.

           If host resolves to multiple addresses, then spamc will
           fail-over to the other addresses, if the first one cannot
           be connected to.  It will first try all addresses of one
           host before it tries the next one in the list.

However the killer bad thing for me is this:

	   Note that this fail-over behaviour is incompatible with -x;
           if that switch is used, fail-over will not occur.

I am not willing to stop filtering mail through spamassassin if my
spamd machine is unavailble for a moment, such as during a rare
reboot.  Therefore I want to use the -x option.  Otherwise if all
machines are unavailable the spam is just sent through!  I want it to
queue in that case.  The machines will come back online and then drain
the mail queue.

> I may write this patch some day, but it might be cool to have in the
> official version.

I would like to vote for this behavior of spamc to be improved as
well.  I have thought of jumping in and hacking on this but it hasn't
risen to that level of priority yet.  I don't need it for performance
yet but for reliablity and redundancy I would like to be able to use
multiple spamd spamassassin server machines.

> One of my spamd machines has only 128 megabytes RAM,
> Another machine has 256 RAM,

Sporting! :-)  But if working for you then efficient and likely a
greener solution than the power hogs that most are using.

> ...  and I have to
> shut down spamd during the weekly sa-update/sa-compile.

Weekly?  I do this daily.  The sought.cf rules are a godsend.

Bob

Re: was failsafe option, old hardware

Posted by Martin Gregorie <ma...@gregorie.org>.
On Wed, 2009-06-03 at 10:47 -0400, jp wrote:
> It's getting a little off topic, but keeping old hardware because it 
> still works can be a bit of a false economy. Yeh, it's nice to have it 
> working and useful rather than landfill. But on the other hand, they are 
> so inneficient as far as watts used, you could pay for new hardware with 
> the energy savings.
>
Remaining off-topic: 

You should really check actual power consumption rather than simply
thinking "Its an old, so it must be inefficient: DUMP IT". In fact I
think you'll find that the Intel P4 and contemporary AMD chips were much
worse power hogs than either older or newer kit.

Example: I have an IBM NetVista (P3, 866 MHz, 256 MB RAM) that I was
planning to replace for energy consumption reasons. However, before
scrapping it, I put a wattmeter upstream of it and found that, with
screen off, the wall plug was supplying just 50 watts to power it, my
ADSL modem/router, a Cat 5 network hub and a 3.5" USB drive that sits on
top of it for scheduled backups. 

By comparison the Lenovo R61i Thinkpad I'm writing this on is currently
burning 30 watts. I concluded that the energy saving from replacing the
NetVista would be very little, and maybe even an unjustifiable energy
cost if you include the energy used making its replacement. 

So, rather than replacing the NetVista I bought it an extra 256 MB RAM
(it only supports up to 0.5 GB) and will run it until something
expensive or unobtainable breaks. Meanwhile it continues to 'just run'.

Bottom line: get a wattmeter and use its readings when you're
considering energy consumption as a reason for replacing stuff.

 
Martin



Re: was failsafe option, old hardware

Posted by Jari Fredriksson <ja...@iki.fi>.
> 
> But keep in mind that newer hardware may or may not be
> more energy efficient but it has more processing power. 
> So you can use one faster newer machine with x Watt
> energy or use several x Watt older machines to do the
> same task.  
> 
> I now have a new HP DL385G5p using 80Watt running 1 linux
> server and a windows 2008 server (using ESX). 
> 

Yes, I dream about my next PC, having 2 quad core CPU's and 8-16 gigs RAM and couple terabytes disk. But the money has takers, I have also three teenagers to upkeep. They each have a computer in WLAN, and other needs.

My dream PC would virtualize all my current farm of linuces and a Windows workstation into one. But we will see when that happens... Some day.. some day.. ;)

This Pentium PRO seems to cope with Spamd about at the same rate as more powerful PC:s. Most of the time needed goes to network tests, where CPU is not so important.

Offtopic: ;)  I removed the spamc -x and everything seems to run fine now. As long as I keep at least one spamd up at all times. Little scripting and a shared file in LAN telling to the others when one is down takes it. My little machine does not do sa-update now, when it sees that the another machine is without spamd.



RE: was failsafe option, old hardware

Posted by Maurice Lucas - TAOS-IT <ms...@taos-it.nl>.
> > It's getting a little off topic, but keeping old hardware
> > because it still works can be a bit of a false economy.
> > Yeh, it's nice to have it working and useful rather than
> > landfill. But on the other hand, they are so inneficient
> > as far as watts used, you could pay for new hardware with
> > the energy savings.
> 
> Hah. The CPU does not even have a cooler on it! All there is PSU fan.
> 
> Such a machine can not waste energy, at least it does not generate
> heat..

But keep in mind that newer hardware may or may not be more energy efficient but it has more processing power.
So you can use one faster newer machine with x Watt energy or use several x Watt older machines to do the same task.

I now have a new HP DL385G5p using 80Watt running 1 linux server and a windows 2008 server (using ESX).

This server is build to be used to replace 4 old machine and be one new machine (Windows 2008) and my old machines don't use less than 20 to 40 Watt a piece.

So sometimes it is better to buy new and sometimes it is better to use old hardware.

CAVEAT: I one have installed one power supply on the moment. But normally HP have dynamic power and can "shuts down" a not used power supply.

With kind regards,
 
Maurice Lucas
 
TAOS-IT
………………………………………………………………....
Paulus Buijsstraat 191
2613 HR  Delft
www.taos-it.nl
KvK Haaglanden nr. 27254410
 
  Denk aan het milieu; is het afdrukken van deze e-mail echt noodzakelijk?


Re: was failsafe option, old hardware

Posted by John Hardin <jh...@impsec.org>.
On Wed, 3 Jun 2009, Jari Fredriksson wrote:

> Hah. The CPU does not even have a cooler on it! All there is PSU fan.
>
> Such a machine can not waste energy, at least it does not generate 
> heat..

I'd think that in Finland that would be a drawback rather than a 
benefit... :)

-- 
  John Hardin KA7OHZ                    http://www.impsec.org/~jhardin/
  jhardin@impsec.org    FALaholic #11174     pgpk -a jhardin@impsec.org
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
-----------------------------------------------------------------------
   ...to announce there must be no criticism of the President or to
   stand by the President right or wrong is not only unpatriotic and
   servile, but is morally treasonous to the American public.
                                           -- Theodore Roosevelt, 1918
-----------------------------------------------------------------------
  3 days until the 65th anniversary of D-Day

Re: was failsafe option, old hardware

Posted by Jari Fredriksson <ja...@iki.fi>.
> It's getting a little off topic, but keeping old hardware
> because it still works can be a bit of a false economy.
> Yeh, it's nice to have it working and useful rather than
> landfill. But on the other hand, they are so inneficient
> as far as watts used, you could pay for new hardware with
> the energy savings.

Hah. The CPU does not even have a cooler on it! All there is PSU fan.

Such a machine can not waste energy, at least it does not generate heat..

was failsafe option, old hardware

Posted by jp <jp...@saucer.midcoast.com>.
It's getting a little off topic, but keeping old hardware because it 
still works can be a bit of a false economy. Yeh, it's nice to have it 
working and useful rather than landfill. But on the other hand, they are 
so inneficient as far as watts used, you could pay for new hardware with 
the energy savings. It's a very similar analogy to the CFL/incandecent 
debate. You are economically and energywise better off disposing of good 
new working incandecent bulbs and replacing with CFL because the old 
bulbs will use far more energy than their worth.

We pay about $0.16/kwh, and it's worth our while to replace anything 
running a P4 or AMD 32bit processor with a new atom or amd64 processor.

On Tue, Jun 02, 2009 at 11:31:17PM +0300, Jari Fredriksson wrote:
> > If you were nearby, I'd give you a gig stick of RAM to
> > solve your problem. It's cheap these days.
> 
> I grabbed this 15 years old Pentium PRO machine from my cellar just 
> for this extra SpamAssassin process. I think EDO DRAM is not cheap, it 
> at all available these these days. Old rig, but but works find in it's 
> purpose: SpamAssassin is the only application is does ;)
> 
> cheers,
> jarif
> 
> 
> > 
> > On Tue, Jun 02, 2009 at 11:06:05PM +0300, Jari
> > Fredriksson wrote: 
> >> I have two spamd hosts, and spamc calls them seemingly
> >> random or doing some kind of load balance. -H option if
> >> I remeber right.  
> >> 
> >> Sometimes one of those are down when doing maintance or
> >> something.. 
> >> 
> >> When spamc encouters "connection refused" it keeps
> >> retrying as told with --connect-retries 
> >> 
> >> But if the connection is refused, there simply is no-one
> >> listening. How about trying the other alternatives? 
> >> 
> >> I may write this patch some day, but it might be cool to
> >> have in the official version. 
> >> 
> >> One of my spamd machines has only 128 megabytes RAM, and
> >> I have to shut down spamd during the weekly
> >> sa-update/sa-compile.  
> >> 
> >> Another machine has 256 RAM, and I have to shutdown
> >> spamd because it seems it's backup to DVD routine needs
> >> lots of ram while writing to DVD.  
> >> 
> >> If spamc could cope with these outages, there would not
> >> be a need to alter nameserver configuration, spamc just
> >> would try another name found from dns.  
> >> 
> >> How's that, folks?

-- 
/*
Jason Philbrook   |   Midcoast Internet Solutions - Wireless and DSL
    KB1IOJ        |   Broadband Internet Access, Dialup, and Hosting 
 http://f64.nu/   |   for Midcoast Maine    http://www.midcoast.com/
*/

Re: An idea for spamc (failsafe option)

Posted by Jari Fredriksson <ja...@iki.fi>.
> If you were nearby, I'd give you a gig stick of RAM to
> solve your problem. It's cheap these days.

I grabbed this 15 years old Pentium PRO machine from my cellar just for this extra SpamAssassin process. I think EDO DRAM is not cheap, it at all available these these days. Old rig, but but works find in it's purpose: SpamAssassin is the only application is does ;)

cheers,
jarif


> 
> On Tue, Jun 02, 2009 at 11:06:05PM +0300, Jari
> Fredriksson wrote: 
>> I have two spamd hosts, and spamc calls them seemingly
>> random or doing some kind of load balance. -H option if
>> I remeber right.  
>> 
>> Sometimes one of those are down when doing maintance or
>> something.. 
>> 
>> When spamc encouters "connection refused" it keeps
>> retrying as told with --connect-retries 
>> 
>> But if the connection is refused, there simply is no-one
>> listening. How about trying the other alternatives? 
>> 
>> I may write this patch some day, but it might be cool to
>> have in the official version. 
>> 
>> One of my spamd machines has only 128 megabytes RAM, and
>> I have to shut down spamd during the weekly
>> sa-update/sa-compile.  
>> 
>> Another machine has 256 RAM, and I have to shutdown
>> spamd because it seems it's backup to DVD routine needs
>> lots of ram while writing to DVD.  
>> 
>> If spamc could cope with these outages, there would not
>> be a need to alter nameserver configuration, spamc just
>> would try another name found from dns.  
>> 
>> How's that, folks?

Re: An idea for spamc (failsafe option)

Posted by jp <jp...@saucer.midcoast.com>.
If you were nearby, I'd give you a gig stick of RAM to solve your 
problem. It's cheap these days.

On Tue, Jun 02, 2009 at 11:06:05PM +0300, Jari Fredriksson wrote:
> I have two spamd hosts, and spamc calls them seemingly random or doing some kind of load balance. -H option if I remeber right.
> 
> Sometimes one of those are down when doing maintance or something..
> 
> When spamc encouters "connection refused" it keeps retrying as told with --connect-retries
> 
> But if the connection is refused, there simply is no-one listening. How about trying the other alternatives?
> 
> I may write this patch some day, but it might be cool to have in the official version.
> 
> One of my spamd machines has only 128 megabytes RAM, and I have to shut down spamd during the weekly sa-update/sa-compile.
> 
> Another machine has 256 RAM, and I have to shutdown spamd because it seems it's backup to DVD routine needs lots of ram while writing to DVD.
> 
> If spamc could cope with these outages, there would not be a need to alter nameserver configuration, spamc just would try another name found from dns.
> 
> How's that, folks?
> 
> 
> 

-- 
/*
Jason Philbrook   |   Midcoast Internet Solutions - Wireless and DSL
    KB1IOJ        |   Broadband Internet Access, Dialup, and Hosting 
 http://f64.nu/   |   for Midcoast Maine    http://www.midcoast.com/
*/