* use migrate_aliases.sh the intended way in the postinst script.
cat $WELCOMEHTML;
printf "\r\n\r\n--$SEPERATOR--\r\n\r\n") | \
/usr/sbin/citmail -bm -r "$FROM" "$TO"
- /usr/lib/citadel-server/migrate_aliases.sh
+ /usr/lib/citadel-server/migrate_aliases.sh /etc/citadel/mail.aliases
fi
if test -S /var/run/citadel/citadel.socket; then
#!/bin/bash
+if test -z "$1"; then
+ echo "Usage: $0 mail.aliases"
+ exit
+fi
CITALIAS=$1
if test -f /etc/aliases; then
for ((i=1; i <= $NLINES; i++)); do
ALIAS=`head -n $i /tmp/aliases |tail -n 1`
ORG=`echo $ALIAS|sed "s;,.*;;"`
- if grep $ORG $CITALIAS; then
+ if grep "$ORG" "$CITALIAS"; then
echo "Ignoring Alias $ORG as its alreday there"
else
echo "$ALIAS" >>$CITALIAS