Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymilter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter
Commits
b12c4c97
Commit
b12c4c97
authored
Jan 13, 2013
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Doc updates.
parent
f3fbb1c9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Milter/__init__.py
+19
-6
19 additions, 6 deletions
Milter/__init__.py
makefile
+2
-2
2 additions, 2 deletions
makefile
miltermodule.c
+11
-0
11 additions, 0 deletions
miltermodule.c
pymilter.spec
+2
-2
2 additions, 2 deletions
pymilter.spec
with
34 additions
and
10 deletions
Milter/__init__.py
+
19
−
6
View file @
b12c4c97
...
@@ -416,12 +416,21 @@ class Base(object):
...
@@ -416,12 +416,21 @@ class Base(object):
## Set the SMTP reply code and message.
## Set the SMTP reply code and message.
# If the MTA does not support setmlreply, then only the
# 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.
# 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
# Beginning with 0.9.6, we test for that case and throw ValueError to avoid
# head scratching. What will <i>really</i> irritate you, however,
# head scratching. What will <i>really</i> irritate you, however,
# is that if you carefully double any '%', your message will be
# is that if you carefully double any '%%', your message will be
# sent - but with the '%' still doubled!
# sent - but with the '%%' still doubled!
# See <a href="https://www.milter.org/developers/api/smfi_setreply">
# smfi_setreply</a> for more information.
# @param rcode The three-digit (RFC 821/2821) SMTP reply code as a string.
# rcode cannot be None, and <b>must be a valid 4XX or 5XX reply code</b>.
# @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
):
def
setreply
(
self
,
rcode
,
xcode
=
None
,
msg
=
None
,
*
ml
):
for
m
in
(
msg
,)
+
ml
:
for
m
in
(
msg
,)
+
ml
:
if
1
in
[
len
(
s
)
&
1
for
s
in
R
.
findall
(
m
)]:
if
1
in
[
len
(
s
)
&
1
for
s
in
R
.
findall
(
m
)]:
...
@@ -429,11 +438,15 @@ class Base(object):
...
@@ -429,11 +438,15 @@ class Base(object):
return
self
.
_ctx
.
setreply
(
rcode
,
xcode
,
msg
,
*
ml
)
return
self
.
_ctx
.
setreply
(
rcode
,
xcode
,
msg
,
*
ml
)
## Tell the MTA which macro names will be used.
## Tell the MTA which macro names will be used.
# The <code>Milter.SETSMLIST</code> 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 <code>Milter.SETSMLIST</code> action flag must be
# set.
#
#
# May only be called from negotiate callback.
# May only be called from negotiate callback.
# @since 0.9.2
# @since 0.9.2, M_* constants since 0.9.8
# @param stage the protocol stage to set to macro list for
# @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
# @param macros a string with a space delimited list of macros
def
setsmlist
(
self
,
stage
,
macros
):
def
setsmlist
(
self
,
stage
,
macros
):
if
not
self
.
_actions
&
SETSMLIST
:
raise
DisabledAction
(
"
SETSMLIST
"
)
if
not
self
.
_actions
&
SETSMLIST
:
raise
DisabledAction
(
"
SETSMLIST
"
)
...
...
This diff is collapsed.
Click to expand it.
makefile
+
2
−
2
View file @
b12c4c97
...
@@ -2,8 +2,8 @@ web:
...
@@ -2,8 +2,8 @@ web:
doxygen
doxygen
rsync
-ravK
doc/html/ spidey2.bmsi.com:/Public/pymilter
rsync
-ravK
doc/html/ spidey2.bmsi.com:/Public/pymilter
VERSION
=
0.9.
6
VERSION
=
0.9.
7
CVSTAG
=
pymilter-0_9_
6
CVSTAG
=
pymilter-0_9_
7
PKG
=
pymilter-
$(
VERSION
)
PKG
=
pymilter-
$(
VERSION
)
SRCTAR
=
$(
PKG
)
.tar.gz
SRCTAR
=
$(
PKG
)
.tar.gz
...
...
This diff is collapsed.
Click to expand it.
miltermodule.c
+
11
−
0
View file @
b12c4c97
...
@@ -35,6 +35,10 @@ $ python setup.py help
...
@@ -35,6 +35,10 @@ $ python setup.py help
libraries=["milter","smutil","resolv"]
libraries=["milter","smutil","resolv"]
* $Log$
* $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
* Revision 1.30 2012/04/12 23:08:06 customdesigned
* Support RFC2553 on BSD
* Support RFC2553 on BSD
*
*
...
@@ -1647,6 +1651,13 @@ initmilter(void) {
...
@@ -1647,6 +1651,13 @@ initmilter(void) {
#endif
#endif
#ifdef SMFIF_SETSMLIST
#ifdef SMFIF_SETSMLIST
setitem
(
d
,
"SETSMLIST"
,
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
#endif
#ifdef SMFIS_ALL_OPTS
#ifdef SMFIS_ALL_OPTS
setitem
(
d
,
"P_RCPT_REJ"
,
SMFIP_RCPT_REJ
);
setitem
(
d
,
"P_RCPT_REJ"
,
SMFIP_RCPT_REJ
);
...
...
This diff is collapsed.
Click to expand it.
pymilter.spec
+
2
−
2
View file @
b12c4c97
%define __python python2.6
%define __python python2.6
%define pythonbase python
26
%define pythonbase python
%define libdir %{_libdir}/pymilter
%define libdir %{_libdir}/pymilter
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
Summary: Python interface to sendmail milter API
Summary: Python interface to sendmail milter API
Name: %{pythonbase}-pymilter
Name: %{pythonbase}-pymilter
Version: 0.9.7
Version: 0.9.7
Release:
1
%{dist}
Release:
2
%{dist}
Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz
Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz
License: GPLv2+
License: GPLv2+
Group: Development/Libraries
Group: Development/Libraries
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment