From sodarock at gmail.com Fri Dec 1 03:08:48 2006 From: sodarock at gmail.com (John Villalovos) Date: Fri, 1 Dec 2006 00:08:48 -0800 Subject: [Pymilter] Is project still active/alive? In-Reply-To: References: <5e61b72f0611282159g7adeb22dhb59dee737c8e4adc@mail.gmail.com> Message-ID: <5e61b72f0612010008p2bb4dcddl57ac2fe4e132d915@mail.gmail.com> On 11/29/06, Stuart D. Gathman wrote: > Are you using the Milter module with your own milter script, or using the > bms.py script? I haven't yet tried it out. Haven't had time yet. Thanks, John From lists at designmedia.com Fri Dec 15 14:58:08 2006 From: lists at designmedia.com (Henry Kwan) Date: Fri, 15 Dec 2006 11:58:08 -0800 (PST) Subject: [Pymilter] Python 2.4 for CentOS 4.4? Message-ID: <1623.192.168.1.231.1166212688.squirrel@webmail.designmedia.com> Hi, Thanks to Stuart for pointing me to his pymilter package(s). I'm looking them over now and it seems that they require Python 2.4, which is not included with my CentOS 4.4 distribution. Some googling turned up some warnings about installing Python 2.4 because it breaks a lot of apps including yum. So is there a way to install Python 2.4 just for pymilter while preserving Python 2.3 for everything else in the system? Thanks. From stuart at bmsi.com Fri Dec 15 18:47:28 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Fri, 15 Dec 2006 18:47:28 -0500 (EST) Subject: [Pymilter] Python 2.4 for CentOS 4.4? In-Reply-To: <1623.192.168.1.231.1166212688.squirrel@webmail.designmedia.com> Message-ID: On Fri, 15 Dec 2006, Henry Kwan wrote: > Thanks to Stuart for pointing me to his pymilter package(s). I'm looking > them over now and it seems that they require Python 2.4, which is not > included with my CentOS 4.4 distribution. Some googling turned up some > warnings about installing Python 2.4 because it breaks a lot of apps > including yum. > > So is there a way to install Python 2.4 just for pymilter while preserving > Python 2.3 for everything else in the system? Absolutely. Get the python2.4-2.4.4c1 SRPM from python.org, and compile it on CentOS. I run it on all our CentOS systems. It installs separately from the default python, and is invoked as 'python2.4'. Option 2 - the main 2.4 only feature is the log module. I used that in bms.py rather than roll my own to keep log entries from getting tangled. If you replace that with a naive log() function, you can run with 2.3. Option 3 - You don't need 2.4 if you are rolling your own milter script using the Milter module. Option 4 - You actually *can* install python2.4 as the system default, once you get all the system python bindings rebuilt - rpm-python, etc. :-) :-) At that point, you effectively have a new distro, and have to keep up with security patches for all the rpms you've touched. (Lots of them.) (Recommended for gurus only.) -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From sodarock at gmail.com Sat Dec 16 17:06:41 2006 From: sodarock at gmail.com (John Villalovos) Date: Sat, 16 Dec 2006 14:06:41 -0800 Subject: [Pymilter] Python 2.4 for CentOS 4.4? In-Reply-To: References: <1623.192.168.1.231.1166212688.squirrel@webmail.designmedia.com> Message-ID: <5e61b72f0612161406k19a326f0qa0da8d87100ca197@mail.gmail.com> On 12/15/06, Stuart D. Gathman wrote: > Absolutely. Get the python2.4-2.4.4c1 SRPM from python.org, and compile > it on CentOS. I run it on all our CentOS systems. It installs separately > from the default python, and is invoked as 'python2.4'. So where exactly is this python SRPM? I looked on Python.org and couldn't seem to find it. I looked in the download section. John From sodarock at gmail.com Sat Dec 16 17:15:14 2006 From: sodarock at gmail.com (John Villalovos) Date: Sat, 16 Dec 2006 14:15:14 -0800 Subject: [Pymilter] Python 2.4 for CentOS 4.4? In-Reply-To: <5e61b72f0612161406k19a326f0qa0da8d87100ca197@mail.gmail.com> References: <1623.192.168.1.231.1166212688.squirrel@webmail.designmedia.com> <5e61b72f0612161406k19a326f0qa0da8d87100ca197@mail.gmail.com> Message-ID: <5e61b72f0612161415l27de3fdft78a8da6e6a3e2890@mail.gmail.com> On 12/16/06, John Villalovos wrote: > So where exactly is this python SRPM? I looked on Python.org and > couldn't seem to find it. I looked in the download section. Answering my own question, I think: http://www.python.org/download/releases/2.4.4/rpms/ The python24-2.4.2-2.src.rpm is there. So not exactly the same SRPM that Stuart mentioned. John From stuart at bmsi.com Sat Dec 16 17:55:02 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Sat, 16 Dec 2006 17:55:02 -0500 (EST) Subject: [Pymilter] Python 2.4 for CentOS 4.4? In-Reply-To: <5e61b72f0612161406k19a326f0qa0da8d87100ca197@mail.gmail.com> Message-ID: On Sat, 16 Dec 2006, John Villalovos wrote: > On 12/15/06, Stuart D. Gathman wrote: > > Absolutely. Get the python2.4-2.4.4c1 SRPM from python.org, and compile > > it on CentOS. I run it on all our CentOS systems. It installs separately > > from the default python, and is invoked as 'python2.4'. > > So where exactly is this python SRPM? I looked on Python.org and > couldn't seem to find it. I looked in the download section. It seems to have disappeared. I am attaching the spec file. Just add the source tarball from python.org, and build it. Actually, it looks like I took the SRPM you found, and just substituted the latest source tarball. But I'll attach my spec file anyway. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. -------------- next part -------------- ########################## # User-modifiable configs ########################## # Is the resulting package and the installed binary named "python" or # "python2"? #WARNING: Commenting out doesn't work. Last line is what's used. %define config_binsuffix none %define config_binsuffix 2.4 # Build tkinter? "auto" enables it if /usr/bin/wish exists. #WARNING: Commenting out doesn't work. Last line is what's used. %define config_tkinter no %define config_tkinter yes %define config_tkinter auto # Use pymalloc? The last line (commented or not) determines wether # pymalloc is used. #WARNING: Commenting out doesn't work. Last line is what's used. %define config_pymalloc no %define config_pymalloc yes # Enable IPV6? #WARNING: Commenting out doesn't work. Last line is what's used. %define config_ipv6 yes %define config_ipv6 no # Location of the HTML directory. %define config_htmldir /var/www/html/python ################################# # End of user-modifiable configs ################################# %define name python %define version 2.4.4c1 %define libvers 2.4 %define release 1pydotorg %define __prefix /usr # kludge to get around rpm define weirdness %define ipv6 %(if [ "%{config_ipv6}" = yes ]; then echo --enable-ipv6; else echo --disable-ipv6; fi) %define pymalloc %(if [ "%{config_pymalloc}" = yes ]; then echo --with-pymalloc; else echo --without-pymalloc; fi) %define binsuffix %(if [ "%{config_binsuffix}" = none ]; then echo ; else echo "%{config_binsuffix}"; fi) %define include_tkinter %(if [ \\( "%{config_tkinter}" = auto -a -f /usr/bin/wish \\) -o "%{config_tkinter}" = yes ]; then echo 1; else echo 0; fi) %define libdirname %(( uname -m | egrep -q '_64$' && [ -d /usr/lib64 ] && echo lib64 ) || echo lib) # detect if documentation is available %define include_docs %(if [ -f "%{_sourcedir}/html-%{version}.tar.bz2" ]; then echo 1; else echo 0; fi) Summary: An interpreted, interactive, object-oriented programming language. Name: %{name}%{binsuffix} Version: %{version} Release: %{release} Copyright: Modified CNRI Open Source License Group: Development/Languages Source: Python-%{version}.tar.bz2 %if %{include_docs} Source1: html-%{version}.tar.bz2 %endif BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildPrereq: expat-devel BuildPrereq: db4-devel BuildPrereq: gdbm-devel BuildPrereq: tcl-devel BuildPrereq: tk-devel Prefix: %{__prefix} Packager: Sean Reifschneider %description Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Python combines remarkable power with very clear syntax. It has interfaces to many system calls and libraries, as well as to various window systems, and is extensible in C or C++. It is also usable as an extension language for applications that need a programmable interface. Finally, Python is portable: it runs on many brands of UNIX, on PCs under Windows, MS-DOS, and OS/2, and on the Mac. %package devel Summary: The libraries and header files needed for Python extension development. Prereq: python%{binsuffix} = %{PACKAGE_VERSION} Group: Development/Libraries %description devel The Python programming language's interpreter can be extended with dynamically loaded extensions and can be embedded in other programs. This package contains the header files and libraries needed to do these types of tasks. Install python-devel if you want to develop Python extensions. The python package will also need to be installed. You'll probably also want to install the python-docs package, which contains Python documentation. %if %{include_tkinter} %package tkinter Summary: A graphical user interface for the Python scripting language. Group: Development/Languages Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release} %description tkinter The Tkinter (Tk interface) program is an graphical user interface for the Python scripting language. You should install the tkinter package if you'd like to use a graphical user interface for Python programming. %endif %package tools Summary: A collection of development tools included with Python. Group: Development/Tools Prereq: python%{binsuffix} = %{PACKAGE_VERSION}-%{release} %description tools The Python package includes several development tools that are used to build python programs. This package contains a selection of those tools, including the IDLE Python IDE. Install python-tools if you want to use these tools to develop Python programs. You will also need to install the python and tkinter packages. %if %{include_docs} %package docs Summary: Python-related documentation. Group: Development/Documentation %description docs Documentation relating to the Python programming language in HTML and info formats. %endif %changelog * Tue Oct 19 2004 Sean Reifschneider [2.4b1-1pydotorg] - Updating to 2.4. * Thu Jul 22 2004 Sean Reifschneider [2.3.4-3pydotorg] - Paul Tiemann fixes for %{prefix}. - Adding permission changes for directory as suggested by reimeika.ca - Adding code to detect when it should be using lib64. - Adding a define for the location of /var/www/html for docs. * Thu May 27 2004 Sean Reifschneider [2.3.4-2pydotorg] - Including changes from Ian Holsman to build under Red Hat 7.3. - Fixing some problems with the /usr/local path change. * Sat Mar 27 2004 Sean Reifschneider [2.3.2-3pydotorg] - Being more agressive about finding the paths to fix for #!/usr/local/bin/python. * Sat Feb 07 2004 Sean Reifschneider [2.3.3-2pydotorg] - Adding code to remove "#!/usr/local/bin/python" from particular files and causing the RPM build to terminate if there are any unexpected files which have that line in them. * Mon Oct 13 2003 Sean Reifschneider [2.3.2-1pydotorg] - Adding code to detect wether documentation is available to build. * Fri Sep 19 2003 Sean Reifschneider [2.3.1-1pydotorg] - Updating to the 2.3.1 release. * Mon Feb 24 2003 Sean Reifschneider [2.3b1-1pydotorg] - Updating to 2.3b1 release. * Mon Feb 17 2003 Sean Reifschneider [2.3a1-1] - Updating to 2.3 release. * Sun Dec 23 2001 Sean Reifschneider [Release 2.2-2] - Added -docs package. - Added "auto" config_tkinter setting which only enables tk if /usr/bin/wish exists. * Sat Dec 22 2001 Sean Reifschneider [Release 2.2-1] - Updated to 2.2. - Changed the extension to "2" from "2.2". * Tue Nov 18 2001 Sean Reifschneider [Release 2.2c1-1] - Updated to 2.2c1. * Thu Nov 1 2001 Sean Reifschneider [Release 2.2b1-3] - Changed the way the sed for fixing the #! in pydoc works. * Wed Oct 24 2001 Sean Reifschneider [Release 2.2b1-2] - Fixed missing "email" package, thanks to anonymous report on sourceforge. - Fixed missing "compiler" package. * Mon Oct 22 2001 Sean Reifschneider [Release 2.2b1-1] - Updated to 2.2b1. * Mon Oct 9 2001 Sean Reifschneider [Release 2.2a4-4] - otto at balinor.mat.unimi.it mentioned that the license file is missing. * Sun Sep 30 2001 Sean Reifschneider [Release 2.2a4-3] - Ignacio Vazquez-Abrams pointed out that I had a spruious double-quote in the spec files. Thanks. * Wed Jul 25 2001 Sean Reifschneider [Release 2.2a1-1] - Updated to 2.2a1 release. - Changed idle and pydoc to use binsuffix macro ####### # PREP ####### %prep %setup -n Python-%{version} ######## # BUILD ######## %build ./configure --enable-unicode=ucs4 %{ipv6} %{pymalloc} --prefix=%{__prefix} make ########## # INSTALL ########## %install # set the install path echo '[install_scripts]' >setup.cfg echo 'install_dir='"${RPM_BUILD_ROOT}%{__prefix}/bin" >>setup.cfg [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers}/lib-dynload make prefix=$RPM_BUILD_ROOT%{__prefix} install # REPLACE PATH IN PYDOC if [ ! -z "%{binsuffix}" ] then ( cd $RPM_BUILD_ROOT%{__prefix}/bin mv pydoc pydoc.old sed 's|#!.*|#!%{__prefix}/bin/env python'%{binsuffix}'|' \ pydoc.old >pydoc chmod 755 pydoc rm -f pydoc.old ) fi # add the binsuffix if [ ! -z "%{binsuffix}" ] then ( cd $RPM_BUILD_ROOT%{__prefix}/bin; rm -f python[0-9a-zA-Z]*; mv -f python python"%{binsuffix}" ) ( cd $RPM_BUILD_ROOT%{__prefix}/man/man1; mv python.1 python%{binsuffix}.1 ) ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f pydoc pydoc"%{binsuffix}" ) ( cd $RPM_BUILD_ROOT%{__prefix}/bin; mv -f idle idle"%{binsuffix}" ) fi ######## # Tools echo '#!/bin/bash' >${RPM_BUILD_ROOT}%{__prefix}/bin/idle%{binsuffix} echo 'exec %{__prefix}/bin/python%{binsuffix} %{__prefix}/%{libdirname}/python%{libvers}/idlelib/idle.py' >>$RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix} chmod 755 $RPM_BUILD_ROOT%{__prefix}/bin/idle%{binsuffix} cp -a Tools $RPM_BUILD_ROOT%{__prefix}/%{libdirname}/python%{libvers} # MAKE FILE LISTS rm -f mainpkg.files find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/lib-dynload -type f | sed "s|^${RPM_BUILD_ROOT}|/|" | grep -v -e '_tkinter.so$' >mainpkg.files find "$RPM_BUILD_ROOT""%{__prefix}"/bin -type f | sed "s|^${RPM_BUILD_ROOT}|/|" | grep -v -e '/bin/idle%{binsuffix}$' >>mainpkg.files rm -f tools.files find "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/idlelib \ "$RPM_BUILD_ROOT""%{__prefix}"/%{libdirname}/python%{libvers}/Tools -type f | sed "s|^${RPM_BUILD_ROOT}|/|" >tools.files echo "%{__prefix}"/bin/idle%{binsuffix} >>tools.files ###### # Docs %if %{include_docs} mkdir -p "$RPM_BUILD_ROOT"%{config_htmldir} ( cd "$RPM_BUILD_ROOT"%{config_htmldir} bunzip2 < %{SOURCE1} | tar x ) %endif # fix the #! line in installed files find "$RPM_BUILD_ROOT" -type f -print0 | xargs -0 grep -l /usr/local/bin/python | while read file do FIXFILE="$file" sed 's|^#!.*python|#!%{__prefix}/bin/env python'"%{binsuffix}"'|' \ "$FIXFILE" >/tmp/fix-python-path.$$ cat /tmp/fix-python-path.$$ >"$FIXFILE" rm -f /tmp/fix-python-path.$$ done # check to see if there are any straggling #! lines find "$RPM_BUILD_ROOT" -type f | xargs egrep -n '^#! */usr/local/bin/python' \ | grep ':1:#!' >/tmp/python-rpm-files.$$ || true if [ -s /tmp/python-rpm-files.$$ ] then echo '*****************************************************' cat /tmp/python-rpm-files.$$ cat <<@EOF ***************************************************** There are still files referencing /usr/local/bin/python in the install directory. They are listed above. Please fix the .spec file and try again. If you are an end-user, you probably want to report this to jafo-rpms at tummy.com as well. ***************************************************** @EOF rm -f /tmp/python-rpm-files.$$ exit 1 fi rm -f /tmp/python-rpm-files.$$ ######## # CLEAN ######## %clean [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT rm -f mainpkg.files tools.files ######## # FILES ######## %files -f mainpkg.files %defattr(-,root,root) %doc Misc/README Misc/cheatsheet Misc/Porting %doc LICENSE Misc/ACKS Misc/HISTORY Misc/NEWS %{__prefix}/man/man1/python%{binsuffix}.1* %attr(755,root,root) %dir %{__prefix}/include/python%{libvers} %attr(755,root,root) %dir %{__prefix}/%{libdirname}/python%{libvers}/ %{__prefix}/%{libdirname}/python%{libvers}/*.txt %{__prefix}/%{libdirname}/python%{libvers}/*.py* %{__prefix}/%{libdirname}/python%{libvers}/pdb.doc %{__prefix}/%{libdirname}/python%{libvers}/profile.doc %{__prefix}/%{libdirname}/python%{libvers}/curses %{__prefix}/%{libdirname}/python%{libvers}/distutils %{__prefix}/%{libdirname}/python%{libvers}/encodings %{__prefix}/%{libdirname}/python%{libvers}/plat-linux2 %{__prefix}/%{libdirname}/python%{libvers}/site-packages %{__prefix}/%{libdirname}/python%{libvers}/test %{__prefix}/%{libdirname}/python%{libvers}/xml %{__prefix}/%{libdirname}/python%{libvers}/email %{__prefix}/%{libdirname}/python%{libvers}/compiler %{__prefix}/%{libdirname}/python%{libvers}/bsddb %{__prefix}/%{libdirname}/python%{libvers}/hotshot %{__prefix}/%{libdirname}/python%{libvers}/logging %{__prefix}/%{libdirname}/python%{libvers}/lib-old %files devel %defattr(-,root,root) %{__prefix}/include/python%{libvers}/*.h %{__prefix}/%{libdirname}/python%{libvers}/config %files -f tools.files tools %defattr(-,root,root) %if %{include_tkinter} %files tkinter %defattr(-,root,root) %{__prefix}/%{libdirname}/python%{libvers}/lib-tk %{__prefix}/%{libdirname}/python%{libvers}/lib-dynload/_tkinter.so* %endif %if %{include_docs} %files docs %defattr(-,root,root) %{config_htmldir}/* %endif From stuart at bmsi.com Sun Dec 17 17:00:59 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Sun, 17 Dec 2006 17:00:59 -0500 (EST) Subject: [Pymilter] Python 2.4 for CentOS 4.4? In-Reply-To: Message-ID: If I post a python2.4 binary to the pymilter project for Centos4, would anyone use it? I posted a sendmail binary for Redhat 7.3, and it got 187 downloads, so I guess some people trust me and found it useful. So I answered my own question. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From lists at designmedia.com Mon Dec 18 15:43:10 2006 From: lists at designmedia.com (Henry Kwan) Date: Mon, 18 Dec 2006 12:43:10 -0800 (PST) Subject: [Pymilter] Re: Pymilter digest, Vol 1 #56 - 2 msgs In-Reply-To: <20061216170001.7930.84787.Mailman@spidey.bmsi.com> References: <20061216170001.7930.84787.Mailman@spidey.bmsi.com> Message-ID: <1485.192.168.1.231.1166474590.squirrel@webmail.designmedia.com> On Fri, 15 Dec 2006, Stuart D. Gathman wrote: >Absolutely. Get the python2.4-2.4.4c1 SRPM from python.org, and compile >it on CentOS. I run it on all our CentOS systems. It installs separately >from the default python, and is invoked as 'python2.4'. Great. I'll go grab the SRPM and try to compile it. If that doesn't go well, I'll try the RPM that you just posted. Thanks. From lists at designmedia.com Mon Dec 18 16:28:58 2006 From: lists at designmedia.com (Henry Kwan) Date: Mon, 18 Dec 2006 13:28:58 -0800 (PST) Subject: [Pymilter] Wiretap feature? Message-ID: <1799.192.168.1.231.1166477338.squirrel@webmail.designmedia.com> Hi, I was looking through pymilter.cfg and noticed that it had a wiretap feature. Is there a way to configure this feature to be always on for all emails, regardless of to:, cc:, or bcc: status? I've wanted to archive all of our emails, inbound and outbound, for awhile now so this seems like the perfect way to do it if I could configure it to work on every single message. Though ideally, I would like it to work after SpamAssassin does it's thing so I can filter and not archive spam. Thanks. From lists at designmedia.com Mon Dec 18 17:16:53 2006 From: lists at designmedia.com (Henry Kwan) Date: Mon, 18 Dec 2006 14:16:53 -0800 (PST) Subject: [Pymilter] Howto for pymilter? Message-ID: <1898.192.168.1.231.1166480213.squirrel@webmail.designmedia.com> Hi, After install Python 2.4, I went about installing the rest of the pymilter RPMs but am having some problems. These are the packages that I installed: milter-0.8.6-2.RH7.i386.rpm pysrs-0.30.11-2.noarch.rpm python2.4-2.4.4c1-1pydotorg.i386.rpm python-pydns-2.3.0-1.noarch.rpm python-pyspf-2.0.1-1.noarch.rpm After editing bms.py and pysrs.cfg for the various options that I wanted, I tried starting up the milter but got this in the log: [root at beans milter]# cat milter.log Traceback (most recent call last): File "bms.py", line 228, in ? import Milter.dsn as dsn File "/usr/lib/python2.4/site-packages/Milter/dsn.py", line 19, in ? import spf File "/usr/lib/python2.4/site-packages/spf.py", line 313, in ? import DNS # http://pydns.sourceforge.net ImportError: No module named DNS Then I tried starting up the srs package and got this in the log: [root at beans milter]# cat pysrs.log Traceback (most recent call last): File "pysrs.py", line 153, in ? main(sys.argv[1:]) File "pysrs.py", line 132, in main daemon.server.fwdomain = cp.get('srs','fwdomain',None) File "/usr/lib/python2.4/ConfigParser.py", line 520, in get raise NoOptionError(option, section) ConfigParser.NoOptionError: No option 'fwdomain' in section: 'srs' Is there a HOWTO or more documentation that I can look at? I'm running a fairly vanilla CentOS 4.4 install with sendmail-8.13.1-3. Thanks for all of your help so far. From stuart at bmsi.com Mon Dec 18 18:33:45 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Mon, 18 Dec 2006 18:33:45 -0500 (EST) Subject: [Pymilter] Wiretap feature? In-Reply-To: <1799.192.168.1.231.1166477338.squirrel@webmail.designmedia.com> Message-ID: On Mon, 18 Dec 2006, Henry Kwan wrote: > I was looking through pymilter.cfg and noticed that it had a wiretap > feature. Is there a way to configure this feature to be always on for all > emails, regardless of to:, cc:, or bcc: status? I've wanted to archive > all of our emails, inbound and outbound, for awhile now so this seems like > the perfect way to do it if I could configure it to work on every single > message. Though ideally, I would like it to work after SpamAssassin does > it's thing so I can filter and not archive spam. The wiretap feature doesn't look at to, cc, bcc, etc. It only looks at MAIL FROM. It copies all mail from that mailbox. However, to Bcc all email to some mailbox, just call self.addrcpt(archive_mailbox) from eom(). Or just do out = open(archive_file,'a') msg.dump(out) out.close() around line 1586 in CVS version (just before "if not defanged and not spam_checked:"). But the point is well taken. I should add an archive= config option in the main confuration section. Value can be the pathname of an archive file or an archive mailbox. Maybe I can squeeze that into 0.8.7. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Mon Dec 18 18:48:30 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Mon, 18 Dec 2006 18:48:30 -0500 (EST) Subject: [Pymilter] Howto for pymilter? In-Reply-To: <1898.192.168.1.231.1166480213.squirrel@webmail.designmedia.com> Message-ID: On Mon, 18 Dec 2006, Henry Kwan wrote: > After install Python 2.4, I went about installing the rest of the pymilter > RPMs but am having some problems. These are the packages that I > installed: > > milter-0.8.6-2.RH7.i386.rpm > pysrs-0.30.11-2.noarch.rpm > python2.4-2.4.4c1-1pydotorg.i386.rpm > python-pydns-2.3.0-1.noarch.rpm > python-pyspf-2.0.1-1.noarch.rpm > > After editing bms.py and pysrs.cfg for the various options that I wanted, > I tried starting up the milter but got this in the log: > > [root at beans milter]# cat milter.log > Traceback (most recent call last): > File "bms.py", line 228, in ? > import Milter.dsn as dsn > File "/usr/lib/python2.4/site-packages/Milter/dsn.py", line 19, in ? > import spf > File "/usr/lib/python2.4/site-packages/spf.py", line 313, in ? > import DNS # http://pydns.sourceforge.net > ImportError: No module named DNS Oh dear. I am so sorry, this is *really* not clear on the download page. The python-pydns-2.3.0 RPM is for the system python (2.3 on Centos-4). The pydns-2.3.0-2.4 RPM is for python2.4. I apologize for the inconsistent naming. (The python-pydns naming was chosen by the Fedora Core maintainer). > [root at beans milter]# cat pysrs.log > Traceback (most recent call last): > File "pysrs.py", line 153, in ? > main(sys.argv[1:]) > File "pysrs.py", line 132, in main > daemon.server.fwdomain = cp.get('srs','fwdomain',None) > File "/usr/lib/python2.4/ConfigParser.py", line 520, in get > raise NoOptionError(option, section) > ConfigParser.NoOptionError: No option 'fwdomain' in section: 'srs' > > Is there a HOWTO or more documentation that I can look at? I'm running a > fairly vanilla CentOS 4.4 install with sendmail-8.13.1-3. Here is my /etc/mail/pysrs.cfg (secret changed): # sample SRS configuration [srs] secret = fat chance ... maxage = 8 hashlength = 5 ;database=/var/log/milter/srsdata fwdomain = bmsi.com sign=bmsi.com,mail.bmsi.com,gathman.org srs=bmsaix.bmsi.com,bmsred.bmsi.com,stl.gathman.org,bampa.gathman.org 'fwdomain' is the one things are rewritten to. All relayed mail is rewritten (relaying permission is controlled by sendmail). 'sign' lists domains sent by local MTA that should be signed. Signing leaves the domain unchanged, but adds an SRS cookie and omits the original domain. Incoming mail to these domains is rejected unless it has a valid signature. 'srs' lists domains sent by other internal MTAs that relay through the local MTA and should require SRS from incoming mail. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Mon Dec 18 20:05:31 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Mon, 18 Dec 2006 20:05:31 -0500 (EST) Subject: [Pymilter] Wiretap feature? In-Reply-To: Message-ID: On Mon, 18 Dec 2006, Stuart D. Gathman wrote: > But the point is well taken. I should add an archive= config option > in the main confuration section. Value can be the pathname of an > archive file or an archive mailbox. Maybe I can squeeze that into > 0.8.7. Added archive to wiretap, and committed to CVS. BTW, there is a HOWTO in CVS, but it is old. I am running the archive option now on my system. Only delivered mail is archived. Rejected and quarantined mail is not archived. Quarantined mail is archived when released from quarantine. Even though most of the spam is gone before archiving, it grows quickly. :-) The archive file is simply appended, so should work well with logrotate. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Mon Dec 18 20:18:16 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Mon, 18 Dec 2006 20:18:16 -0500 (EST) Subject: [Pymilter] Wiretap feature? In-Reply-To: Message-ID: On Mon, 18 Dec 2006, Stuart D. Gathman wrote: > BTW, there is a HOWTO in CVS, but it is old. The (old) HOWTO is installed with the RPM also. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Thu Dec 21 21:21:16 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Thu, 21 Dec 2006 21:21:16 -0500 (EST) Subject: [Pymilter] Re: python milter downloads In-Reply-To: Message-ID: On Thu, 21 Dec 2006, Aaron Reizes wrote: > I have tried to download the current milter code -milter-0.8.6.tar.gz > (and also the previous version (0.8.5) and my virus scan traps several > viruses in the download. That is a rather naive virus scanner. There are, in fact, many viruses in the test suite. They are not "live", and have all but the first and last lines of their base64 encoded data removed (denatured). The bms milter removes executable (by Windows) content. I have found it pointless to check signatures. When a new virus hits, by the time the signature database gets updated, it is too late. People that send executable attachments by email (other than digitally signed and in a form not immediately executed by Windows) need their head examined. -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial. From stuart at bmsi.com Fri Dec 22 01:10:05 2006 From: stuart at bmsi.com (Stuart D. Gathman) Date: Fri, 22 Dec 2006 01:10:05 -0500 (EST) Subject: [Pymilter] My bad. logging *is* in python2.3 Message-ID: There is really no reason why the bms milter shouldn't run in python2.3. Should I try to make some 2.3 (system default) packages for Centos-4? Or is everyone fine with running 2.4 (a bit faster)? And maybe I used some other 2.4 feature like built-in sets. Do people want 2.3 compatibility? -- Stuart D. Gathman Business Management Systems Inc. Phone: 703 591-0911 Fax: 703 591-6154 "Confutatis maledictis, flammis acribus addictis" - background song for a Microsoft sponsored "Where do you want to go from here?" commercial.