From b12c4c9746619d9a54d57ad3e5cb9bf9585c73b4 Mon Sep 17 00:00:00 2001 From: Stuart Gathman Date: Sun, 13 Jan 2013 01:46:17 +0000 Subject: [PATCH] Doc updates. --- Milter/__init__.py | 25 +++++++++++++++++++------ makefile | 4 ++-- miltermodule.c | 11 +++++++++++ pymilter.spec | 4 ++-- 4 files changed, 34 insertions(+), 10 deletions(-) diff --git a/Milter/__init__.py b/Milter/__init__.py index bac6102..28ae202 100755 --- a/Milter/__init__.py +++ b/Milter/__init__.py @@ -416,12 +416,21 @@ class Base(object): ## Set the SMTP reply code and message. # If the MTA does not support setmlreply, then only the - # first msg line is used. Any '%' in a message line + # first msg line is used. Any '%%' in a message line # must be doubled, or libmilter will silently ignore the setreply. # Beginning with 0.9.6, we test for that case and throw ValueError to avoid # head scratching. What will really irritate you, however, - # is that if you carefully double any '%', your message will be - # sent - but with the '%' still doubled! + # is that if you carefully double any '%%', your message will be + # sent - but with the '%%' still doubled! + # See + # smfi_setreply for more information. + # @param rcode The three-digit (RFC 821/2821) SMTP reply code as a string. + # rcode cannot be None, and must be a valid 4XX or 5XX reply code. + # @param xcode The extended (RFC 1893/2034) reply code. If xcode is None, + # no extended code is used. Otherwise, xcode must conform to RFC 1893/2034. + # @param msg The text part of the SMTP reply. If msg is None, + # an empty message is used. + # @param ml Optional additional message lines. def setreply(self,rcode,xcode=None,msg=None,*ml): for m in (msg,)+ml: if 1 in [len(s)&1 for s in R.findall(m)]: @@ -429,11 +438,15 @@ class Base(object): return self._ctx.setreply(rcode,xcode,msg,*ml) ## Tell the MTA which macro names will be used. - # The Milter.SETSMLIST action flag must be set. + # This information can reduce the size of messages received from sendmail, + # and hence could reduce bandwidth between sendmail and your milter where + # that is a factor. The Milter.SETSMLIST action flag must be + # set. # # May only be called from negotiate callback. - # @since 0.9.2 - # @param stage the protocol stage to set to macro list for + # @since 0.9.2, M_* constants since 0.9.8 + # @param stage the protocol stage to set to macro list for, + # one of the M_* constants defined in Milter # @param macros a string with a space delimited list of macros def setsmlist(self,stage,macros): if not self._actions & SETSMLIST: raise DisabledAction("SETSMLIST") diff --git a/makefile b/makefile index 008d236..3786423 100644 --- a/makefile +++ b/makefile @@ -2,8 +2,8 @@ web: doxygen rsync -ravK doc/html/ spidey2.bmsi.com:/Public/pymilter -VERSION=0.9.6 -CVSTAG=pymilter-0_9_6 +VERSION=0.9.7 +CVSTAG=pymilter-0_9_7 PKG=pymilter-$(VERSION) SRCTAR=$(PKG).tar.gz diff --git a/miltermodule.c b/miltermodule.c index fd140c6..fee002c 100644 --- a/miltermodule.c +++ b/miltermodule.c @@ -35,6 +35,10 @@ $ python setup.py help libraries=["milter","smutil","resolv"] * $Log$ + * Revision 1.31 2012/04/12 23:32:50 customdesigned + * Replace redundant callback array with macros. If this doesn't break anything, + * macros can be eliminated with code changes. + * * Revision 1.30 2012/04/12 23:08:06 customdesigned * Support RFC2553 on BSD * @@ -1647,6 +1651,13 @@ initmilter(void) { #endif #ifdef SMFIF_SETSMLIST setitem(d,"SETSMLIST",SMFIF_SETSMLIST); + setitem(d,"M_CONNECT",SMFIM_CONNECT);/* connect */ + setitem(d,"M_HELO",SMFIM_HELO); /* HELO/EHLO */ + setitem(d,"M_ENVFROM",SMFIM_ENVFROM);/* MAIL From */ + setitem(d,"M_ENVRCPT",SMFIM_ENVRCPT);/* RCPT To */ + setitem(d,"M_DATA",SMFIM_DATA); /* DATA */ + setitem(d,"M_EOM",SMFIM_EOM); /* end of message (final dot) */ + setitem(d,"M_EOH",SMFIM_EOH); /* end of header */ #endif #ifdef SMFIS_ALL_OPTS setitem(d,"P_RCPT_REJ",SMFIP_RCPT_REJ); diff --git a/pymilter.spec b/pymilter.spec index 131bca4..35ed394 100644 --- a/pymilter.spec +++ b/pymilter.spec @@ -1,5 +1,5 @@ %define __python python2.6 -%define pythonbase python26 +%define pythonbase python %define libdir %{_libdir}/pymilter %{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} @@ -7,7 +7,7 @@ Summary: Python interface to sendmail milter API Name: %{pythonbase}-pymilter Version: 0.9.7 -Release: 1%{dist} +Release: 2%{dist} Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz License: GPLv2+ Group: Development/Libraries