Re: spamd nixspam.gz not found

2009-06-27 Thread Daniel Gracia Garallar
Talking about wget... Wouldn't be more convenient calling 'ftp 
http://www.blahblah.net/myitem.gz'?


I use to recover files that way; works like a charm and allows getting 
files from http servers without installing any ports/packages.


Regards,

Dani

patrick keshishian escribiC3:

On Wed, Jun 24, 2009 at 4:33 AM, Rod Whitworthglis...@witworx.com wrote:

On Wed, 24 Jun 2009 07:57:16 -0300, Jose Fragoso wrote:


Hi,

Actually, it is still there. But the format has changed
and spamd is not being able to handle it because the IP
address is now in the second column, like in:

2009-06-24T12:28+0200 117.199.144.132

So, for the time being, the best thing to do is to use
wrapper script.

Regards,


Yep.
Some time ago I ran into probs using the okean lists and I recently was
bitten by this one.

My solution was/is to set up spamd.conf to find those data by using the
'file method'.
I do this because a failed fetch leaves the relevant filter without
data.

So I have cronjobs to fetch the data and format it if necessary, as in:
26 B  B  B 14 B  B  B * B  B  B  * B  B  B  * B  B  B  /root/bin/okean
that only needs to be updated once a day as it is slow to change.
and:
31 B  B  B * B  B  B  * B  B  B  * B  B  B  * B  B  B  /root/bin/nixpix
so that:
37 B  B  B * B  B  B  * B  B  B  * B  B  B  * B  B  B 

/usr/libexec/spamd-setup

works properly.

okean:
#!/bin/sh
ftp -o /var/db/china.txt http://www.okean.com/chinacidr.txt
ftp -o /var/db/korea.txt http://www.okean.com/koreacidr.txt

nixpix:
#!/bin/sh
cd /root/data
rm -f nixspam
/usr/local/bin/wget -q www.openbsd.org/spamd/nixspam.gz
if [ $? -eq 0 ] ; then
B  B  B  B gunzip nixspam.gz
B  B  B  B cut -d   -f 2 nixspam /var/db/nixspam
fi
exit

spamd.conf points at the outputs of those scripts.

If any of those fetches fails, the previous data is still in place to
maintain spamd when it runs each hour.


Umm... you are explicitly doing and 'rm -f nixspam' in your script before
wget.

--patrick




Re: spamd nixspam.gz not found

2009-06-25 Thread Rod Whitworth
Some interspersed new text. IMPORTANT for anybody copying scripts.

On Wed, 24 Jun 2009 05:19:07 -0700, patrick keshishian wrote:

On Wed, Jun 24, 2009 at 4:33 AM, Rod Whitworthglis...@witworx.com wrote:
 On Wed, 24 Jun 2009 07:57:16 -0300, Jose Fragoso wrote:

Hi,

Actually, it is still there. But the format has changed
and spamd is not being able to handle it because the IP
address is now in the second column, like in:

2009-06-24T12:28+0200 117.199.144.132

So, for the time being, the best thing to do is to use
wrapper script.

Regards,


 Yep.
 Some time ago I ran into probs using the okean lists and I recently was
 bitten by this one.

 My solution was/is to set up spamd.conf to find those data by using the
 'file method'.
 I do this because a failed fetch leaves the relevant filter without
 data.

 So I have cronjobs to fetch the data and format it if necessary, as in:
 26 B  B  B 14 B  B  B * B  B  B  * B  B  B  * B  B  B  /root/bin/okean
 that only needs to be updated once a day as it is slow to change.
 and:
 31 B  B  B * B  B  B  * B  B  B  * B  B  B  * B  B  B  /root/bin/nixpix
 so that:
 37 B  B  B * B  B  B  * B  B  B  * B  B  B  * B  B  B 
/usr/libexec/spamd-setup
 works properly.

 okean:
 #!/bin/sh
 ftp -o /var/db/china.txt http://www.okean.com/chinacidr.txt
 ftp -o /var/db/korea.txt http://www.okean.com/koreacidr.txt


THIS ONE CHANGES:
 nixpix:
 #!/bin/sh
 cd /root/data
 rm -f nixspam
 /usr/local/bin/wget -q www.openbsd.org/spamd/nixspam.gz
 if [ $? -eq 0 ] ; then
 B  B  B  B gunzip nixspam.gz
 B  B  B  B cut -d   -f 2 nixspam /var/db/nixspam
 fi
 exit
The cut line now becomes: 
cut -d   -f 1 nixspam /var/db/nixspam
because the format has reverted to having the IP address in the first
field.


 spamd.conf points at the outputs of those scripts.

 If any of those fetches fails, the previous data is still in place to
 maintain spamd when it runs each hour.

Umm... you are explicitly doing and 'rm -f nixspam' in your script before
wget.

Yes. Note that the operation is taking place in /root/data/ and the
output goes to /var/db/ so I am not killing my list that is used by
spamd-setup. Easy to miss when you didn't write it ;-)
I could have done wget with a -O filename I suppose, but I chose not
to. I'd really rather ftp the file but it is not available that way.

--patrick

Rod/


*** NOTE *** Please DO NOT CC me. I am subscribed to the list.
Mail to the sender address that does not originate at the list server is 
tarpitted. The reply-to: address is provided for those who feel compelled to 
reply off list. Thankyou.

Rod/
/earth: write failed, file system is full
cp: /earth/creatures: No space left on device



Re: spamd nixspam.gz not found

2009-06-25 Thread Peter N. M. Hansteen
On Thu, Jun 25, 2009 at 04:55:57PM +1000, Rod Whitworth wrote:

  /usr/local/bin/wget -q www.openbsd.org/spamd/nixspam.gz
[ snip ]

 to. I'd really rather ftp the file but it is not available that way.

ftp works from here - 

pe...@skapet:~$ ftp http://www.openbsd.org/spamd/nixspam.gz
Trying 129.128.5.191...
Requesting http://www.openbsd.org/spamd/nixspam.gz
100% 
|***|
   255 KB00:03
Successfully retrieved file.

or did I thoroughly miss a clue?

- P

-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
Remember to set the evil bit on all malicious network traffic
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.



Re: spamd nixspam.gz not found

2009-06-25 Thread Rod Whitworth
On Thu, 25 Jun 2009 10:26:48 +0200, Peter N. M. Hansteen wrote:

or did I thoroughly miss a clue?

No. I did. I forgot (until reading your note) that pkg_add mentioned
using that capability some time in the past.

I tried doing ftp to the page (must have been some trace of memory
there) but omitted the http:// prefix.

Thanx for the heads up.
R/
PS: Will I see you at EuroBSD Con this year?
*** NOTE *** Please DO NOT CC me. I am subscribed to the list.
Mail to the sender address that does not originate at the list server is 
tarpitted. The reply-to: address is provided for those who feel compelled to 
reply off list. Thankyou.

Rod/
/earth: write failed, file system is full
cp: /earth/creatures: No space left on device



Re: spamd nixspam.gz not found

2009-06-24 Thread Jose Fragoso
Hi,

Actually, it is still there. But the format has changed
and spamd is not being able to handle it because the IP
address is now in the second column, like in:

2009-06-24T12:28+0200 117.199.144.132

So, for the time being, the best thing to do is to use
wrapper script.

Regards,

Jose

--
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com



Re: spamd nixspam.gz not found

2009-06-24 Thread patrick keshishian
On Wed, Jun 24, 2009 at 3:57 AM, Jose Fragosoinet_use...@samerica.com wrote:
 Hi,

 Actually, it is still there. But the format has changed
 and spamd is not being able to handle it because the IP
 address is now in the second column, like in:

 2009-06-24T12:28+0200 117.199.144.132

 So, for the time being, the best thing to do is to use
 wrapper script.

I'm not sure if that is entirely true:

$ ftp 'http://www.openbsd.org/spamd/nixspam.gz'
Trying 129.128.5.191...
Requesting http://www.openbsd.org/spamd/nixspam.gz
ftp: Error retrieving file: 404 Not Found

I believe the file was there earlier though, and it has been there
sporadically the past couple of days since you've seen people write to
the list about it.

--patrick




 Regards,

 Jose

 --
 Be Yourself @ mail.com!
 Choose From 200+ Email Addresses
 Get a Free Account at www.mail.com



Re: spamd nixspam.gz not found

2009-06-24 Thread Rod Whitworth
On Wed, 24 Jun 2009 07:57:16 -0300, Jose Fragoso wrote:

Hi,

Actually, it is still there. But the format has changed
and spamd is not being able to handle it because the IP
address is now in the second column, like in:

2009-06-24T12:28+0200 117.199.144.132

So, for the time being, the best thing to do is to use
wrapper script.

Regards,


Yep.
Some time ago I ran into probs using the okean lists and I recently was
bitten by this one.

My solution was/is to set up spamd.conf to find those data by using the
'file method'.
I do this because a failed fetch leaves the relevant filter without
data.

So I have cronjobs to fetch the data and format it if necessary, as in:
26  14  *   *   *   /root/bin/okean 
that only needs to be updated once a day as it is slow to change.
and:
31  *   *   *   *   /root/bin/nixpix
so that:
37  *   *   *   *   /usr/libexec/spamd-setup
works properly.

okean:
#!/bin/sh
ftp -o /var/db/china.txt http://www.okean.com/chinacidr.txt
ftp -o /var/db/korea.txt http://www.okean.com/koreacidr.txt

nixpix:
#!/bin/sh
cd /root/data
rm -f nixspam
/usr/local/bin/wget -q www.openbsd.org/spamd/nixspam.gz
if [ $? -eq 0 ] ; then
gunzip nixspam.gz
cut -d   -f 2 nixspam /var/db/nixspam
fi
exit

spamd.conf points at the outputs of those scripts.

If any of those fetches fails, the previous data is still in place to
maintain spamd when it runs each hour.

Quick and dirty but it got the job done.

R/

*** NOTE *** Please DO NOT CC me. I am subscribed to the list.
Mail to the sender address that does not originate at the list server is 
tarpitted. The reply-to: address is provided for those who feel compelled to 
reply off list. Thankyou.

Rod/
/earth: write failed, file system is full
cp: /earth/creatures: No space left on device



Re: spamd nixspam.gz not found

2009-06-24 Thread patrick keshishian
On Wed, Jun 24, 2009 at 4:33 AM, Rod Whitworthglis...@witworx.com wrote:
 On Wed, 24 Jun 2009 07:57:16 -0300, Jose Fragoso wrote:

Hi,

Actually, it is still there. But the format has changed
and spamd is not being able to handle it because the IP
address is now in the second column, like in:

2009-06-24T12:28+0200 117.199.144.132

So, for the time being, the best thing to do is to use
wrapper script.

Regards,


 Yep.
 Some time ago I ran into probs using the okean lists and I recently was
 bitten by this one.

 My solution was/is to set up spamd.conf to find those data by using the
 'file method'.
 I do this because a failed fetch leaves the relevant filter without
 data.

 So I have cronjobs to fetch the data and format it if necessary, as in:
 26 B  B  B 14 B  B  B * B  B  B  * B  B  B  * B  B  B  /root/bin/okean
 that only needs to be updated once a day as it is slow to change.
 and:
 31 B  B  B * B  B  B  * B  B  B  * B  B  B  * B  B  B  /root/bin/nixpix
 so that:
 37 B  B  B * B  B  B  * B  B  B  * B  B  B  * B  B  B 
/usr/libexec/spamd-setup
 works properly.

 okean:
 #!/bin/sh
 ftp -o /var/db/china.txt http://www.okean.com/chinacidr.txt
 ftp -o /var/db/korea.txt http://www.okean.com/koreacidr.txt

 nixpix:
 #!/bin/sh
 cd /root/data
 rm -f nixspam
 /usr/local/bin/wget -q www.openbsd.org/spamd/nixspam.gz
 if [ $? -eq 0 ] ; then
 B  B  B  B gunzip nixspam.gz
 B  B  B  B cut -d   -f 2 nixspam /var/db/nixspam
 fi
 exit

 spamd.conf points at the outputs of those scripts.

 If any of those fetches fails, the previous data is still in place to
 maintain spamd when it runs each hour.

Umm... you are explicitly doing and 'rm -f nixspam' in your script before
wget.

--patrick