forked from pool/python-pymilter
Accepting request 697840 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/697840 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pymilter?expand=0&rev=2
This commit is contained in:
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:f513053f5fc9b0c31d886d8412a411bdc958786a673d7071b1bd521498b01153
|
|
||||||
size 1022535
|
|
3
pymilter-1.0.4.tar.gz
Normal file
3
pymilter-1.0.4.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f871e29d2bb4bb192e9d9a1f205278f55cb0092a6c8c84ab698171924e4d2a2c
|
||||||
|
size 1023222
|
@@ -1,36 +0,0 @@
|
|||||||
diff --git a/Milter/dns.py b/Milter/dns.py
|
|
||||||
index 67bed03..e4a9751 100644
|
|
||||||
--- a/Milter/dns.py
|
|
||||||
+++ b/Milter/dns.py
|
|
||||||
@@ -26,8 +26,8 @@ def DNSLookup(name, qtype):
|
|
||||||
# A RR as dotted quad. For consistency, this driver should
|
|
||||||
# return both as binary string.
|
|
||||||
return [((a['name'], a['typename']), a['data']) for a in resp.answers]
|
|
||||||
- except IOError, x:
|
|
||||||
- raise DNSError, str(x)
|
|
||||||
+ except IOError as x:
|
|
||||||
+ raise DNSError(str(x))
|
|
||||||
|
|
||||||
class Session(object):
|
|
||||||
"""A Session object has a simple cache with no TTL that is valid
|
|
||||||
diff --git a/Milter/dsn.py b/Milter/dsn.py
|
|
||||||
index 021d9d2..b27f749 100644
|
|
||||||
--- a/Milter/dsn.py
|
|
||||||
+++ b/Milter/dsn.py
|
|
||||||
@@ -142,13 +142,13 @@ def send_dsn(mailfrom,receiver,msg=None,timeout=600,session=None,ourfrom=''):
|
|
||||||
if badrcpts:
|
|
||||||
return badrcpts
|
|
||||||
return None # success
|
|
||||||
- except smtplib.SMTPRecipientsRefused,x:
|
|
||||||
+ except smtplib.SMTPRecipientsRefused as x:
|
|
||||||
if len(x.recipients) == 1:
|
|
||||||
return x.recipients.values()[0] # permanent error
|
|
||||||
return x.recipients
|
|
||||||
- except smtplib.SMTPSenderRefused,x:
|
|
||||||
+ except smtplib.SMTPSenderRefused as x:
|
|
||||||
return x.args[:2] # does not accept DSN
|
|
||||||
- except smtplib.SMTPDataError,x:
|
|
||||||
+ except smtplib.SMTPDataError as x:
|
|
||||||
return x.args # permanent error
|
|
||||||
except smtplib.SMTPException:
|
|
||||||
pass # any other error, try next MX
|
|
@@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Apr 25 08:37:53 UTC 2019 - pgajdos@suse.com
|
||||||
|
|
||||||
|
- version update to 1.0.4
|
||||||
|
- cleanup unused files, additional platform support
|
||||||
|
- Minor doc updates
|
||||||
|
- patch step for python3 no longer required in build
|
||||||
|
- turn the test suite on
|
||||||
|
- deleted patches
|
||||||
|
- pymilter-dns_dsn.patch (upstreamed)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 6 12:54:13 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
Thu Sep 6 12:54:13 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pymilter
|
# spec file for package python-pymilter
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
# Copyright (c) 2018 Neal Gompa <ngompa13@gmail.com>.
|
# Copyright (c) 2018 Neal Gompa <ngompa13@gmail.com>.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@@ -28,14 +28,13 @@ Summary: Python interface to the sendmail milter API
|
|||||||
License: GPL-2.0-or-later
|
License: GPL-2.0-or-later
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
Name: python-pymilter
|
Name: python-pymilter
|
||||||
Version: 1.0.2
|
Version: 1.0.4
|
||||||
Release: 0
|
Release: 0
|
||||||
URL: http://www.bmsi.com/python/milter.html
|
URL: http://www.bmsi.com/python/milter.html
|
||||||
Source0: https://github.com/sdgathman/pymilter/archive/pymilter-%{version}.tar.gz
|
Source0: https://github.com/sdgathman/pymilter/archive/pymilter-%{version}.tar.gz
|
||||||
Source1: tmpfiles-python-pymilter.conf
|
Source1: tmpfiles-python-pymilter.conf
|
||||||
# Backported patch for Python 3
|
|
||||||
Patch0: pymilter-dns_dsn.patch
|
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: sendmail-devel >= 8.13
|
BuildRequires: sendmail-devel >= 8.13
|
||||||
@@ -67,9 +66,6 @@ This package contains the common files used for pymilter.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -n pymilter-pymilter-%{version} -p1
|
%autosetup -n pymilter-pymilter-%{version} -p1
|
||||||
|
|
||||||
# Patch from within the source tree (*sigh*)...
|
|
||||||
patch -p1 -b -z .py3 <milter.patch
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
@@ -83,6 +79,11 @@ install -m 0644 %{SOURCE1} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
|||||||
|
|
||||||
%fdupes %{buildroot}%{python_sitearch}/*
|
%fdupes %{buildroot}%{python_sitearch}/*
|
||||||
|
|
||||||
|
%check
|
||||||
|
%{python_expand export PYTHONPATH=%{buildroot}%{$python_sitearch}
|
||||||
|
$python -m unittest discover
|
||||||
|
}
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README ChangeLog NEWS TODO CREDITS sample.py milter-template.py
|
%doc README ChangeLog NEWS TODO CREDITS sample.py milter-template.py
|
||||||
%license COPYING
|
%license COPYING
|
||||||
|
Reference in New Issue
Block a user