Note

Current development takes place with python2.6 and sendmail-8.14. The following requirements refer to ancient versions and should probably be ignored unless you have to work with old systems.

Python and Sendmail Requirements

  • While the miltermodule will work with python 1.5, you probably want to use python 2.0 or better. The python code uses a number of python 2 features. The email support requires python 2.4.
  • Python must be configured with thread support. This is because pymilter uses sendmail's libmilter which requires thread support.
  • You must compile sendmail with libmilter enabled. In versions of sendmail prior to 8.12 libmilter is marked FFR (For Future Release) and is not installed by default. Sendmail 8.12 still does not enable libmilter by default. You must explicitly select the "MILTER" option when compiling.
  • When compiling Python milter against sendmail versions earlier than 8.13, you must set MAX_ML_REPLY to 1 in setup.py. There is no way to tell from the libmilter includes that smfi_setmlreply is not supported.
  • You probably want to use sendmail-8.13, since that supports multi-line SMTP error descriptions and SOCKETMAP. You want SOCKETMAP for use with pysrs.
  • Python milter has been tested against sendmail-8.11 through sendmail-8.13.
  • Python milter must be compiled for the specific version of sendmail it will run with. (Since the result is dynamically loaded, there could conceivably be multiple versions available and selected at startup - but that will have to wait.) This situation may only exist for sendmail versions prior to 8.12. The protocol seems designed for backward compatibility - and 8.12 is the first official milter release.
  • Mea Culpa! After reading the Python Style guide, I realize that my Python code is not up to snuff. Apparently mixed tabs and spaces are anathema to those using Windows editors, where tabs can be expanded using any arbitrary algorithm. Other than that, my intuition matched Guido's pretty well - although I like to indent by 2 rather than 4. I will arrange to have tabs expanded to spaces when exporting new versions. Until then, beware!
  • AIX 4.1.5 Requirements

    To create sendmail RPMs for AIX, you can download my AIX 4.1.5 spec files for sendmail-8.11.5 or sendmail-8.12.3. If you have not already set it up, I use a dummy RPM package to represent the stuff that comes with AIX. You might also want my python-2.1.1 spec file for AIX. It does not include Tk or curses modules, sorry. If y'all trust me, you can download rpms for AIX 4.x from my AIX RPM directory.

    Sendmail-8.12 renames libsmutil.a to libsm.a. Unfortunately, libsm.a is an important AIX system shared library. Therefore, I rename libsm.a back to libsmutil.a for AIX. This presents a problem for setup.py.

    RedHat 7.2 Requirements

    If you are running Redhat 7.2, the distributed version of sendmail now enables libmilter by default. RedHat 7.2 bundles the development libraries with the main sendmail package, so there is no sendmail-devel package. However, they forgot to include the headers! So you'll have to get the SRPM and modify it. I suggest moving the static libs to a devel package and adding the headers. If this is too much trouble, you can get the mfapi.h header for sendmail-8.6.11 from here and manually install it as /usr/include/libmilter/mfapi.h.

    If you do modify the SRPM, I suggest renaming libsmutil.a to libsm.a - just like sendmail-8.12 will. If you manually install mfapi.h or don't rename libsmutil.a, you'll need to force libs = ["milter", "smutil"] in setup.py.

    If you have installed python2, and want python-milter to use python2, add python=python2 to setup.cfg and build with python2 setup.py bdist_rpm.

    Redhat 6.2 Requirements

    If you are running Redhat 6.2, the distributed version of sendmail does not enable libmilter. You can download the Redhat 7.2 sendmail.spec modified to compile on RedHat 6.2: sendmail-rhmilter.spec. The SRPM for sendmail-8.11.6 is available from Redhat under Errata for RH6.2. But that doesn't include the latest security patches since RH6.2 is no longer supported.

    If y'all trust me, you can pick up source and binary sendmail RPMs for RH6.2 from my linux downloads directory. The lastest RPMs were built by taking a RH7.2 SRPMS and removing some RPM features from the spec file that RH6.2 doesn't support, then recompiling on RH6.2. You can check this by installing the RH7.2 SRPM, then diffing my sendmail.spec with theirs. Then run "rpm -bb sendmail-rhmilter.spec" when you are satisfied.

    If you have installed python2, and want python-milter to use python2, add python=python2 to setup.cfg and build with python2 setup.py bdist_rpm. You'll need to install the sendmail-devel package to compile milter.