Mailpile user permissions
This commit is contained in:
parent
d93167fa60
commit
acebf591bc
|
@ -45,6 +45,7 @@ mailpile_variables=(MAILPILE_REPO
|
||||||
MAILPILE_CODE
|
MAILPILE_CODE
|
||||||
ONION_ONLY
|
ONION_ONLY
|
||||||
DDNS_PROVIDER
|
DDNS_PROVIDER
|
||||||
|
DEFAULT_DOMAIN_NAME
|
||||||
MY_USERNAME)
|
MY_USERNAME)
|
||||||
|
|
||||||
function logging_on_mailpile {
|
function logging_on_mailpile {
|
||||||
|
@ -305,6 +306,11 @@ function install_mailpile {
|
||||||
adduser mailpile www-data
|
adduser mailpile www-data
|
||||||
adduser mailpile mail
|
adduser mailpile mail
|
||||||
adduser mailpile $MY_USERNAME
|
adduser mailpile $MY_USERNAME
|
||||||
|
if [[ $ONION_ONLY == 'no' ]]; then
|
||||||
|
chgrp -R ssl-cert /etc/letsencrypt
|
||||||
|
chmod -R g=rX /etc/letsencrypt
|
||||||
|
usermod -a -G ssl-cert mailpile
|
||||||
|
fi
|
||||||
chown -R mailpile: /var/www/$MAILPILE_DOMAIN_NAME/mail/
|
chown -R mailpile: /var/www/$MAILPILE_DOMAIN_NAME/mail/
|
||||||
|
|
||||||
# create folders and tags
|
# create folders and tags
|
||||||
|
@ -440,6 +446,13 @@ function install_mailpile {
|
||||||
pip install jinja2==2.9.6
|
pip install jinja2==2.9.6
|
||||||
pip install pgpdump==1.5
|
pip install pgpdump==1.5
|
||||||
|
|
||||||
|
sed -i "s|#ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
|
sed -i "s|ssl_cert =.*|ssl_cert = </etc/ssl/certs/${DEFAULT_DOMAIN_NAME}.crt|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
|
|
||||||
|
sed -i "s|#ssl_key =.*|ssl_key = </etc/ssl/private/${DEFAULT_DOMAIN_NAME}.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
|
sed -i "s|ssl_key =.*|ssl_key = </etc/ssl/private/${DEFAULT_DOMAIN_NAME}.key|g" /etc/dovecot/conf.d/10-ssl.conf
|
||||||
|
|
||||||
|
systemctl restart dovecot
|
||||||
systemctl enable mailpile
|
systemctl enable mailpile
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
systemctl start mailpile
|
systemctl start mailpile
|
||||||
|
|
Loading…
Reference in New Issue