less spam with spamd and pf
untested but should be pretty close##Assumes Freebsd built with postfix and pf:##requires spamd#Add line to /etc/fstab# Device Mountpoint FStype Options Dump Passfdescfs /dev/fd fdecfs rw 0 0# mount...
View ArticleMostly functional email regex
for word based delims in text:em = re.compile(r"\b['A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b", re.IGNORECASE)for start and endline delims:em = re.compile(r"^['A-Z0-9._%-]+@[A-Z0-9.-]+\.[A-Z]{2,4}$",...
View ArticleQuick and dirty regexen search for spamd & postfix logs
#!/usr/bin/env python#-------------------------------------------------------------# Name: finder.py# Purpose: This is a script to search through Posfix # and spamd logs for the last x days and return...
View ArticlePlone site broken? Fix ir through the zodb
Today someone changed the ip on a dev box running an instance that had the ip as part of the url in CacheFu. So of course it won't load a page anymore. What to do? reinstall? nah. Let 's think for a...
View Articleipython in zopectl debug
A long time ago (6mos? a year) I got tired of manually typing support for history and tab completion into the zope debugger. So I just hooked the debug command up to read my .pythonrc file by importing...
View Articleipython in zope3 zopectl debug
The solution in my earlier post doesn't fly in zope3. To get it to work in zope3 I modified:~/instances/z3/bin/debugzopeif __name__ == '__main__': db = startup() del startup from zope.app.debug import...
View ArticlePasswordless Unix Login
Create a key pairmack:~ reedobrien$ ssh-keygen -t rsa -f ~/.ssh/id_rsaGenerating public/private rsa key pair.Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification...
View ArticleUndoing transactions in a broken Plone/Zope
Today there was a situation where someone made a permission change that made Plone inaccessible. The ZMI was also inaccessible (by design (not mine)). We could get access to the filesystem, however. So...
View ArticleBuild PIL on Mac OSX
This entry attempts to give instructions for how to build the Python Imaging Library (PIL) on Mac OSX.#download and untar the jpeg library#see here for location http://www.ijg.org/curl...
View ArticleMigrate a Subversion Sub Repository
Migrate SVNDescription:Instructions to migrate a sub repository to it's own repository.Get a copy of the repo: cp -r me@myserver:/usr/local/data/svn/myrepo .Dump it:svnadmin dump --quiet myrepo >...
View ArticleServing up a ZODB on demand from a repozo backup
Since I said I would on the mailing list/forum.Here it is:import osimport shutilimport tarfileimport tempfiledef application(environ, start_response): status = '200 OK' tempdir = tempfile.mkdtemp()...
View ArticleSeeded (Salted) SHA Passwords
This week I needed to work with passwords from an OpenLDAP database. I needed to create users and encode their passwords as SSHA. After much googling and reading of authentication code examples, this...
View ArticleApache Round Robin for ZeoClients
There is a common approach to running Plone/Zope behind some service that distributes requests across numerous ZeoClients. Here's how I have been doing it using Apache (2.2.x). ________Zeoclient(6968)...
View ArticleError building psycopg custom egg
I was running a buildout and got this error:/psycopg/config.h:119: error: static declaration of 'round' follows non-static declarationI know little to nothing about C so I asked Chris Shenton. He said,...
View ArticleMapping specific requests to a single ZEO client instance
As a follow up to Apache Round Robin for ZeoClients: we needed to send session specific things to a single instance.An example of why this is necessary is for collective.captcha. If the connections are...
View ArticleAquamacs and Python
Aquamacs with Python completion and ipythonInstall Pymacs (python setup.py install) Make sure you have pymac-services and rebox in your PATH. They install where the python binaries are.Install...
View Articlecreate an installer dmg of a program
Open the PackageMaker program.Click "Assist me..."Add the files you want to install and give them a destination on the destination drive.Select files appropriate for a Welcome page, README, license,...
View ArticleUsing a TCP proxy to bypass firewall
In the middle of a month long holiday in Africa, I finally am at a place where I can connect my notebook to the internet. I have been able to get to my mail via webmail, but I don't have all the...
View Article
More Pages to Explore .....