Fix bugs from testing RPM

This commit is contained in:
Stuart Gathman
2005-06-04 19:41:17 +00:00
parent e99117e8f6
commit ecb870acaa
3 changed files with 17 additions and 7 deletions
+7 -2
View File
@@ -1,6 +1,9 @@
#!/usr/bin/env python
# A simple milter that has grown quite a bit.
# $Log$
# Revision 1.6 2005/06/03 04:57:05 customdesigned
# Organize config reader by section. Create defang section.
#
# Revision 1.5 2005/06/02 15:00:17 customdesigned
# Configure banned extensions. Scan zipfile option with test case.
#
@@ -355,7 +358,7 @@ def read_config(list):
global internal_connect, internal_domains, trusted_relay, hello_blacklist
socketname = cp.get('milter','socket')
timeout = cp.getint('milter','timeout')
check_user = cp.getaddrset(section,'check_user')
check_user = cp.getaddrset('milter','check_user')
log_headers = cp.getboolean('milter','log_headers')
internal_connect = cp.getlist('milter','internal_connect')
internal_domains = cp.getlist('milter','internal_domains')
@@ -367,6 +370,9 @@ def read_config(list):
global banned_exts, porn_words, spam_words
if cp.has_section('defang'):
section = 'defang'
# for backward compatibility,
# banned extensions defaults to empty only when defang section exists
banned_exts = cp.getlist(section,'banned_exts')
else: # use milter section if no defang section for compatibility
section = 'milter'
scan_rfc822 = cp.getboolean(section,'scan_rfc822')
@@ -374,7 +380,6 @@ def read_config(list):
scan_html = cp.getboolean(section,'scan_html')
block_chinese = cp.getboolean(section,'block_chinese')
block_forward = cp.getaddrset(section,'block_forward')
banned_exts = cp.getlist(section,'banned_exts')
porn_words = cp.getlist(section,'porn_words')
spam_words = cp.getlist(section,'spam_words')
+3 -2
View File
@@ -29,6 +29,7 @@ log_headers = 0
# features intended to filter or block incoming mail
[defang]
# do virus scanning on attached messages also
scan_rfc822 = 1
# do virus scanning on attached zipfiles also
@@ -75,9 +76,9 @@ reject_spoofed = 0
;reject_neutral = aol.com
# use a default (v=spf1 a/24 mx/24 ptr) when no SPF records are published
;best_guess = 0
# reject senders that have neither PTR nor SPF records
# reject senders that have neither PTR nor SPF records, or DSN if false
;reject_noptr = 0
# always accept softfail from these domains
# always accept softfail from these domains, or DSN otherwise
;accept_softfail = bounces.amazon.com
# features intended to clean up outgoing mail
+7 -3
View File
@@ -2,7 +2,7 @@
%define version 0.8.0
%define release 3.RH7
# what version of RH are we building for?
%define redhat9 0 # and Enterprise Linux
%define redhat9 0
%define redhat7 1
%define redhat6 0
@@ -43,7 +43,7 @@ Requires: %{python} >= 2.4, sendmail >= 8.12.10
%ifos Linux
Requires: chkconfig
%endif
BuildRequires: %{python}-devel >= 2.2.2, sendmail-devel >= 8.12.10
BuildRequires: %{python}-devel , sendmail-devel >= 8.12.10
%description
This is a python extension module to enable python scripts to
@@ -63,7 +63,7 @@ rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/var/log/milter
mkdir -p $RPM_BUILD_ROOT/etc/mail
mkdir $RPM_BUILD_ROOT/var/log/milter/save
cp bms.py $RPM_BUILD_ROOT/var/log/milter
cp bms.py strike3.txt softfail.txt $RPM_BUILD_ROOT/var/log/milter
cp milter.cfg $RPM_BUILD_ROOT/etc/mail/pymilter.cfg
# logfile rotation
@@ -160,10 +160,14 @@ rm -rf $RPM_BUILD_ROOT
%dir /var/log/milter/save
%config /var/log/milter/start.sh
%config /var/log/milter/bms.py
%config /var/log/milter/strike3.txt
%config /var/log/milter/softfail.txt
%config(noreplace) /etc/mail/pymilter.cfg
/usr/share/sendmail-cf/hack/rhsbl.m4
%changelog
* Sat Jun 04 2005 Stuart Gathman <stuart@bmsi.com> 0.8.0-2
- Include default softfail, strike3 templates
* Wed May 25 2005 Stuart Gathman <stuart@bmsi.com> 0.8.0-1
- Move Milter module to subpackage.
- DSN support for Three strikes rule and SPF SOFTFAIL