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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
misc
pymilter
Commits
594d3ad3
Commit
594d3ad3
authored
12 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Doc updates.
parent
b2e0b2eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Milter/__init__.py
+30
-3
30 additions, 3 deletions
Milter/__init__.py
with
30 additions
and
3 deletions
Milter/__init__.py
+
30
−
3
View file @
594d3ad3
...
@@ -256,7 +256,9 @@ class Base(object):
...
@@ -256,7 +256,9 @@ class Base(object):
## Defined by subclasses to write log messages.
## Defined by subclasses to write log messages.
def
log
(
self
,
*
msg
):
pass
def
log
(
self
,
*
msg
):
pass
## Called for each connection to the MTA.
## Called for each connection to the MTA. Called by the
# <a href="https://www.milter.org/developers/api/xxfi_connect">
# xxfi_connect</a> callback.
# The <code>hostname</code> provided by the local MTA is either
# The <code>hostname</code> provided by the local MTA is either
# the PTR name or the IP in the form "[1.2.3.4]" if no PTR is available.
# the PTR name or the IP in the form "[1.2.3.4]" if no PTR is available.
# The format of hostaddr depends on the socket family:
# The format of hostaddr depends on the socket family:
...
@@ -269,6 +271,17 @@ class Base(object):
...
@@ -269,6 +271,17 @@ class Base(object):
# <dt><code>socket.AF_UNIX</code>
# <dt><code>socket.AF_UNIX</code>
# <dd>A string with the socketname
# <dd>A string with the socketname
# </dl>
# </dl>
# To vary behavior based on what port the client connected to,
# for example skipping blacklist checks for port 587 (which must
# be authenticated), use @link #getsymval getsymval('{daemon_port}') @endlink.
# The <code>{daemon_port}</code> macro must be enabled in sendmail.cf
# <pre>
# O Milter.macros.connect=j, _, {daemon_name}, {daemon_port}, {if_name}, {if_addr}
# </pre>
# or sendmail.mc
# <pre>
# define(`confMILTER_MACROS_CONNECT', ``j, _, {daemon_name}, {daemon_port}, {if_name}, {if_addr}'')dnl
# </pre>
# @param hostname the PTR name or bracketed IP of the SMTP client
# @param hostname the PTR name or bracketed IP of the SMTP client
# @param family <code>socket.AF_INET</code>, <code>socket.AF_INET6</code>,
# @param family <code>socket.AF_INET</code>, <code>socket.AF_INET6</code>,
# or <code>socket.AF_UNIX</code>
# or <code>socket.AF_UNIX</code>
...
@@ -280,12 +293,26 @@ class Base(object):
...
@@ -280,12 +293,26 @@ class Base(object):
# this almost always results in terminating the connection.
# this almost always results in terminating the connection.
@nocallback
@nocallback
def
hello
(
self
,
hostname
):
return
CONTINUE
def
hello
(
self
,
hostname
):
return
CONTINUE
## Called when the SMTP client says MAIL FROM.
## Called when the SMTP client says MAIL FROM. Called by the
# <a href="https://www.milter.org/developers/api/xxfi_envfrom">
# xxfi_envfrom</a> callback.
# Returning REJECT rejects the message, but not the connection.
# Returning REJECT rejects the message, but not the connection.
# The sender is the "envelope" from as defined by
# <a href="http://tools.ietf.org/html/rfc5321">RFC 5321</a>.
# For the From: header (author) defined in
# <a href="http://tools.ietf.org/html/rfc5322">RFC 5322</a>,
# see @link #header the header callback @endlink.
@nocallback
@nocallback
def
envfrom
(
self
,
f
,
*
str
):
return
CONTINUE
def
envfrom
(
self
,
f
,
*
str
):
return
CONTINUE
## Called when the SMTP client says RCPT TO.
## Called when the SMTP client says RCPT TO. Called by the
# <a href="https://www.milter.org/developers/api/xxfi_envrcpt">
# xxfi_envrcpt</a> callback.
# Returning REJECT rejects the current recipient, not the entire message.
# Returning REJECT rejects the current recipient, not the entire message.
# The recipient is the "envelope" recipient as defined by
# <a href="http://tools.ietf.org/html/rfc5321">RFC 5321</a>.
# For recipients defined in
# <a href="http://tools.ietf.org/html/rfc5322">RFC 5322</a>,
# for example To: or Cc:, see @link #header the header callback @endlink.
@nocallback
@nocallback
def
envrcpt
(
self
,
to
,
*
str
):
return
CONTINUE
def
envrcpt
(
self
,
to
,
*
str
):
return
CONTINUE
## Called when the SMTP client says DATA.
## Called when the SMTP client says DATA.
...
...
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
register
or
sign in
to comment