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
939fc61d
Commit
939fc61d
authored
16 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Handle @ in localpart.
parent
f6a3b57f
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Milter/__init__.py
+4
-0
4 additions, 0 deletions
Milter/__init__.py
Milter/dsn.py
+4
-1
4 additions, 1 deletion
Milter/dsn.py
with
8 additions
and
1 deletion
Milter/__init__.py
+
4
−
0
View file @
939fc61d
...
@@ -458,6 +458,10 @@ class Milter(Base):
...
@@ -458,6 +458,10 @@ class Milter(Base):
# This factory method is called for each connection to create the
# This factory method is called for each connection to create the
# python object that tracks the connection. It should return
# python object that tracks the connection. It should return
# an object derived from Milter.Base.
# an object derived from Milter.Base.
#
# Note that since python is dynamic, this variable can be changed while
# the milter is running: for instance, to a new subclass based on a
# change in configuration.
factory
=
Milter
factory
=
Milter
## @private
## @private
...
...
This diff is collapsed.
Click to expand it.
Milter/dsn.py
+
4
−
1
View file @
939fc61d
...
@@ -5,6 +5,9 @@
...
@@ -5,6 +5,9 @@
# Send DSNs, do call back verification,
# Send DSNs, do call back verification,
# and generate DSN messages from a template
# and generate DSN messages from a template
# $Log$
# $Log$
# Revision 1.18 2009/06/10 18:01:59 customdesigned
# Doxygen updates
#
# Revision 1.17 2009/05/20 20:08:44 customdesigned
# Revision 1.17 2009/05/20 20:08:44 customdesigned
# Support non-DSN CBV (non-empty MAIL FROM)
# Support non-DSN CBV (non-empty MAIL FROM)
#
#
...
@@ -79,7 +82,7 @@ def send_dsn(mailfrom,receiver,msg=None,timeout=600,session=None,ourfrom=''):
...
@@ -79,7 +82,7 @@ def send_dsn(mailfrom,receiver,msg=None,timeout=600,session=None,ourfrom=''):
Mailfrom is original sender we are sending DSN or CBV to.
Mailfrom is original sender we are sending DSN or CBV to.
Receiver is the MTA sending the DSN.
Receiver is the MTA sending the DSN.
Return None for success or (code,msg) for failure.
"""
Return None for success or (code,msg) for failure.
"""
user
,
domain
=
mailfrom
.
split
(
'
@
'
)
user
,
domain
=
mailfrom
.
r
split
(
'
@
'
,
1
)
if
not
session
:
session
=
dns
.
Session
()
if
not
session
:
session
=
dns
.
Session
()
try
:
try
:
mxlist
=
session
.
dns
(
domain
,
'
MX
'
)
mxlist
=
session
.
dns
(
domain
,
'
MX
'
)
...
...
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