summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando J. Pereda <ferdy@gentoo.org>2005-04-26 18:16:41 +0000
committerFernando J. Pereda <ferdy@gentoo.org>2005-04-26 18:16:41 +0000
commitf855f33ce32327e81cd56833cf518c7acf0462a1 (patch)
treef7d95a0be06b583f02a1825de24cf39c7f7835f2 /mail-mta
parentfix mailer.conf (diff)
downloadgentoo-2-f855f33ce32327e81cd56833cf518c7acf0462a1.tar.gz
gentoo-2-f855f33ce32327e81cd56833cf518c7acf0462a1.tar.bz2
gentoo-2-f855f33ce32327e81cd56833cf518c7acf0462a1.zip
Add /usr/lib/sendmail if -mailwrapper, also install nbqueue
(Portage version: 2.0.51.19)
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/nbsmtp/ChangeLog6
-rw-r--r--mail-mta/nbsmtp/Manifest10
-rwxr-xr-xmail-mta/nbsmtp/files/nbqueue91
-rwxr-xr-xmail-mta/nbsmtp/files/wrapper-nbsmtp4
-rw-r--r--mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild7
5 files changed, 102 insertions, 16 deletions
diff --git a/mail-mta/nbsmtp/ChangeLog b/mail-mta/nbsmtp/ChangeLog
index 2ad572c640b3..740c77dc6f3c 100644
--- a/mail-mta/nbsmtp/ChangeLog
+++ b/mail-mta/nbsmtp/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for mail-mta/nbsmtp
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nbsmtp/ChangeLog,v 1.18 2005/04/25 16:35:06 ferdy Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nbsmtp/ChangeLog,v 1.19 2005/04/26 18:16:41 ferdy Exp $
+
+ 26 Apr 2005; Fernando J. Pereda <ferdy@gentoo.org> +files/nbqueue,
+ files/wrapper-nbsmtp, nbsmtp-0.98-r1.ebuild:
+ Add /usr/lib/sendmail if -mailwrapper, also install nbqueue
25 Apr 2005; Fernando J. Pereda <ferdy@gentoo.org> -nbsmtp-0.92.ebuild,
-nbsmtp-0.92-r1.ebuild, nbsmtp-0.98-r1.ebuild:
diff --git a/mail-mta/nbsmtp/Manifest b/mail-mta/nbsmtp/Manifest
index 34c3dd72c12a..6b75e3cbee0f 100644
--- a/mail-mta/nbsmtp/Manifest
+++ b/mail-mta/nbsmtp/Manifest
@@ -1,6 +1,3 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 62a08f03f2896feac3b7547606c7ddf4 nbsmtp-0.98.ebuild 849
MD5 decbfaff18d113846791c2a7ed42a21b nbsmtp-0.98-r1.ebuild 1268
MD5 31ea5b2be817599c155fbe615f714fa1 ChangeLog 3783
@@ -9,10 +6,3 @@ MD5 bcbe574652394e07e31572e9a9e4ec38 files/wrapper-nbsmtp 376
MD5 200a5cc8c73df6a5a37a3cd5c34ab0b4 files/digest-nbsmtp-0.98-r1 63
MD5 02906beafefaf79dd565570de5541a06 files/mailer.conf 348
MD5 200a5cc8c73df6a5a37a3cd5c34ab0b4 files/digest-nbsmtp-0.98 63
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCbRxUViELBEf1JB0RAkxeAJwO04UHXG7P/9szZ7DQtxQt2CU9NgCfaXVO
-1O+M4zT3OxrtpcLognR8VUM=
-=KHeI
------END PGP SIGNATURE-----
diff --git a/mail-mta/nbsmtp/files/nbqueue b/mail-mta/nbsmtp/files/nbqueue
new file mode 100755
index 000000000000..bcfc56a90294
--- /dev/null
+++ b/mail-mta/nbsmtp/files/nbqueue
@@ -0,0 +1,91 @@
+#!/usr/bin/env bash
+
+##
+# nbQUEUE adds queue support for nbsmtp
+#
+# To use nbQUEUE just create ${QUEUEDIR} and then set
+# nbqueue as your sendmail program. To flush the queue
+# (i.e. send all queued mails) just run nbqueue --flush.
+##
+
+shopt -s nullglob
+
+QUEUEDIR=~/.nbsmtp/.queue
+
+messageid() {
+ sed -n -e '1,/^$/ {
+ /^Message-[iI][dD]: *<\([^>]*\)>.*$/s//\1/p
+ }' $1
+}
+
+messageinfo() {
+ sed -n -e '1,/^$/ {
+ /^From: .*$/p
+ /^To: .*$/p
+ /^[Bb]\?[cC]\{2\}: .*$/p
+ /^Subject: .*$/p
+ }' $1
+}
+
+[[ -d "${QUEUEDIR}" ]] || mkdir -p "${QUEUEDIR}" || {
+ echo "${0}: ${QUEUEDIR} does not exist and I cannot create it"
+ exit 1
+}
+
+case "$1" in
+ --flush|-f)
+ for i in ${QUEUEDIR}/* ; do
+ echo -n "Sending ${i}... "
+ nbsmtp < "${i}"
+
+ if [[ $? -eq 0 ]] ; then
+ rm "${i}"
+ echo "ok."
+ else
+ echo "failed, keeping message in queue."
+ fi
+ done
+ ;;
+ --list|-l)
+ echo "Showing queued mails in ${QUEUEDIR}:"
+ echo
+ for i in ${QUEUEDIR}/* ; do
+ echo "* <${i##*/}>"
+ echo
+ messageinfo "${i}"
+ echo
+ done
+ ;;
+ --wipe|-w)
+ echo "Removing mails in ${QUEUEDIR}:"
+ for i in ${QUEUEDIR}/* ; do
+ echo -e "\t${i##*/}"
+ rm "${i}"
+ done
+ ;;
+ --help|-h)
+ cat << EOH
+nbQUEUE Copyright (C) 2005 Fernando J. Pereda
+nbQUEUE is supplied with nbSMTP [ http://nbsmtp.ferdyx.org ]
+nbQUEUE and nbSMTP are released under the GPLv2
+
+${0##*/} [ action ]
+
+Possible actions are:
+ --flush | -f - Send all mails in the queue
+ --wipe | -w - Remove all mail in the queue
+ --list | -l - List all messages in the queue
+ --help | -h - Print this help message
+EOH
+ exit 0
+ ;;
+ --)
+ # Asume queue mode
+ tmpfile=$(tempfile)
+ cat - > ${tmpfile}
+ newname=$(messageid ${tmpfile})
+ mv "${tmpfile}" "${QUEUEDIR}/${newname}"
+ ;;
+esac
+
+exit 0
diff --git a/mail-mta/nbsmtp/files/wrapper-nbsmtp b/mail-mta/nbsmtp/files/wrapper-nbsmtp
index 66d3c41668a2..cd0abdf2ed41 100755
--- a/mail-mta/nbsmtp/files/wrapper-nbsmtp
+++ b/mail-mta/nbsmtp/files/wrapper-nbsmtp
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
_newaliases() {
- echo "${0}: nbSMTP does not support aliases"
+ echo "newaliases: nbSMTP does not support aliases"
}
case "${0##*/}" in
@@ -24,4 +24,4 @@ case "${0##*/}" in
;;
esac
-exit ${?}
+exit $?
diff --git a/mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild b/mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild
index a1e172fbf4d5..86e388758f7e 100644
--- a/mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild
+++ b/mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild,v 1.2 2005/04/25 16:35:07 ferdy Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild,v 1.3 2005/04/26 18:16:41 ferdy Exp $
inherit mailer
@@ -28,12 +28,13 @@ src_compile() {
}
src_install() {
- dodir /usr/bin
+ dodir /usr/bin /usr/sbin /usr/lib
dobin nbsmtp
doman nbsmtprc.5 nbsmtp.8
dodoc INSTALL DOCS Doxyfile
dobin ${FILESDIR}/wrapper-nbsmtp
+ dobin ${FILESDIR}/nbqueue
if use mailwrapper ; then
dohard /usr/bin/wrapper-nbsmtp /usr/bin/sendmail.nbsmtp
@@ -43,8 +44,8 @@ src_install() {
else
dohard /usr/bin/wrapper-nbsmtp /usr/bin/sendmail
dohard /usr/bin/wrapper-nbsmtp /usr/sbin/sendmail
+ dohard /usr/bin/wrapper-nbsmtp /usr/lib/sendmail
dohard /usr/bin/wrapper-nbsmtp /usr/bin/mailq
dohard /usr/bin/wrapper-nbsmtp /usr/bin/newaliases
fi
-
}