aboutsummaryrefslogtreecommitdiff
blob: c38f8959936ce43415911e96b4e395e8da45b9cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
election=<election-name>
while read num user;
do grep -q "confirmation $num" master-${election} || continue;
	email=$(grep "$user" mail-table);
	if [[ ! -z $email ]]; then
		to="${email#$user }"
	else
		to="$user@gentoo.org"
	fi
	( echo "To: $to";
	echo "From: elections@gentoo.org"
	echo "Date: $(date -R)";
	echo "Subject: Your ${election} confirmation id";
	echo "";
	sed -e "s/^INSERT.*/Your confirmation number is $num./" email -e "s/ELECTION/$election/"; ) \
	| /usr/lib/sendmail -oi $to;
done < confs-${election}