Create mailing list from address only

This commit is contained in:
Bob Mottram 2016-02-11 15:15:34 +00:00
parent 7958a64e18
commit 3ed4226045
1 changed files with 26 additions and 18 deletions

View File

@ -82,7 +82,10 @@ esac
shift
done
if ! [[ $MYUSERNAME && $MAILINGLIST && $SUBJECTTAG ]]; then
if ! [[ $MYUSERNAME ]]; then
show_help
fi
if [ ! $MAILINGLIST && ! $SUBJECTTAG ]; then
show_help
fi
@ -104,6 +107,8 @@ fi
chown -R $MYUSERNAME:$MYUSERNAME $LISTDIR
if [ ${#SUBJECTTAG} -gt 0 ]; then
# use the subject tag
if ! grep -q "Subject:.*()\[$SUBJECTTAG\]" $PM; then
if [[ $PUBLIC != "yes" ]]; then
# private emails go after the encryption stage
@ -133,6 +138,9 @@ $LISTDIR/new
fi
chown $MYUSERNAME:$MYUSERNAME $PM
fi
else
exit ${PROJECT_NAME}-addemail -u $MYUSERNAME -e $LIST_ADDRESS -g $MAILINGLIST --public $PUBLIC
fi
if [ ! -f "$MUTTRC" ]; then
cp /etc/Muttrc $MUTTRC