Compare commits

..

No commits in common. "280884a0583096c36eca9b71ed13fc2e8ca5aa17" and "4d45269ae4aea612c0d37d855aca157fcad2cbc7" have entirely different histories.

5 changed files with 0 additions and 115 deletions

3
.gitmodules vendored
View File

@ -1,3 +0,0 @@
[submodule "pubkeys"]
path = pubkeys
url = https://git.wtf-eg.de/ag-admin/pubkeys.git

View File

@ -1,101 +0,0 @@
#!/bin/sh
usage()
{
echo "usage"
echo "====="
echo ""
echo "reads a csv-file with member-data and a text-template from template"
echo "uses erb to fill the template with data, encrpyt and sign the mail with the members public pgp key and send it via swaks(swiss army knife for smtp)"
echo ""
echo "./$0"
echo "\t-h --help"
echo "\t--member-data=member-data.csv"
echo "\t--template=template.erb"
echo "\t--subject=subject"
echo "\t--smtphost=smtphost"
echo "\t--smtpuser=smtpuser"
echo "\t--smtppassword=smtppassword"
echo ""
}
while [ "$1" != "" ]; do
PARAM=`echo $1 | awk -F= '{print $1}'`
VALUE=`echo $1 | awk -F= '{print $2}'`
case $PARAM in
-h | --help)
usage
exit
;;
-n)
DRYRUN=1
;;
--member-data)
MEMBER_DATA=$VALUE
;;
--template)
TEMPLATE=$VALUE
;;
--subject)
SUBJECT=$VALUE
;;
--smtphost)
SMTPHOST=$VALUE
;;
--smtpuser)
SMTPUSER=$VALUE
;;
--smtppassword)
SMTPPASSWORD=$VALUE
;;
*)
echo "ERROR: unknown parameter \"$PARAM\""
usage
exit 1
;;
esac
shift
done
if [ -z "$MEMBER_DATA" ] ; then
echo "parameter member-data missing"
echo ""
usage
exit
fi
if [ -z "$TEMPLATE" ] ; then
echo "parameter template missing"
echo ""
usage
exit
fi
if [ -z "$SUBJECT" ] ; then
echo "parameter userid missing"
echo ""
exit
fi
echo "MEMBER_DATA = "$MEMBER_DATA
echo "TEMPLATE = "$TEMPLATE
echo "SUBJECT = "$SUBJECT
if [ -z "$DRYRUN" ] ; then
echo "real run"
erb column1=Column1 column2=Column2 column3=Column3 $TEMPLATE\
| gpg2 --batch --yes -vvv -u vorstand@wtf-eg.de \
--no-emit-version -eas -r "42152130EE5C8BED881AB911D65BA8BC7E8B9302" \
| swaks --to frank.landgraf@web.de \
--from "vorstand@wtf-eg.de" \
-tls \
--auth LOGIN \
--server $SMTPHOST \
--auth-user $SMTPUSER \
--auth-password $SMTPPASSWORD \
--header "Subject: $SUBJECT" --body -
else
echo "dry run"
erb column1=Column1 column2=Column2 column3=Column3 $TEMPLATE
erb column1=Column1 column2=Column2 column3=Column3 $TEMPLATE|gpg2 --batch --yes -vvv -u vorstand@wtf-eg.de --no-emit-version -eas -r "42152130EE5C8BED881AB911D65BA8BC7E8B9302"
fi

@ -1 +0,0 @@
Subproject commit 251b0b1309abc1ddada54f657bf4e817da71a164

View File

@ -1,3 +0,0 @@
Line,Nick,Email,PGP,Passwort
110,gulliver,frank.landgraf@web.de,4215 2130 EE5C 8BED 881A B911 D65B A8BC 7E8B 9302,this is not my real password
1 Line Nick Email PGP Passwort
2 110 gulliver frank.landgraf@web.de 4215 2130 EE5C 8BED 881A B911 D65B A8BC 7E8B 9302 this is not my real password

View File

@ -1,7 +0,0 @@
Sehr geehrtes Mitglied <%= column1 %>,
Loginname: <%= column2 %>
Passwort:<%= column3 %>
Mit freundlichen Grüßen,
Bossman