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
7ab5ddf0
Commit
7ab5ddf0
authored
19 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Getting ready for 0.8.3
parent
d6ef1a40
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
Milter/__init__.py
+3
-1
3 additions, 1 deletion
Milter/__init__.py
Milter/dsn.py
+2
-0
2 additions, 0 deletions
Milter/dsn.py
NEWS
+6
-0
6 additions, 0 deletions
NEWS
TODO
+2
-29
2 additions, 29 deletions
TODO
setup.py
+2
-1
2 additions, 1 deletion
setup.py
softfail.txt
+3
-1
3 additions, 1 deletion
softfail.txt
with
18 additions
and
32 deletions
Milter/__init__.py
+
3
−
1
View file @
7ab5ddf0
...
...
@@ -16,6 +16,8 @@ from milter import ACCEPT,CONTINUE,REJECT,DISCARD,TEMPFAIL, \
try
:
from
milter
import
QUARANTINE
except
:
pass
__version__
=
'
0.8.3
'
_seq_lock
=
thread
.
allocate_lock
()
_seq
=
0
...
...
@@ -215,6 +217,6 @@ def runmilter(name,socketname,timeout = 0):
raise
milter
.
error
(
"
out of thread resources
"
)
__all__
=
globals
().
copy
()
for
priv
in
(
'
os
'
,
'
milter
'
,
'
thread
'
,
'
factory
'
,
'
_seq
'
,
'
_seq_lock
'
):
for
priv
in
(
'
os
'
,
'
milter
'
,
'
thread
'
,
'
factory
'
,
'
_seq
'
,
'
_seq_lock
'
,
'
__version__
'
):
del
__all__
[
priv
]
__all__
=
__all__
.
keys
()
This diff is collapsed.
Click to expand it.
Milter/dsn.py
+
2
−
0
View file @
7ab5ddf0
...
...
@@ -9,6 +9,7 @@ import smtplib
import
spf
import
socket
from
email.Message
import
Message
import
Milter
nospf_msg
=
"""
Subject: Critical mail server configuration error
...
...
@@ -168,6 +169,7 @@ def create_msg(q,rcptlist,origmsg=None,template=None):
msg
.
add_header
(
'
To
'
,
sender
)
msg
.
add_header
(
'
From
'
,
'
postmaster@%s
'
%
receiver
)
msg
.
add_header
(
'
Auto-Submitted
'
,
'
auto-generated (configuration error)
'
)
msg
.
add_header
(
'
X-Mailer
'
,
'
PyMilter-
'
+
Milter
.
__version__
)
msg
.
set_type
(
'
text/plain
'
)
if
not
template
:
...
...
This diff is collapsed.
Click to expand it.
NEWS
+
6
−
0
View file @
7ab5ddf0
Here is a history of user visible changes to Python milter.
0.8.3 Keep screened honeypot mail, but optionally discard honeypot only mail.
spf_accept_fail option for braindead SPF senders
(treats fail like softfail)
Consider SMTP AUTH connections internal.
Send DSN for SPF errors corrected by extended processing.
Send DSN before SCREENED mail is quarantined
0.8.2 Strict processing limits per SPF RFC
Fixed several parsing bugs under RFC
Support official IANA SPF record (type99)
...
...
This diff is collapsed.
Click to expand it.
TODO
+
2
−
29
View file @
7ab5ddf0
...
...
@@ -6,36 +6,17 @@ Option to add Received-SPF header, but never reject on SPF.
Create null config that does nothing - except maybe add Received-SPF
headers. Many admins would like to turn features on one at a time.
Checking in mime.py;
/bms/cvs/milter/mime.py,v <-- mime.py
new revision: 1.56; previous revision: 1.55
done
Checking in spf.py;
/bms/cvs/milter/spf.py,v <-- spf.py
new revision: 1.18; previous revision: 1.17
done
Checking in testmime.py;
/bms/cvs/milter/testmime.py,v <-- testmime.py
new revision: 1.19; previous revision: 1.18
Auto whitelist based on outgoing email - perhaps with magic subject
or recipient prefix.
Can't output messages with malformed rfc822 attachments.
Example malformed SPF:
onvunvuvvx.usafisnews.org text "v=spf1 mx ptr ip4:207.44.199.970 -all"
Move milter,Milter,mime,spf modules to pymilter
milter package will have bms.py application
Support SMTP AUTH and disable SPF checks when connection is authorized.
Web admin interface
Check valid domains allowed by internal senders to detect PCs infected
with spam trojans.
Do CBV (callback verification) for mail with no published SPF record.
message log for automated stats and blacklisting
Skip dspam when SPF pass?
Skip dspam when SPF pass?
NO
Report 551 with rcpt on SPF fail?
check spam keywords with character classes, e.g.
{a}=[a@ãä], {i}=[i1í], {e}=[eë], {o}=[o0ö]
...
...
@@ -46,9 +27,6 @@ user to give to the forwarder. Alias only works for mail from that
forwarder. Milter gets forwarder domain from alias and uses it to
SPF check forwarder.
Another special dspam user, 'honeypot', can be listed in innoculations.
All email to those addresses is treated as known spam.
Framework for modular Python milter components within a single VM.
Python milters can be already be composed through sendmail by running each in
a separate process. However, a significant amount of memory is wasted
...
...
@@ -57,8 +35,7 @@ is cumbersome (e.g., adding mail headers, writing external files).
Backup copies for outgoing/incoming mail.
Allow multiple wiretap groups, each with its own destination. Perhaps
also copy incoming wiretap mail, even though sendmail alias works perfectly
Copy incoming wiretap mail, even though sendmail alias works perfectly
for the purpose, to avoid having to change two configs for a wiretap.
Provide a way to reload milter.cfg without stopping/restarting milter.
...
...
@@ -72,10 +49,6 @@ Keep separate ismodified flag for headers and body. This is important
when rejecting outgoing mail with viruses removed (so as not to
embarrass yourself), and also removing Received headers with hidepath.
Wrap smfi_setbacklog(int) - but it is only available in sendmail >= 8.12.3,
so how can we detect whether to wrap it?
Need a test module to feed sample messages to a milter though a live
sendmail and SMTP. The mockup currently used is probably not very accurate,
and doesn't test the threading code.
This diff is collapsed.
Click to expand it.
setup.py
+
2
−
1
View file @
7ab5ddf0
import
os
import
sys
from
distutils.core
import
setup
,
Extension
import
Milter
# FIXME: on some versions of sendmail, smutil is renamed to sm
libs
=
[
"
milter
"
,
"
smutil
"
]
...
...
@@ -12,7 +13,7 @@ if sys.version < '2.2.3':
DistributionMetadata
.
classifiers
=
None
DistributionMetadata
.
download_url
=
None
setup
(
name
=
"
milter
"
,
version
=
"
0.8.2
"
,
setup
(
name
=
"
milter
"
,
version
=
Milter
.
__version__
,
description
=
"
Python interface to sendmail milter API
"
,
long_description
=
"""
\
This is a python extension module to enable python scripts to
...
...
This diff is collapsed.
Click to expand it.
softfail.txt
+
3
−
1
View file @
7ab5ddf0
...
...
@@ -14,7 +14,9 @@ Subject: %(subject)s
Received-SPF: %(spf_result)s
Your sender policy indicated that the above email was likely forged and that
feedback was desired.
feedback was desired. If you are sending from a foreign ISP,
then you may need to follow your home ISPs instructions for configuring
your outgoing mail server.
If you need further assistance, please do not hesitate to contact me.
...
...
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