diff options
author | Fernando J. Pereda <ferdy@gentoo.org> | 2005-04-26 18:16:41 +0000 |
---|---|---|
committer | Fernando J. Pereda <ferdy@gentoo.org> | 2005-04-26 18:16:41 +0000 |
commit | df1338135eef13893d4589c55ca713475bf81220 (patch) | |
tree | 1d6ce174fa040ff1a491d216e50b5f647330fe38 /mail-mta | |
parent | fix mailer.conf (diff) | |
download | historical-df1338135eef13893d4589c55ca713475bf81220.tar.gz historical-df1338135eef13893d4589c55ca713475bf81220.tar.bz2 historical-df1338135eef13893d4589c55ca713475bf81220.zip |
Add /usr/lib/sendmail if -mailwrapper, also install nbqueue
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'mail-mta')
-rw-r--r-- | mail-mta/nbsmtp/ChangeLog | 6 | ||||
-rw-r--r-- | mail-mta/nbsmtp/Manifest | 13 | ||||
-rwxr-xr-x | mail-mta/nbsmtp/files/nbqueue | 91 | ||||
-rwxr-xr-x | mail-mta/nbsmtp/files/wrapper-nbsmtp | 4 | ||||
-rw-r--r-- | mail-mta/nbsmtp/nbsmtp-0.98-r1.ebuild | 7 |
5 files changed, 109 insertions, 12 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..5dd505e58dcc 100644 --- a/mail-mta/nbsmtp/Manifest +++ b/mail-mta/nbsmtp/Manifest @@ -2,17 +2,18 @@ Hash: SHA1 MD5 62a08f03f2896feac3b7547606c7ddf4 nbsmtp-0.98.ebuild 849 -MD5 decbfaff18d113846791c2a7ed42a21b nbsmtp-0.98-r1.ebuild 1268 -MD5 31ea5b2be817599c155fbe615f714fa1 ChangeLog 3783 +MD5 d0974b01a66d78f685f38dcffbd0144f nbsmtp-0.98-r1.ebuild 1364 +MD5 11ffe6fde57a0ebe0405643bff700aaa ChangeLog 3962 MD5 2fc9863fa18fa7e25fedaa87a92a3c43 metadata.xml 259 -MD5 bcbe574652394e07e31572e9a9e4ec38 files/wrapper-nbsmtp 376 +MD5 961b6dc8a63bc79755fec60255097c0e files/wrapper-nbsmtp 380 +MD5 9df65f85c5e05c46b39f0594b40677cb files/nbqueue 1743 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 +iD8DBQFCboWjViELBEf1JB0RAgIVAJ0RWvF4Cjicj60H3g1ARp0CZnJjagCdE+66 +mDmsjCgqzo1SshFtiRDQJtQ= +=DVWA -----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 - } |