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
f1f082fe
Commit
f1f082fe
authored
19 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Consider SMTP AUTH connections internal.
parent
b0286bff
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
bms.py
+21
-0
21 additions, 0 deletions
bms.py
milter.spec
+2
-1
2 additions, 1 deletion
milter.spec
with
23 additions
and
1 deletion
bms.py
+
21
−
0
View file @
f1f082fe
#!/usr/bin/env python
# A simple milter that has grown quite a bit.
# $Log$
# Revision 1.21 2005/08/04 21:21:31 customdesigned
# Treat fail like softfail for selected (braindead) domains.
# Treat mail according to extended processing results, but
# report any PermError that would officially result via DSN.
#
# Revision 1.20 2005/08/02 18:04:35 customdesigned
# Keep screened honeypot mail, but optionally discard honeypot only mail.
#
...
...
@@ -659,6 +664,19 @@ class bmsMilter(Milter.Milter):
self
.
cbv_needed
=
None
t
=
parse_addr
(
f
.
lower
())
self
.
canon_from
=
'
@
'
.
join
(
t
)
# Check SMTP AUTH, also available:
# auth_author (ESMTP AUTH= param)
# auth_ssf (connection security, 0 = unencrypted)
# auth_type (authentication method, CRAM-MD5, DIGEST-MD5, PLAIN, etc)
self
.
user
=
self
.
getsymval
(
'
{auth_authen}
'
)
if
self
.
user
:
# any successful authentication is considered INTERNAL
self
.
internal_connection
=
True
self
.
log
(
"
SMTP AUTH:
"
,
self
.
user
,
self
.
getsymval
(
'
{auth_type}
'
),
'
ssf =
'
,
self
.
getsymval
(
'
{auth_ssf}
'
),
"
INTERNAL
"
)
self
.
fp
.
write
(
'
From %s %s
\n
'
%
(
self
.
canon_from
,
time
.
ctime
()))
if
len
(
t
)
==
2
:
user
,
domain
=
t
...
...
@@ -1125,6 +1143,9 @@ class bmsMilter(Milter.Milter):
self
.
log
(
"
Large message:
"
,
len
(
txt
))
return
False
screener
=
dspam_screener
[
self
.
id
%
len
(
dspam_screener
)]
# FIXME: if screener is 'honeypot', classify with no quarantine.
# If spam, send DSN and reject if not accepted. Otherwise, use
# force_result to quarantine.
if
not
ds
.
check_spam
(
screener
,
txt
,
self
.
recipients
,
classify
=
True
,
quarantine
=
not
self
.
reject_spam
):
self
.
fp
=
None
...
...
This diff is collapsed.
Click to expand it.
milter.spec
+
2
−
1
View file @
f1f082fe
...
...
@@ -168,7 +168,8 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Jul 15 2005 Stuart Gathman <stuart@bmsi.com> 0.8.3-1
- Keep screened honeypot mail, but optionally discard honeypot only mail.
- spf_accept_fail option for braindead SPF senders
- spf_accept_fail option for braindead SPF senders (treats fail like softfail)
- Consider SMTP AUTH connections internal.
* Fri Jul 15 2005 Stuart Gathman <stuart@bmsi.com> 0.8.2-4
- Limit each CNAME chain independently like PTR and MX
* Fri Jul 15 2005 Stuart Gathman <stuart@bmsi.com> 0.8.2-3
...
...
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