aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorsunpoet <sunpoet@FreeBSD.org>2019-02-04 08:01:11 +0800
committersunpoet <sunpoet@FreeBSD.org>2019-02-04 08:01:11 +0800
commitc5b45a317f8ffb55c233c4ebc650150bb74b3b2d (patch)
tree55d0bdfce3092ce7fa9dde43207d89c0ec91329d /mail
parent832510ffd5d9c8fa71f7970f35d5a072fed122e9 (diff)
downloadfreebsd-ports-gnome-c5b45a317f8ffb55c233c4ebc650150bb74b3b2d.tar.gz
freebsd-ports-gnome-c5b45a317f8ffb55c233c4ebc650150bb74b3b2d.tar.zst
freebsd-ports-gnome-c5b45a317f8ffb55c233c4ebc650150bb74b3b2d.zip
Add py-mail-parser 3.9.1
mail-parser is not only a wrapper for email Python Standard Library. It give you an easy way to pass from raw mail to Python object that you can use in your code. It's the key module of SpamScope. mail-parser can parse Outlook email format (.msg) with msgconvert from mail/p5-Email-Outlook-Message. mail-parser takes as input a raw email and generates a parsed object. The properties of this object are the same name of RFC headers: bcc, cc, date, delivered_to, from_ (not from because is a keyword of Python), message_id, received, reply_to, subject, to. There are other properties to get: body, body html, body plain, headers, attachments, sender IP address, to domains, timezone. WWW: https://github.com/SpamScope/mail-parser
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile1
-rw-r--r--mail/py-mail-parser/Makefile23
-rw-r--r--mail/py-mail-parser/distinfo3
-rw-r--r--mail/py-mail-parser/pkg-descr16
4 files changed, 43 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 1d088b6fd415..0b62081c8e59 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -534,6 +534,7 @@
SUBDIR += py-flufl.bounce
SUBDIR += py-fuglu
SUBDIR += py-libgmail
+ SUBDIR += py-mail-parser
SUBDIR += py-managesieve3
SUBDIR += py-milter
SUBDIR += py-notmuch
diff --git a/mail/py-mail-parser/Makefile b/mail/py-mail-parser/Makefile
new file mode 100644
index 000000000000..b9808ad9aa26
--- /dev/null
+++ b/mail/py-mail-parser/Makefile
@@ -0,0 +1,23 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= mail-parser
+PORTVERSION= 3.9.1
+CATEGORIES= mail python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Wrapper for email standard library
+
+LICENSE= APACHE20
+
+RUN_DEPENDS= msgconvert:mail/p5-Email-Outlook-Message \
+ ${PY_IPADDRESS} \
+ ${PYTHON_PKGNAMEPREFIX}simplejson>=0:devel/py-simplejson@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}six>=0:devel/py-six@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= autoplist concurrent distutils
+
+.include <bsd.port.mk>
diff --git a/mail/py-mail-parser/distinfo b/mail/py-mail-parser/distinfo
new file mode 100644
index 000000000000..e8ac77b1db6f
--- /dev/null
+++ b/mail/py-mail-parser/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1549187246
+SHA256 (mail-parser-3.9.1.tar.gz) = b6ef2621944f4fdaacfdf5c4776336cfc527b3560ca9f1a8015629a6b16a653c
+SIZE (mail-parser-3.9.1.tar.gz) = 15894
diff --git a/mail/py-mail-parser/pkg-descr b/mail/py-mail-parser/pkg-descr
new file mode 100644
index 000000000000..8cf40d1eaee6
--- /dev/null
+++ b/mail/py-mail-parser/pkg-descr
@@ -0,0 +1,16 @@
+mail-parser is not only a wrapper for email Python Standard Library. It give you
+an easy way to pass from raw mail to Python object that you can use in your
+code. It's the key module of SpamScope.
+
+mail-parser can parse Outlook email format (.msg) with msgconvert from
+mail/p5-Email-Outlook-Message.
+
+mail-parser takes as input a raw email and generates a parsed object. The
+properties of this object are the same name of RFC headers: bcc, cc, date,
+delivered_to, from_ (not from because is a keyword of Python), message_id,
+received, reply_to, subject, to.
+
+There are other properties to get: body, body html, body plain, headers,
+attachments, sender IP address, to domains, timezone.
+
+WWW: https://github.com/SpamScope/mail-parser