Subscribe the user to the public mailing list

This commit is contained in:
Bob Mottram 2014-10-01 13:15:37 +01:00
parent 2ef9513d17
commit 286af73995
1 changed files with 8 additions and 1 deletions

View File

@ -1705,8 +1705,12 @@ function create_public_mailing_list {
apt-get -y --force-yes install mlmmj apt-get -y --force-yes install mlmmj
adduser --system mlmmj adduser --system mlmmj
echo ''
echo "Creating the $PUBLIC_MAILING_LIST mailing list"
echo ''
# create the list # create the list
mlmmj-make-ml -a -L "$PUBLIC_MAILING_LIST" -c mlmmj -z mlmmj-make-ml -a -L "$PUBLIC_MAILING_LIST" -c mlmmj
echo 'mlmmj_router:' > /etc/exim4/conf.d/router/750_exim4-config_mlmmj echo 'mlmmj_router:' > /etc/exim4/conf.d/router/750_exim4-config_mlmmj
echo ' driver = accept' >> /etc/exim4/conf.d/router/750_exim4-config_mlmmj echo ' driver = accept' >> /etc/exim4/conf.d/router/750_exim4-config_mlmmj
@ -1747,6 +1751,9 @@ function create_public_mailing_list {
service exim4 restart service exim4 restart
newaliases newaliases
# subscribe the user to the list
mlmmj-sub -L /var/spool/mlmmj/$PUBLIC_MAILING_LIST -a $MY_USERNAME@$DOMAIN_NAME
mailinglistrule $MY_USERNAME "$PUBLIC_MAILING_LIST" "$PUBLIC_MAILING_LIST" mailinglistrule $MY_USERNAME "$PUBLIC_MAILING_LIST" "$PUBLIC_MAILING_LIST"
echo 'create_public_mailing_list' >> $COMPLETION_FILE echo 'create_public_mailing_list' >> $COMPLETION_FILE