Fix etc_mailname, add rmfrozen

This commit is contained in:
Michel Roux 2016-10-18 14:45:07 +02:00 committed by Michel Roux
parent 5481d65e5f
commit a4cb00fd97
3 changed files with 8 additions and 4 deletions

View File

@ -4,4 +4,4 @@
- Courier config modification - Courier config modification
- Quotas - Quotas
- Delete frozens - Inform about /etc/hosts manual modification

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
exim -bp | exiqgrep -i | xargs exim -Mrm

View File

@ -10,8 +10,8 @@ STD="\e[0m"
install_ask_domain() { install_ask_domain() {
echo -e "${GRE}Please enter the mail server's main domain${STD}" echo -e "${GRE}Please enter the mail server's main domain${STD}"
read choice read choice
[[ -n $choice ]] && echo $choice > /etc/mailname [[ -n "$choice" ]] && echo "$choice" > /etc/mailname
[[ -z $choice ]] && install_ask_domain [[ -z "$choice" ]] && install_ask_domain
} }
install_exim() { install_exim() {
@ -22,6 +22,7 @@ install_exim() {
mkdir -pv /etc/exim4/domains mkdir -pv /etc/exim4/domains
mkdir -pv /etc/exim4/forward mkdir -pv /etc/exim4/forward
cp -fv exim4/exim4.conf /etc/exim4/exim4.conf cp -fv exim4/exim4.conf /etc/exim4/exim4.conf
sed -i "s/ETC_MAILNAME =/ETC_MAILNAME = $(cat /etc/mailname)/" /etc/exim4/exim4.conf
chmod -fv 777 /var/run/courier/authdaemon chmod -fv 777 /var/run/courier/authdaemon
chmod -fv 777 /var/run/courier/authdaemon/socket chmod -fv 777 /var/run/courier/authdaemon/socket
/usr/share/doc/exim4-base/examples/exim-gencert /usr/share/doc/exim4-base/examples/exim-gencert
@ -64,7 +65,7 @@ install_mailserver() {
echo "4. Both SpamAssassin and ClamAV" echo "4. Both SpamAssassin and ClamAV"
echo "5. Exit" echo "5. Exit"
read -p "Enter choice [1 - 5] " choice read -p "Enter choice [1 - 5] " choice
case $choice in case "$choice" in
1) install_exim ;; 1) install_exim ;;
2) install_exim && install_spamassassin ;; 2) install_exim && install_spamassassin ;;
3) install_exim && install_clamav ;; 3) install_exim && install_clamav ;;