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
87702626
Commit
87702626
authored
12 years ago
by
Stuart Gathman
Browse files
Options
Downloads
Patches
Plain Diff
Initial selinux policy support
parent
af49a7a4
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-template.py
+3
-0
3 additions, 0 deletions
milter-template.py
pymilter.spec
+5
-1
5 additions, 1 deletion
pymilter.spec
with
8 additions
and
1 deletion
milter-template.py
+
3
−
0
View file @
87702626
...
...
@@ -71,6 +71,9 @@ class myMilter(Milter.Base):
self
.
fromparms
=
Milter
.
dictfromlist
(
str
)
# ESMTP parms
self
.
user
=
self
.
getsymval
(
'
{auth_authen}
'
)
# authenticated user
self
.
log
(
"
mail from:
"
,
mailfrom
,
*
str
)
# NOTE: self.fp is only an *internal* copy of message data. You
# must use addheader, chgheader, replacebody to change the message
# on the MTA.
self
.
fp
=
StringIO
.
StringIO
()
self
.
canon_from
=
'
@
'
.
join
(
parse_addr
(
mailfrom
))
self
.
fp
.
write
(
'
From %s %s
\n
'
%
(
self
.
canon_from
,
time
.
ctime
()))
...
...
This diff is collapsed.
Click to expand it.
pymilter.spec
+
5
−
1
View file @
87702626
...
...
@@ -7,8 +7,9 @@
Summary: Python interface to sendmail milter API
Name: %{pythonbase}-pymilter
Version: 0.9.8
Release:
1
%{dist}
Release:
2
%{dist}
Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz
Source1: pymilter.te
License: GPLv2+
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
...
...
@@ -19,6 +20,7 @@ Requires: %{pythonbase} >= 2.6.5, sendmail >= 8.13
Requires: %{pythonbase}-pydns
# Needed for callbacks, not a core function but highly useful for milters
BuildRequires: ed, %{pythonbase}-devel, sendmail-devel >= 8.13
BuildRequires: policycoreutils
%description
This is a python extension module to enable python scripts to
...
...
@@ -31,6 +33,8 @@ DSNs, and doing CBV.
%build
env CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
checkmodule -m -M -o pymilter.mod %{SOURCE1}
semodule_package -o pymilter.pp -m pymilter.mod
%install
rm -rf $RPM_BUILD_ROOT
...
...
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