mrep/mbnc: allow only one message as argument

pull/173/head
Leah Neukirchen 4 years ago
parent 5885bbe69f
commit 7e6b1c97e6

14
mcom

@ -311,6 +311,12 @@ fi
) fi ) fi
;; ;;
*mbnc*) *mbnc*)
set -- $(mseq -- "$@")
if [ "$#" -ne 1 ]; then
printf 'mbnc: needs exactly one mail to bounce\n' 1>&2
exit 1
fi
{ {
printf '%s' "$hdrs" | mhdr -M -h resent-to /dev/stdin | printf '%s' "$hdrs" | mhdr -M -h resent-to /dev/stdin |
commajoin | sed 's/^/Resent-To: /' commajoin | sed 's/^/Resent-To: /'
@ -324,10 +330,16 @@ fi
printf 'Resent-Date: %s\n' "$(mdate)" printf 'Resent-Date: %s\n' "$(mdate)"
( (
IFS=$NL IFS=$NL
cat $(mseq "${@:-.}") cat $(mseq -- "$@")
) )
;; ;;
*mrep*) *mrep*)
set -- $(mseq -- "$@")
if [ "$#" -ne 1 ]; then
printf 'mrep: needs exactly one mail to reply to\n' 1>&2
exit 1
fi
ng=$(mhdr -h newsgroups "$1") ng=$(mhdr -h newsgroups "$1")
if [ "$ng" ]; then if [ "$ng" ]; then
printf 'Newsgroups: %s\n' "$ng" printf 'Newsgroups: %s\n' "$ng"

Loading…
Cancel
Save