aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-10-07 09:17:49 +0800
committeredwin <edwin@FreeBSD.org>2003-10-07 09:17:49 +0800
commitfdc0f98505db7ac0b233a88d0285a0bbc444556c (patch)
treec1c5b394f936596d16f97e80d91595bba11d87b1 /mail
parent8e26b6498b375b58fb42bc99ca157284eff41fd6 (diff)
downloadfreebsd-ports-gnome-fdc0f98505db7ac0b233a88d0285a0bbc444556c.tar.gz
freebsd-ports-gnome-fdc0f98505db7ac0b233a88d0285a0bbc444556c.tar.zst
freebsd-ports-gnome-fdc0f98505db7ac0b233a88d0285a0bbc444556c.zip
[new port] mail/dbmail: An SQL database-based mail system (POP3 and IMAP)
(author description) The DBMAIL package replaces the normal UNIX mailing system. All emails and users data are stored in a database. You can create an unlimited number of email accounts, which can be checked using the POP3 or IMAP protocol. Users can maintain their own set of email addresses. It is more scalable, more secure, and faster than traditional mail systems. DBMAIL uses PostgreSQL or MySQL. PR: ports/54887 Submitted by: Clement Laforet <sheepkiller@cultdeadsheep.org>
Diffstat (limited to 'mail')
-rw-r--r--mail/Makefile1
-rw-r--r--mail/dbmail-devel/Makefile67
-rw-r--r--mail/dbmail-devel/distinfo1
-rw-r--r--mail/dbmail-devel/files/patch-configure29
-rw-r--r--mail/dbmail-devel/pkg-descr22
-rw-r--r--mail/dbmail-devel/pkg-plist37
-rw-r--r--mail/dbmail/Makefile67
-rw-r--r--mail/dbmail/distinfo1
-rw-r--r--mail/dbmail/files/patch-configure29
-rw-r--r--mail/dbmail/pkg-descr22
-rw-r--r--mail/dbmail/pkg-plist37
-rw-r--r--mail/dbmail20/Makefile67
-rw-r--r--mail/dbmail20/distinfo1
-rw-r--r--mail/dbmail20/files/patch-configure29
-rw-r--r--mail/dbmail20/pkg-descr22
-rw-r--r--mail/dbmail20/pkg-plist37
-rw-r--r--mail/dbmail21/Makefile67
-rw-r--r--mail/dbmail21/distinfo1
-rw-r--r--mail/dbmail21/files/patch-configure29
-rw-r--r--mail/dbmail21/pkg-descr22
-rw-r--r--mail/dbmail21/pkg-plist37
-rw-r--r--mail/dbmail22/Makefile67
-rw-r--r--mail/dbmail22/distinfo1
-rw-r--r--mail/dbmail22/files/patch-configure29
-rw-r--r--mail/dbmail22/pkg-descr22
-rw-r--r--mail/dbmail22/pkg-plist37
26 files changed, 781 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile
index 0a308e090a67..0bf5511c6418 100644
--- a/mail/Makefile
+++ b/mail/Makefile
@@ -38,6 +38,7 @@
SUBDIR += cyrus-imapd
SUBDIR += cyrus-imapd2
SUBDIR += cyrus-imapd22
+ SUBDIR += dbmail
SUBDIR += dcc-dccd
SUBDIR += demime
SUBDIR += distribute
diff --git a/mail/dbmail-devel/Makefile b/mail/dbmail-devel/Makefile
new file mode 100644
index 000000000000..b7dcf8f52668
--- /dev/null
+++ b/mail/dbmail-devel/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: dbmail
+# Date created: 07/26/2003
+# Whom: Clement Laforet <sheepkiller@cultdeadsheep.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dbmail
+PORTVERSION= 1.1
+CATEGORIES= mail
+MASTER_SITES= http://www.dbmail.org/tgz/
+PKGNAMESUFFIX= -${DATABASE}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= sheepkiller@cultdeadsheep.org
+COMMENT= An SQL database-based mail system (POP3 and IMAP)
+
+USE_REINPLACE= YES
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX}
+USE_GMAKE= YES
+
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --with-pgsql
+LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+DATABASE= postgresql
+PLIST_SUB+= PGSQL=""
+PLIST_SUB+= MYSQL="@comment "
+.else
+USE_MYSQL= YES
+CONFIGURE_ARGS+= --with-mysql
+DATABASE= mysql
+PLIST_SUB+= MYSQL=""
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+CFLAGS+= -I${LOCALBASE}/include/mysql
+CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib/ -L${LOCALBASE}/lib/${DATABASE}"
+FILES_TO_PATCH= imapd.c main.c maintenance.c pop3d.c user.c
+DOCS= INSTALL README
+
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} " By default dbmail uses MySQL backend database."
+ @${ECHO} " To build dbmail with PostgreSQL as backend database,"
+ @${ECHO} " define WITH_PGSQL"
+ @${ECHO} ""
+
+post-configure:
+.for FILE in ${FILES_TO_PATCH}
+ @${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
+ ${WRKSRC}/${FILE}
+.endfor
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
+ @${MKDIR} ${DATADIR}/sql
+ @${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
+.if !(NOPORTSDOC)
+ @${MKDIR} ${DOCSDIR}
+.for docs in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dbmail-devel/distinfo b/mail/dbmail-devel/distinfo
new file mode 100644
index 000000000000..231e69a12a41
--- /dev/null
+++ b/mail/dbmail-devel/distinfo
@@ -0,0 +1 @@
+MD5 (dbmail-1.1.tgz) = e6d7be3eff38b69ab82ae6d47e3c83e2
diff --git a/mail/dbmail-devel/files/patch-configure b/mail/dbmail-devel/files/patch-configure
new file mode 100644
index 000000000000..87954b042761
--- /dev/null
+++ b/mail/dbmail-devel/files/patch-configure
@@ -0,0 +1,29 @@
+--- configure.orig Mon Oct 6 18:12:06 2003
++++ configure Mon Oct 6 18:13:28 2003
+@@ -842,19 +842,22 @@
+
+
+ mysqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+ mysqlheaderpaths="/usr/include/mysql /usr/include /usr/local/include/mysql \
+ /usr/local/include /usr/freeware/include/mysql \
+ /usr/freeware/include $HOME/include $HOME/mysql/include \
+- $HOME"
++ $HOME $LOCALBASE/include/mysql $PREFIX/include/mysql"
+
+ pgsqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+
+ pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
+ /usr/local/include /usr/freeware/include/pgsql \
+ /usr/freeware/include $HOME/include $HOME/pgsql/include \
+- /usr/local/pgsql/include $HOME"
++ /usr/local/pgsql/include $HOME \
++ $LOCALBASE/include/pgsql $PREFIX/include/pgsql"
+
+ # Check whether --with-mysql or --without-mysql was given.
+ if test "${with_mysql+set}" = set; then
diff --git a/mail/dbmail-devel/pkg-descr b/mail/dbmail-devel/pkg-descr
new file mode 100644
index 000000000000..2c03d30b6ea9
--- /dev/null
+++ b/mail/dbmail-devel/pkg-descr
@@ -0,0 +1,22 @@
+Dbmail is the name of a group of programs that enable the possiblilty of storing
+and retrieving mail messages from a database (currently MySQL or PostgreSQL).
+
+What are the advantages?
+
+ * Scalability.
+ Dbmail is as scalable as the database that is used for the mail storage.
+ * Manageability.
+ Dbmail is based upon a database. Dbmail can be managed by changing
+ settings in the database (f.e. using PHP/Perl/SQL).
+ * Speed.
+ Dbmail uses very efficient, database specific queries for retrieving mail
+ information. This is much faster then parsing a filesystem.
+ * Security.
+ Dbmail has got nothing to do with the filesystem or interaction with other
+ programs in the Unix environment which need special permissions. Dbmail
+ is as secure as the database it's based upon.
+ * Flexibility.
+ Changes on a Dbmail system (adding of users, changing passwords etc.) are
+ effective immediately.
+
+WWW: http://www.dbmail.org/
diff --git a/mail/dbmail-devel/pkg-plist b/mail/dbmail-devel/pkg-plist
new file mode 100644
index 000000000000..c8cd99e48129
--- /dev/null
+++ b/mail/dbmail-devel/pkg-plist
@@ -0,0 +1,37 @@
+bin/dbmail-smtp
+bin/dbmail-pop3d
+bin/dbmail-imapd
+bin/dbmail-maintenance
+bin/dbmail-adduser
+bin/dbmail-readvut
+bin/raw-convertor
+bin/dbmail-mini-injector
+bin/install-dbmail.sh
+etc/dbmail.conf-dist
+%%MYSQL%%lib/libmysqldbmail.a
+%%PGSQL%%lib/libpgsqldbmail.a
+%%MYSQL%%share/dbmail/sql/add-lastlogin.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_notification.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_reply.mysql
+%%MYSQL%%share/dbmail/sql/add_rfcsize.mysql
+%%MYSQL%%share/dbmail/sql/create_tables.mysql
+%%MYSQL%%share/dbmail/sql/create_tables_innoDB.mysql
+%%MYSQL%%share/dbmail/sql/newnames.mysql
+%%MYSQL%%share/dbmail/sql/pop_before_smtp.mysql
+%%MYSQL%%share/dbmail/sql/update_encryption.mysql
+%%MYSQL%%share/dbmail/sql/update_mailbox_subscribed_folders.mysql
+%%MYSQL%%share/dbmail/sql/update_mysql_tmptables.mysql
+%%MYSQL%%share/dbmail/sql/update_ownerid_aliases.mysql
+%%PGSQL%%share/dbmail/sql/add-constraints.pgsql
+%%PGSQL%%share/dbmail/sql/add-lastlogin.postgresql
+%%PGSQL%%share/dbmail/sql/add_auto_notification.pgsql
+%%PGSQL%%share/dbmail/sql/add_auto_reply.pgsql
+%%PGSQL%%share/dbmail/sql/add_rfcsize.postgresql
+%%PGSQL%%share/dbmail/sql/create_tables.pgsql
+%%PGSQL%%share/dbmail/sql/no-constraint-tables.pgsql
+%%PGSQL%%share/dbmail/sql/update_encryption.pgsql
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+@dirrm share/dbmail/sql
+@dirrm share/dbmail
+@dirrm %%DOCSDIR%%
diff --git a/mail/dbmail/Makefile b/mail/dbmail/Makefile
new file mode 100644
index 000000000000..b7dcf8f52668
--- /dev/null
+++ b/mail/dbmail/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: dbmail
+# Date created: 07/26/2003
+# Whom: Clement Laforet <sheepkiller@cultdeadsheep.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dbmail
+PORTVERSION= 1.1
+CATEGORIES= mail
+MASTER_SITES= http://www.dbmail.org/tgz/
+PKGNAMESUFFIX= -${DATABASE}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= sheepkiller@cultdeadsheep.org
+COMMENT= An SQL database-based mail system (POP3 and IMAP)
+
+USE_REINPLACE= YES
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX}
+USE_GMAKE= YES
+
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --with-pgsql
+LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+DATABASE= postgresql
+PLIST_SUB+= PGSQL=""
+PLIST_SUB+= MYSQL="@comment "
+.else
+USE_MYSQL= YES
+CONFIGURE_ARGS+= --with-mysql
+DATABASE= mysql
+PLIST_SUB+= MYSQL=""
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+CFLAGS+= -I${LOCALBASE}/include/mysql
+CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib/ -L${LOCALBASE}/lib/${DATABASE}"
+FILES_TO_PATCH= imapd.c main.c maintenance.c pop3d.c user.c
+DOCS= INSTALL README
+
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} " By default dbmail uses MySQL backend database."
+ @${ECHO} " To build dbmail with PostgreSQL as backend database,"
+ @${ECHO} " define WITH_PGSQL"
+ @${ECHO} ""
+
+post-configure:
+.for FILE in ${FILES_TO_PATCH}
+ @${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
+ ${WRKSRC}/${FILE}
+.endfor
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
+ @${MKDIR} ${DATADIR}/sql
+ @${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
+.if !(NOPORTSDOC)
+ @${MKDIR} ${DOCSDIR}
+.for docs in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dbmail/distinfo b/mail/dbmail/distinfo
new file mode 100644
index 000000000000..231e69a12a41
--- /dev/null
+++ b/mail/dbmail/distinfo
@@ -0,0 +1 @@
+MD5 (dbmail-1.1.tgz) = e6d7be3eff38b69ab82ae6d47e3c83e2
diff --git a/mail/dbmail/files/patch-configure b/mail/dbmail/files/patch-configure
new file mode 100644
index 000000000000..87954b042761
--- /dev/null
+++ b/mail/dbmail/files/patch-configure
@@ -0,0 +1,29 @@
+--- configure.orig Mon Oct 6 18:12:06 2003
++++ configure Mon Oct 6 18:13:28 2003
+@@ -842,19 +842,22 @@
+
+
+ mysqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+ mysqlheaderpaths="/usr/include/mysql /usr/include /usr/local/include/mysql \
+ /usr/local/include /usr/freeware/include/mysql \
+ /usr/freeware/include $HOME/include $HOME/mysql/include \
+- $HOME"
++ $HOME $LOCALBASE/include/mysql $PREFIX/include/mysql"
+
+ pgsqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+
+ pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
+ /usr/local/include /usr/freeware/include/pgsql \
+ /usr/freeware/include $HOME/include $HOME/pgsql/include \
+- /usr/local/pgsql/include $HOME"
++ /usr/local/pgsql/include $HOME \
++ $LOCALBASE/include/pgsql $PREFIX/include/pgsql"
+
+ # Check whether --with-mysql or --without-mysql was given.
+ if test "${with_mysql+set}" = set; then
diff --git a/mail/dbmail/pkg-descr b/mail/dbmail/pkg-descr
new file mode 100644
index 000000000000..2c03d30b6ea9
--- /dev/null
+++ b/mail/dbmail/pkg-descr
@@ -0,0 +1,22 @@
+Dbmail is the name of a group of programs that enable the possiblilty of storing
+and retrieving mail messages from a database (currently MySQL or PostgreSQL).
+
+What are the advantages?
+
+ * Scalability.
+ Dbmail is as scalable as the database that is used for the mail storage.
+ * Manageability.
+ Dbmail is based upon a database. Dbmail can be managed by changing
+ settings in the database (f.e. using PHP/Perl/SQL).
+ * Speed.
+ Dbmail uses very efficient, database specific queries for retrieving mail
+ information. This is much faster then parsing a filesystem.
+ * Security.
+ Dbmail has got nothing to do with the filesystem or interaction with other
+ programs in the Unix environment which need special permissions. Dbmail
+ is as secure as the database it's based upon.
+ * Flexibility.
+ Changes on a Dbmail system (adding of users, changing passwords etc.) are
+ effective immediately.
+
+WWW: http://www.dbmail.org/
diff --git a/mail/dbmail/pkg-plist b/mail/dbmail/pkg-plist
new file mode 100644
index 000000000000..c8cd99e48129
--- /dev/null
+++ b/mail/dbmail/pkg-plist
@@ -0,0 +1,37 @@
+bin/dbmail-smtp
+bin/dbmail-pop3d
+bin/dbmail-imapd
+bin/dbmail-maintenance
+bin/dbmail-adduser
+bin/dbmail-readvut
+bin/raw-convertor
+bin/dbmail-mini-injector
+bin/install-dbmail.sh
+etc/dbmail.conf-dist
+%%MYSQL%%lib/libmysqldbmail.a
+%%PGSQL%%lib/libpgsqldbmail.a
+%%MYSQL%%share/dbmail/sql/add-lastlogin.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_notification.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_reply.mysql
+%%MYSQL%%share/dbmail/sql/add_rfcsize.mysql
+%%MYSQL%%share/dbmail/sql/create_tables.mysql
+%%MYSQL%%share/dbmail/sql/create_tables_innoDB.mysql
+%%MYSQL%%share/dbmail/sql/newnames.mysql
+%%MYSQL%%share/dbmail/sql/pop_before_smtp.mysql
+%%MYSQL%%share/dbmail/sql/update_encryption.mysql
+%%MYSQL%%share/dbmail/sql/update_mailbox_subscribed_folders.mysql
+%%MYSQL%%share/dbmail/sql/update_mysql_tmptables.mysql
+%%MYSQL%%share/dbmail/sql/update_ownerid_aliases.mysql
+%%PGSQL%%share/dbmail/sql/add-constraints.pgsql
+%%PGSQL%%share/dbmail/sql/add-lastlogin.postgresql
+%%PGSQL%%share/dbmail/sql/add_auto_notification.pgsql
+%%PGSQL%%share/dbmail/sql/add_auto_reply.pgsql
+%%PGSQL%%share/dbmail/sql/add_rfcsize.postgresql
+%%PGSQL%%share/dbmail/sql/create_tables.pgsql
+%%PGSQL%%share/dbmail/sql/no-constraint-tables.pgsql
+%%PGSQL%%share/dbmail/sql/update_encryption.pgsql
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+@dirrm share/dbmail/sql
+@dirrm share/dbmail
+@dirrm %%DOCSDIR%%
diff --git a/mail/dbmail20/Makefile b/mail/dbmail20/Makefile
new file mode 100644
index 000000000000..b7dcf8f52668
--- /dev/null
+++ b/mail/dbmail20/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: dbmail
+# Date created: 07/26/2003
+# Whom: Clement Laforet <sheepkiller@cultdeadsheep.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dbmail
+PORTVERSION= 1.1
+CATEGORIES= mail
+MASTER_SITES= http://www.dbmail.org/tgz/
+PKGNAMESUFFIX= -${DATABASE}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= sheepkiller@cultdeadsheep.org
+COMMENT= An SQL database-based mail system (POP3 and IMAP)
+
+USE_REINPLACE= YES
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX}
+USE_GMAKE= YES
+
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --with-pgsql
+LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+DATABASE= postgresql
+PLIST_SUB+= PGSQL=""
+PLIST_SUB+= MYSQL="@comment "
+.else
+USE_MYSQL= YES
+CONFIGURE_ARGS+= --with-mysql
+DATABASE= mysql
+PLIST_SUB+= MYSQL=""
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+CFLAGS+= -I${LOCALBASE}/include/mysql
+CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib/ -L${LOCALBASE}/lib/${DATABASE}"
+FILES_TO_PATCH= imapd.c main.c maintenance.c pop3d.c user.c
+DOCS= INSTALL README
+
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} " By default dbmail uses MySQL backend database."
+ @${ECHO} " To build dbmail with PostgreSQL as backend database,"
+ @${ECHO} " define WITH_PGSQL"
+ @${ECHO} ""
+
+post-configure:
+.for FILE in ${FILES_TO_PATCH}
+ @${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
+ ${WRKSRC}/${FILE}
+.endfor
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
+ @${MKDIR} ${DATADIR}/sql
+ @${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
+.if !(NOPORTSDOC)
+ @${MKDIR} ${DOCSDIR}
+.for docs in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dbmail20/distinfo b/mail/dbmail20/distinfo
new file mode 100644
index 000000000000..231e69a12a41
--- /dev/null
+++ b/mail/dbmail20/distinfo
@@ -0,0 +1 @@
+MD5 (dbmail-1.1.tgz) = e6d7be3eff38b69ab82ae6d47e3c83e2
diff --git a/mail/dbmail20/files/patch-configure b/mail/dbmail20/files/patch-configure
new file mode 100644
index 000000000000..87954b042761
--- /dev/null
+++ b/mail/dbmail20/files/patch-configure
@@ -0,0 +1,29 @@
+--- configure.orig Mon Oct 6 18:12:06 2003
++++ configure Mon Oct 6 18:13:28 2003
+@@ -842,19 +842,22 @@
+
+
+ mysqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+ mysqlheaderpaths="/usr/include/mysql /usr/include /usr/local/include/mysql \
+ /usr/local/include /usr/freeware/include/mysql \
+ /usr/freeware/include $HOME/include $HOME/mysql/include \
+- $HOME"
++ $HOME $LOCALBASE/include/mysql $PREFIX/include/mysql"
+
+ pgsqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+
+ pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
+ /usr/local/include /usr/freeware/include/pgsql \
+ /usr/freeware/include $HOME/include $HOME/pgsql/include \
+- /usr/local/pgsql/include $HOME"
++ /usr/local/pgsql/include $HOME \
++ $LOCALBASE/include/pgsql $PREFIX/include/pgsql"
+
+ # Check whether --with-mysql or --without-mysql was given.
+ if test "${with_mysql+set}" = set; then
diff --git a/mail/dbmail20/pkg-descr b/mail/dbmail20/pkg-descr
new file mode 100644
index 000000000000..2c03d30b6ea9
--- /dev/null
+++ b/mail/dbmail20/pkg-descr
@@ -0,0 +1,22 @@
+Dbmail is the name of a group of programs that enable the possiblilty of storing
+and retrieving mail messages from a database (currently MySQL or PostgreSQL).
+
+What are the advantages?
+
+ * Scalability.
+ Dbmail is as scalable as the database that is used for the mail storage.
+ * Manageability.
+ Dbmail is based upon a database. Dbmail can be managed by changing
+ settings in the database (f.e. using PHP/Perl/SQL).
+ * Speed.
+ Dbmail uses very efficient, database specific queries for retrieving mail
+ information. This is much faster then parsing a filesystem.
+ * Security.
+ Dbmail has got nothing to do with the filesystem or interaction with other
+ programs in the Unix environment which need special permissions. Dbmail
+ is as secure as the database it's based upon.
+ * Flexibility.
+ Changes on a Dbmail system (adding of users, changing passwords etc.) are
+ effective immediately.
+
+WWW: http://www.dbmail.org/
diff --git a/mail/dbmail20/pkg-plist b/mail/dbmail20/pkg-plist
new file mode 100644
index 000000000000..c8cd99e48129
--- /dev/null
+++ b/mail/dbmail20/pkg-plist
@@ -0,0 +1,37 @@
+bin/dbmail-smtp
+bin/dbmail-pop3d
+bin/dbmail-imapd
+bin/dbmail-maintenance
+bin/dbmail-adduser
+bin/dbmail-readvut
+bin/raw-convertor
+bin/dbmail-mini-injector
+bin/install-dbmail.sh
+etc/dbmail.conf-dist
+%%MYSQL%%lib/libmysqldbmail.a
+%%PGSQL%%lib/libpgsqldbmail.a
+%%MYSQL%%share/dbmail/sql/add-lastlogin.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_notification.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_reply.mysql
+%%MYSQL%%share/dbmail/sql/add_rfcsize.mysql
+%%MYSQL%%share/dbmail/sql/create_tables.mysql
+%%MYSQL%%share/dbmail/sql/create_tables_innoDB.mysql
+%%MYSQL%%share/dbmail/sql/newnames.mysql
+%%MYSQL%%share/dbmail/sql/pop_before_smtp.mysql
+%%MYSQL%%share/dbmail/sql/update_encryption.mysql
+%%MYSQL%%share/dbmail/sql/update_mailbox_subscribed_folders.mysql
+%%MYSQL%%share/dbmail/sql/update_mysql_tmptables.mysql
+%%MYSQL%%share/dbmail/sql/update_ownerid_aliases.mysql
+%%PGSQL%%share/dbmail/sql/add-constraints.pgsql
+%%PGSQL%%share/dbmail/sql/add-lastlogin.postgresql
+%%PGSQL%%share/dbmail/sql/add_auto_notification.pgsql
+%%PGSQL%%share/dbmail/sql/add_auto_reply.pgsql
+%%PGSQL%%share/dbmail/sql/add_rfcsize.postgresql
+%%PGSQL%%share/dbmail/sql/create_tables.pgsql
+%%PGSQL%%share/dbmail/sql/no-constraint-tables.pgsql
+%%PGSQL%%share/dbmail/sql/update_encryption.pgsql
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+@dirrm share/dbmail/sql
+@dirrm share/dbmail
+@dirrm %%DOCSDIR%%
diff --git a/mail/dbmail21/Makefile b/mail/dbmail21/Makefile
new file mode 100644
index 000000000000..b7dcf8f52668
--- /dev/null
+++ b/mail/dbmail21/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: dbmail
+# Date created: 07/26/2003
+# Whom: Clement Laforet <sheepkiller@cultdeadsheep.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dbmail
+PORTVERSION= 1.1
+CATEGORIES= mail
+MASTER_SITES= http://www.dbmail.org/tgz/
+PKGNAMESUFFIX= -${DATABASE}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= sheepkiller@cultdeadsheep.org
+COMMENT= An SQL database-based mail system (POP3 and IMAP)
+
+USE_REINPLACE= YES
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX}
+USE_GMAKE= YES
+
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --with-pgsql
+LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+DATABASE= postgresql
+PLIST_SUB+= PGSQL=""
+PLIST_SUB+= MYSQL="@comment "
+.else
+USE_MYSQL= YES
+CONFIGURE_ARGS+= --with-mysql
+DATABASE= mysql
+PLIST_SUB+= MYSQL=""
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+CFLAGS+= -I${LOCALBASE}/include/mysql
+CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib/ -L${LOCALBASE}/lib/${DATABASE}"
+FILES_TO_PATCH= imapd.c main.c maintenance.c pop3d.c user.c
+DOCS= INSTALL README
+
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} " By default dbmail uses MySQL backend database."
+ @${ECHO} " To build dbmail with PostgreSQL as backend database,"
+ @${ECHO} " define WITH_PGSQL"
+ @${ECHO} ""
+
+post-configure:
+.for FILE in ${FILES_TO_PATCH}
+ @${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
+ ${WRKSRC}/${FILE}
+.endfor
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
+ @${MKDIR} ${DATADIR}/sql
+ @${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
+.if !(NOPORTSDOC)
+ @${MKDIR} ${DOCSDIR}
+.for docs in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dbmail21/distinfo b/mail/dbmail21/distinfo
new file mode 100644
index 000000000000..231e69a12a41
--- /dev/null
+++ b/mail/dbmail21/distinfo
@@ -0,0 +1 @@
+MD5 (dbmail-1.1.tgz) = e6d7be3eff38b69ab82ae6d47e3c83e2
diff --git a/mail/dbmail21/files/patch-configure b/mail/dbmail21/files/patch-configure
new file mode 100644
index 000000000000..87954b042761
--- /dev/null
+++ b/mail/dbmail21/files/patch-configure
@@ -0,0 +1,29 @@
+--- configure.orig Mon Oct 6 18:12:06 2003
++++ configure Mon Oct 6 18:13:28 2003
+@@ -842,19 +842,22 @@
+
+
+ mysqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+ mysqlheaderpaths="/usr/include/mysql /usr/include /usr/local/include/mysql \
+ /usr/local/include /usr/freeware/include/mysql \
+ /usr/freeware/include $HOME/include $HOME/mysql/include \
+- $HOME"
++ $HOME $LOCALBASE/include/mysql $PREFIX/include/mysql"
+
+ pgsqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+
+ pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
+ /usr/local/include /usr/freeware/include/pgsql \
+ /usr/freeware/include $HOME/include $HOME/pgsql/include \
+- /usr/local/pgsql/include $HOME"
++ /usr/local/pgsql/include $HOME \
++ $LOCALBASE/include/pgsql $PREFIX/include/pgsql"
+
+ # Check whether --with-mysql or --without-mysql was given.
+ if test "${with_mysql+set}" = set; then
diff --git a/mail/dbmail21/pkg-descr b/mail/dbmail21/pkg-descr
new file mode 100644
index 000000000000..2c03d30b6ea9
--- /dev/null
+++ b/mail/dbmail21/pkg-descr
@@ -0,0 +1,22 @@
+Dbmail is the name of a group of programs that enable the possiblilty of storing
+and retrieving mail messages from a database (currently MySQL or PostgreSQL).
+
+What are the advantages?
+
+ * Scalability.
+ Dbmail is as scalable as the database that is used for the mail storage.
+ * Manageability.
+ Dbmail is based upon a database. Dbmail can be managed by changing
+ settings in the database (f.e. using PHP/Perl/SQL).
+ * Speed.
+ Dbmail uses very efficient, database specific queries for retrieving mail
+ information. This is much faster then parsing a filesystem.
+ * Security.
+ Dbmail has got nothing to do with the filesystem or interaction with other
+ programs in the Unix environment which need special permissions. Dbmail
+ is as secure as the database it's based upon.
+ * Flexibility.
+ Changes on a Dbmail system (adding of users, changing passwords etc.) are
+ effective immediately.
+
+WWW: http://www.dbmail.org/
diff --git a/mail/dbmail21/pkg-plist b/mail/dbmail21/pkg-plist
new file mode 100644
index 000000000000..c8cd99e48129
--- /dev/null
+++ b/mail/dbmail21/pkg-plist
@@ -0,0 +1,37 @@
+bin/dbmail-smtp
+bin/dbmail-pop3d
+bin/dbmail-imapd
+bin/dbmail-maintenance
+bin/dbmail-adduser
+bin/dbmail-readvut
+bin/raw-convertor
+bin/dbmail-mini-injector
+bin/install-dbmail.sh
+etc/dbmail.conf-dist
+%%MYSQL%%lib/libmysqldbmail.a
+%%PGSQL%%lib/libpgsqldbmail.a
+%%MYSQL%%share/dbmail/sql/add-lastlogin.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_notification.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_reply.mysql
+%%MYSQL%%share/dbmail/sql/add_rfcsize.mysql
+%%MYSQL%%share/dbmail/sql/create_tables.mysql
+%%MYSQL%%share/dbmail/sql/create_tables_innoDB.mysql
+%%MYSQL%%share/dbmail/sql/newnames.mysql
+%%MYSQL%%share/dbmail/sql/pop_before_smtp.mysql
+%%MYSQL%%share/dbmail/sql/update_encryption.mysql
+%%MYSQL%%share/dbmail/sql/update_mailbox_subscribed_folders.mysql
+%%MYSQL%%share/dbmail/sql/update_mysql_tmptables.mysql
+%%MYSQL%%share/dbmail/sql/update_ownerid_aliases.mysql
+%%PGSQL%%share/dbmail/sql/add-constraints.pgsql
+%%PGSQL%%share/dbmail/sql/add-lastlogin.postgresql
+%%PGSQL%%share/dbmail/sql/add_auto_notification.pgsql
+%%PGSQL%%share/dbmail/sql/add_auto_reply.pgsql
+%%PGSQL%%share/dbmail/sql/add_rfcsize.postgresql
+%%PGSQL%%share/dbmail/sql/create_tables.pgsql
+%%PGSQL%%share/dbmail/sql/no-constraint-tables.pgsql
+%%PGSQL%%share/dbmail/sql/update_encryption.pgsql
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+@dirrm share/dbmail/sql
+@dirrm share/dbmail
+@dirrm %%DOCSDIR%%
diff --git a/mail/dbmail22/Makefile b/mail/dbmail22/Makefile
new file mode 100644
index 000000000000..b7dcf8f52668
--- /dev/null
+++ b/mail/dbmail22/Makefile
@@ -0,0 +1,67 @@
+# New ports collection makefile for: dbmail
+# Date created: 07/26/2003
+# Whom: Clement Laforet <sheepkiller@cultdeadsheep.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= dbmail
+PORTVERSION= 1.1
+CATEGORIES= mail
+MASTER_SITES= http://www.dbmail.org/tgz/
+PKGNAMESUFFIX= -${DATABASE}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= sheepkiller@cultdeadsheep.org
+COMMENT= An SQL database-based mail system (POP3 and IMAP)
+
+USE_REINPLACE= YES
+GNU_CONFIGURE= YES
+CONFIGURE_ARGS= --prefix=${PREFIX}
+USE_GMAKE= YES
+
+.if defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --with-pgsql
+LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
+DATABASE= postgresql
+PLIST_SUB+= PGSQL=""
+PLIST_SUB+= MYSQL="@comment "
+.else
+USE_MYSQL= YES
+CONFIGURE_ARGS+= --with-mysql
+DATABASE= mysql
+PLIST_SUB+= MYSQL=""
+PLIST_SUB+= PGSQL="@comment "
+.endif
+
+CFLAGS+= -I${LOCALBASE}/include/mysql
+CONFIGURE_ENV+= LDFLAGS="-L${LOCALBASE}/lib/ -L${LOCALBASE}/lib/${DATABASE}"
+FILES_TO_PATCH= imapd.c main.c maintenance.c pop3d.c user.c
+DOCS= INSTALL README
+
+pre-everything::
+ @${ECHO} ""
+ @${ECHO} "You may use the following build options:"
+ @${ECHO} " By default dbmail uses MySQL backend database."
+ @${ECHO} " To build dbmail with PostgreSQL as backend database,"
+ @${ECHO} " define WITH_PGSQL"
+ @${ECHO} ""
+
+post-configure:
+.for FILE in ${FILES_TO_PATCH}
+ @${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
+ ${WRKSRC}/${FILE}
+.endfor
+
+post-install:
+ @${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
+ @${MKDIR} ${DATADIR}/sql
+ @${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
+.if !(NOPORTSDOC)
+ @${MKDIR} ${DOCSDIR}
+.for docs in ${DOCS}
+ @${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.mk>
diff --git a/mail/dbmail22/distinfo b/mail/dbmail22/distinfo
new file mode 100644
index 000000000000..231e69a12a41
--- /dev/null
+++ b/mail/dbmail22/distinfo
@@ -0,0 +1 @@
+MD5 (dbmail-1.1.tgz) = e6d7be3eff38b69ab82ae6d47e3c83e2
diff --git a/mail/dbmail22/files/patch-configure b/mail/dbmail22/files/patch-configure
new file mode 100644
index 000000000000..87954b042761
--- /dev/null
+++ b/mail/dbmail22/files/patch-configure
@@ -0,0 +1,29 @@
+--- configure.orig Mon Oct 6 18:12:06 2003
++++ configure Mon Oct 6 18:13:28 2003
+@@ -842,19 +842,22 @@
+
+
+ mysqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+ mysqlheaderpaths="/usr/include/mysql /usr/include /usr/local/include/mysql \
+ /usr/local/include /usr/freeware/include/mysql \
+ /usr/freeware/include $HOME/include $HOME/mysql/include \
+- $HOME"
++ $HOME $LOCALBASE/include/mysql $PREFIX/include/mysql"
+
+ pgsqllibpaths="/usr/lib /usr/local/lib /lib /usr/freeware/lib \
+- /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME"
++ /usr/freeware/lib32 $HOME/lib $HOME/tcl/lib $HOME \
++ $LOCALBASE/lib $PREFIX/lib"
+
+ pgsqlheaderpaths="/usr/include/pgsql /usr/include /usr/local/include/pgsql \
+ /usr/local/include /usr/freeware/include/pgsql \
+ /usr/freeware/include $HOME/include $HOME/pgsql/include \
+- /usr/local/pgsql/include $HOME"
++ /usr/local/pgsql/include $HOME \
++ $LOCALBASE/include/pgsql $PREFIX/include/pgsql"
+
+ # Check whether --with-mysql or --without-mysql was given.
+ if test "${with_mysql+set}" = set; then
diff --git a/mail/dbmail22/pkg-descr b/mail/dbmail22/pkg-descr
new file mode 100644
index 000000000000..2c03d30b6ea9
--- /dev/null
+++ b/mail/dbmail22/pkg-descr
@@ -0,0 +1,22 @@
+Dbmail is the name of a group of programs that enable the possiblilty of storing
+and retrieving mail messages from a database (currently MySQL or PostgreSQL).
+
+What are the advantages?
+
+ * Scalability.
+ Dbmail is as scalable as the database that is used for the mail storage.
+ * Manageability.
+ Dbmail is based upon a database. Dbmail can be managed by changing
+ settings in the database (f.e. using PHP/Perl/SQL).
+ * Speed.
+ Dbmail uses very efficient, database specific queries for retrieving mail
+ information. This is much faster then parsing a filesystem.
+ * Security.
+ Dbmail has got nothing to do with the filesystem or interaction with other
+ programs in the Unix environment which need special permissions. Dbmail
+ is as secure as the database it's based upon.
+ * Flexibility.
+ Changes on a Dbmail system (adding of users, changing passwords etc.) are
+ effective immediately.
+
+WWW: http://www.dbmail.org/
diff --git a/mail/dbmail22/pkg-plist b/mail/dbmail22/pkg-plist
new file mode 100644
index 000000000000..c8cd99e48129
--- /dev/null
+++ b/mail/dbmail22/pkg-plist
@@ -0,0 +1,37 @@
+bin/dbmail-smtp
+bin/dbmail-pop3d
+bin/dbmail-imapd
+bin/dbmail-maintenance
+bin/dbmail-adduser
+bin/dbmail-readvut
+bin/raw-convertor
+bin/dbmail-mini-injector
+bin/install-dbmail.sh
+etc/dbmail.conf-dist
+%%MYSQL%%lib/libmysqldbmail.a
+%%PGSQL%%lib/libpgsqldbmail.a
+%%MYSQL%%share/dbmail/sql/add-lastlogin.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_notification.mysql
+%%MYSQL%%share/dbmail/sql/add_auto_reply.mysql
+%%MYSQL%%share/dbmail/sql/add_rfcsize.mysql
+%%MYSQL%%share/dbmail/sql/create_tables.mysql
+%%MYSQL%%share/dbmail/sql/create_tables_innoDB.mysql
+%%MYSQL%%share/dbmail/sql/newnames.mysql
+%%MYSQL%%share/dbmail/sql/pop_before_smtp.mysql
+%%MYSQL%%share/dbmail/sql/update_encryption.mysql
+%%MYSQL%%share/dbmail/sql/update_mailbox_subscribed_folders.mysql
+%%MYSQL%%share/dbmail/sql/update_mysql_tmptables.mysql
+%%MYSQL%%share/dbmail/sql/update_ownerid_aliases.mysql
+%%PGSQL%%share/dbmail/sql/add-constraints.pgsql
+%%PGSQL%%share/dbmail/sql/add-lastlogin.postgresql
+%%PGSQL%%share/dbmail/sql/add_auto_notification.pgsql
+%%PGSQL%%share/dbmail/sql/add_auto_reply.pgsql
+%%PGSQL%%share/dbmail/sql/add_rfcsize.postgresql
+%%PGSQL%%share/dbmail/sql/create_tables.pgsql
+%%PGSQL%%share/dbmail/sql/no-constraint-tables.pgsql
+%%PGSQL%%share/dbmail/sql/update_encryption.pgsql
+%%PORTDOCS%%%%DOCSDIR%%/INSTALL
+%%PORTDOCS%%%%DOCSDIR%%/README
+@dirrm share/dbmail/sql
+@dirrm share/dbmail
+@dirrm %%DOCSDIR%%