Initial selinux policy support
This commit is contained in:
@@ -71,6 +71,9 @@ class myMilter(Milter.Base):
|
|||||||
self.fromparms = Milter.dictfromlist(str) # ESMTP parms
|
self.fromparms = Milter.dictfromlist(str) # ESMTP parms
|
||||||
self.user = self.getsymval('{auth_authen}') # authenticated user
|
self.user = self.getsymval('{auth_authen}') # authenticated user
|
||||||
self.log("mail from:", mailfrom, *str)
|
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.fp = StringIO.StringIO()
|
||||||
self.canon_from = '@'.join(parse_addr(mailfrom))
|
self.canon_from = '@'.join(parse_addr(mailfrom))
|
||||||
self.fp.write('From %s %s\n' % (self.canon_from,time.ctime()))
|
self.fp.write('From %s %s\n' % (self.canon_from,time.ctime()))
|
||||||
|
|||||||
+5
-1
@@ -7,8 +7,9 @@
|
|||||||
Summary: Python interface to sendmail milter API
|
Summary: Python interface to sendmail milter API
|
||||||
Name: %{pythonbase}-pymilter
|
Name: %{pythonbase}-pymilter
|
||||||
Version: 0.9.8
|
Version: 0.9.8
|
||||||
Release: 1%{dist}
|
Release: 2%{dist}
|
||||||
Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz
|
Source: http://downloads.sourceforge.net/pymilter/pymilter-%{version}.tar.gz
|
||||||
|
Source1: pymilter.te
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
||||||
@@ -19,6 +20,7 @@ Requires: %{pythonbase} >= 2.6.5, sendmail >= 8.13
|
|||||||
Requires: %{pythonbase}-pydns
|
Requires: %{pythonbase}-pydns
|
||||||
# Needed for callbacks, not a core function but highly useful for milters
|
# Needed for callbacks, not a core function but highly useful for milters
|
||||||
BuildRequires: ed, %{pythonbase}-devel, sendmail-devel >= 8.13
|
BuildRequires: ed, %{pythonbase}-devel, sendmail-devel >= 8.13
|
||||||
|
BuildRequires: policycoreutils
|
||||||
|
|
||||||
%description
|
%description
|
||||||
This is a python extension module to enable python scripts to
|
This is a python extension module to enable python scripts to
|
||||||
@@ -31,6 +33,8 @@ DSNs, and doing CBV.
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
env CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py 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
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|||||||
Reference in New Issue
Block a user