PF spamd : trouble with homemade blacklist

2006-05-26 Thread Alexis Dorais-Joncas

Hey all,

I have been running spamd from OpenBSD on :

FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov  3 
09:36:13 UTC 2005 [EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  
i386


for a while now, and I just encountered a small problem.

I want to create a home-made blacklist so that all connexions made from 
any of the addresses to my port 25 are tarpitted. However, even if the 
address is added in the spamd table by spamd-setup, new connexions 
still show up as grey, instead of being spotted as being blacklisted 
and then tarpitted.


Here is the relevent configs, followed by evidence of the problem. Hope 
someone can point me to a solution !


-
spamd.conf: (comments trimmed out)
-
all:\
   spews1:beck:blackl
spews1:\
   :black:\
   :msg=SPAM. Your address %A is in the spews level 1 database\n\
   See http://www.spews.org/ask.cgi?x=%A for more details:\
   :method=http:\
   :file=www.openbsd.org/spamd/spews_list_level1.txt.gz:


# Provided by Bob Beck at the University of Alberta
beck:\
  :black:\
  :msg=SPAM. Your address %A appears in a list of known spammers:\
  :method=http:\
  :file=(location hidden):

blackl:\
   :black:\
   :msg=SPAM. Your address %A appears in my homemade list of known 
spammers:\

   :file=/var/mail/blacklist.txt:

-
pf.conf
-
[...]
table spamd persist
table spamd-white persist
table spamd-mywhite persist file /var/mail/whitelist.txt

rdr pass inet proto tcp from spamd-mywhite to any port smtp - 
127.0.0.1 port smtp
rdr pass inet proto tcp from spamd to any port smtp - 127.0.0.1 port 
spamd
rdr pass inet proto tcp from !spamd-white to any port smtp - 
127.0.0.1 port spamd

[...]

-
/var/mail/blacklist.txt
-
(only one single line, no empty line at the end)
83.100.146.104

-
spamd-setup output :
-
[EMAIL PROTECTED] sudo spamd-setup -d
Getting http://www.openbsd.org/spamd/spews_list_level1.txt.gz
blacklist spews1 14939 entries
Getting http://www.[location hidden]
blacklist beck 17251 entries
blacklist blackl 1 entries
-

We see here that the IP address is effectively added to the spamd 
table, and the daemon should know that it is blacklisted :

[EMAIL PROTECTED] sudo pfctl -t spamd -vTshow|grep -A5 83.100.146.104
No ALTQ support in kernel
ALTQ related functions disabled
  83.100.146.104
   Cleared: Fri May 26 10:43:24 2006
   In/Block:[ Packets: 0  Bytes: 
0  ]
   In/Pass: [ Packets: 30 Bytes: 
1568   ]
   Out/Block:   [ Packets: 0  Bytes: 
0  ]
   Out/Pass:[ Packets: 30 Bytes: 
2280   ]

-

However, logs show that when an incoming connexion is made, instead of 
being tarpitted, it is treated as a normal one and is considered grey :

May 26 10:55:05 g-noc spamd[85889]: 83.100.146.104: connected (1/0)
May 26 10:55:06 g-noc spamd[85889]: (GREY) 83.100.146.104:  - 
[EMAIL PROTECTED]
May 26 10:55:06 g-noc spamd[85889]: 83.100.146.104: disconnected after 1 
seconds.


$ spamdb |grep 83.100.146.104
GREY|83.100.146.104||[EMAIL PROTECTED]|1148654694|1148669094|1148669094|4|0

So, my question is : how can I create a list that spamd will know about 
and will tarpit every connexion with a source address contained in the 
list and with destination port = 25 ? I'm sure I'm very close, but I 
have been trying for a while now and can't figure this one out.


Thanks for any help you guys can provide !

Alexis

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to install the same port twice but at different locations?

2006-12-08 Thread Alexis Dorais-Joncas

Hi all,

Subject says it all. I would like to install the package phpMyAdmin on 
two different locations on my server. Is this doable? If so, how?


I'm using  FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu 
Nov  3 09:36:13 UTC 2005 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386 with ports 
updated daily with cvsup.


Right now, after I do :
cd  /usr/ports/databases/phpmyadmin
sudo make PREFIX=/xxx/yyy install

I get :
pkg_info|grep Admin
phpMyAdmin-2.9.1.1  A set of PHP-scripts to manage MySQL over the web

And when I try to install it again but using a different PREFIX, I get 
this :

===  Checking if databases/phpmyadmin already installed
===   phpMyAdmin-2.9.1.1 is already installed
 You may wish to ``make deinstall'' and install this port again

Using FORCE_PKG_REGISTER unregisters the first installation, so its no 
good for this I guess.


Thanks in advance,
Alexis
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to install the same port twice but at different locations?

2006-12-08 Thread Alexis Dorais-Joncas

Lane a écrit :

On Friday 08 December 2006 13:58, Alexis Dorais-Joncas wrote:
  

Hi all,

Subject says it all. I would like to install the package phpMyAdmin on
two different locations on my server. Is this doable? If so, how?

I'm using  FreeBSD g-noc.net 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu
Nov  3 09:36:13 UTC 2005
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/GENERIC  i386 with ports
updated daily with cvsup.

Right now, after I do :
cd  /usr/ports/databases/phpmyadmin
sudo make PREFIX=/xxx/yyy install

I get :
pkg_info|grep Admin
phpMyAdmin-2.9.1.1  A set of PHP-scripts to manage MySQL over the web

And when I try to install it again but using a different PREFIX, I get
this :
===  Checking if databases/phpmyadmin already installed
===   phpMyAdmin-2.9.1.1 is already installed
  You may wish to ``make deinstall'' and install this port again

Using FORCE_PKG_REGISTER unregisters the first installation, so its no
good for this I guess.

Thanks in advance,
Alexis
___


Alexis,

Read through the porters' handbook, 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/.


You are interested primarily in PREFIX and DESTDIR, but all of the text up to 
that point is enlightening.


lane
  

Hi Lane,
I think you misunderstood my problem. I know how to install a port to a 
specific location using PREFIX. What I want to achieve is to have one 
port installed twice. For example, I want one whole instance of 
phpMyAdmin to be in /var/www/ and a whole other one in /home/someuser/. 
And I want both instances to be manageable with the package tools (such 
as portupgrade) in order to keep both updated easily.


Or have I totally missed the point with PREFIX/DESTDIR ?

Thanx!
Alexis
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to install the same port twice but at different locations?

2006-12-08 Thread Alexis Dorais-Joncas


John Nielsen wrote:
What I have done in the past is create slave ports. Say the port you want to 
install twice is in ports/category/foo. Make a new directory 
ports/category/bar. Inside that directory, create a Makefile similar to this:


PORTNAME=   foo
PKGNAMESUFFIX=  _bar-duplicate
COMMENT=This is the foo port but it installs as 
foo_bar-duplicate
PREFIX= /path/to/alternate/prefix
# ...you may want other options here ...

MASTERDIR=  ${.CURDIR}/../foo

.include ${MASTERDIR}/Makefile


Install once from category/foo and once from your new port's directory and 
away you go. Again, the porter's handbook has lots of useful information 
about everything above.


JN

  
This seems to do the trick perfectly. Thanks all for your fast input, I 
appreciate it very much !


Alexis
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]