summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2016-04-25 14:04:30 +0200
committerErich Eckner <git@eckner.net>2016-04-25 14:04:30 +0200
commit558eb3ebdd9f6b8f1256d514b455defbc6ab09a0 (patch)
tree2867aeca4cac38660d00076e2de5c59b7105c0e9
parent4ce14217822ee0927b007753198250e494191b52 (diff)
downloadsendmailadvanced-558eb3ebdd9f6b8f1256d514b455defbc6ab09a0.tar.xz
Briefmarken werden jetzt direkt nach dem Erscheinen der Adressaten eingefügtv1.0.5
-rwxr-xr-xsendmailadvanced49
1 files changed, 30 insertions, 19 deletions
diff --git a/sendmailadvanced b/sendmailadvanced
index 3c3122d..c1a6ef0 100755
--- a/sendmailadvanced
+++ b/sendmailadvanced
@@ -13,6 +13,30 @@ verwendung() {
exit 1
}
+stempeln() {
+ oldIFS="${IFS}"
+
+ IFS=','
+ for adressat in ${adressatenString}
+ do
+ if [[ "${adressat}" == *"<"*">"* ]]
+ then
+ adressat="${adressat#*<}"
+ adressat="${adressat%>*}"
+ fi
+ adressat="$(
+ echo "${adressat}" | \
+ tr -d "[:space:]"
+ )"
+ echo "${adressat}" | grep -q "\S" || continue
+ hashcash -b ${hashcash_bits} -Xm "${adressat}"
+ done
+
+ adressatenString=""
+
+ IFS="${oldIFS}"
+}
+
datei=""
encrypt=true
stamp=true
@@ -122,29 +146,16 @@ fi
adressatenSammeln=true
s=" ,${s:4}"
fi
- [ "${s:0:1}" == " " ] || adressatenSammeln=false
+ if [ ! "${s:0:1}" == " " ]
+ then
+ ${adressatenSammeln} && ${stamp} && stempeln
+ adressatenSammeln=false
+ fi
${adressatenSammeln} && adressatenString="${adressatenString}${s}"
echo "${zeile}"
done
- if ${stamp}
- then
- IFS=','
- for adressat in ${adressatenString}
- do
- if [[ "${adressat}" == *"<"*">"* ]]
- then
- adressat="${adressat#*<}"
- adressat="${adressat%>*}"
- fi
- adressat="$(
- echo "${adressat}" | \
- tr -d "[:space:]"
- )"
- echo "${adressat}" | grep -q "\S" || continue
- hashcash -b ${hashcash_bits} -Xm "${adressat}"
- done
- fi
+ ${stamp} && stempeln
echo "${zeile}"
(