mime4j provides a parser, MimeStreamParser, for e-mail message streams

in plain rfc822 and MIME format. The parser uses a callback mechanism to
report parsing events such as the start of an entity header, the start
of a body, etc. If you are familiar with the SAX XML parser interface
you should have no problem getting started with mime4j.

The parser only deals with the structure of the message stream. It won't
do any decoding of base64 or quoted-printable encoded header fields and
bodies.

The parser has been designed to be extremely tolerant against messages
violating the standards.

mime4j can also be used to build a tree representation of an e-mail
message using the Message class. Using this facility mime4j
automatically handles the decoding of fields and bodies and uses
temporary files for large attachments.

WWW: http://james.apache.org/mime4j/
This commit is contained in:
Alex Dupre 2008-09-03 08:04:41 +00:00
parent 8e2eb4f337
commit 1098ca0851
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=219729
4 changed files with 69 additions and 0 deletions

View file

@ -265,6 +265,7 @@
SUBDIR += milter-greylist-devel
SUBDIR += milter-regex
SUBDIR += milter-skem
SUBDIR += mime4j
SUBDIR += mimedefang
SUBDIR += mini_sendmail
SUBDIR += minimalist

43
mail/mime4j/Makefile Normal file
View file

@ -0,0 +1,43 @@
# Ports collection makefile for: mime4j
# Date created: 3 Sep 2008
# Whom: Alex Dupre <ale@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= mime4j
PORTVERSION= 0.4
CATEGORIES= mail java
MASTER_SITES= ${MASTER_SITE_APACHE}
MASTER_SITE_SUBDIR= james/${PORTNAME}
DISTNAME= apache-${PORTNAME}-${PORTVERSION}-bin
MAINTAINER= ale@FreeBSD.org
COMMENT= A Java parser for e-mail message streams
RUN_DEPENDS= ${JAVAJARDIR}/commons-logging.jar:${PORTSDIR}/java/jakarta-commons-logging
USE_JAVA= yes
JAVA_VERSION= 1.5+
NO_BUILD= yes
WRKSRC= ${WRKDIR}/apache-${PORTNAME}-${PORTVERSION}
PLIST_FILES= %%JAVAJARDIR%%/apache-${PORTNAME}.jar
PORTDOCS= *
do-install:
@${ECHO_MSG} -n ">> Installing JAR file as ${JAVAJARDIR}/apache-${PORTNAME}.jar..."
@${INSTALL_DATA} ${WRKSRC}/apache-${PORTNAME}-${PORTVERSION}.jar \
${JAVAJARDIR}/apache-${PORTNAME}.jar
@${ECHO_MSG} " [DONE]"
.if !defined(NOPORTDOCS)
@${ECHO_MSG} -n ">> Installing documentation..."
@${MKDIR} ${DOCSDIR}/api
@cd ${WRKSRC}/javadocs && ${FIND} * \
| ${CPIO} -pdmu -R ${SHAREOWN}:${SHAREGRP} ${DOCSDIR}/api > /dev/null 2>&1
@${INSTALL_DATA} ${WRKSRC}/RELEASE_NOTES.txt ${DOCSDIR}
@${ECHO_MSG} " [DONE]"
.endif
.include <bsd.port.mk>

3
mail/mime4j/distinfo Normal file
View file

@ -0,0 +1,3 @@
MD5 (apache-mime4j-0.4-bin.tar.gz) = 5c653756c073484077d2c0ad7cc6a2b3
SHA256 (apache-mime4j-0.4-bin.tar.gz) = 1811cd368d9e6a5116063524881929c823e2f1fecef7d829eb2b4006183061fa
SIZE (apache-mime4j-0.4-bin.tar.gz) = 631796

22
mail/mime4j/pkg-descr Normal file
View file

@ -0,0 +1,22 @@
mime4j provides a parser, MimeStreamParser, for e-mail message streams
in plain rfc822 and MIME format. The parser uses a callback mechanism to
report parsing events such as the start of an entity header, the start
of a body, etc. If you are familiar with the SAX XML parser interface
you should have no problem getting started with mime4j.
The parser only deals with the structure of the message stream. It won't
do any decoding of base64 or quoted-printable encoded header fields and
bodies.
The parser has been designed to be extremely tolerant against messages
violating the standards.
mime4j can also be used to build a tree representation of an e-mail
message using the Message class. Using this facility mime4j
automatically handles the decoding of fields and bodies and uses
temporary files for large attachments.
WWW: http://james.apache.org/mime4j/
- Alex Dupre
ale@FreeBSD.org