[Pymilter] Howto for pymilter?
Stuart D. Gathman
stuart at bmsi.com
Mon Dec 18 18:48:30 EST 2006
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 <stuart at bmsi.com>
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.
More information about the Pymilter
mailing list