From 755da65426050f653ad9198e14ee9f4990b3a9be Mon Sep 17 00:00:00 2001 From: andryyy Date: Sun, 23 Apr 2017 19:38:27 +0200 Subject: [PATCH] Change path --- data/conf/postfix/master.cf | 2 +- .../conf/postfix/whitelist_forwardinghosts.sh | 12 ------- reset_admin.sh | 36 ------------------- 3 files changed, 1 insertion(+), 49 deletions(-) delete mode 100755 data/conf/postfix/whitelist_forwardinghosts.sh delete mode 100644 reset_admin.sh diff --git a/data/conf/postfix/master.cf b/data/conf/postfix/master.cf index 61aeb592..955728d1 100644 --- a/data/conf/postfix/master.cf +++ b/data/conf/postfix/master.cf @@ -56,4 +56,4 @@ zeyple unix - n n - - pipe -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 -127.0.0.1:10027 inet n n n - 0 spawn user=nobody argv=/opt/postfix/conf/whitelist_forwardinghosts.sh +127.0.0.1:10027 inet n n n - 0 spawn user=nobody argv=/usr/local/bin/whitelist_forwardinghosts.sh diff --git a/data/conf/postfix/whitelist_forwardinghosts.sh b/data/conf/postfix/whitelist_forwardinghosts.sh deleted file mode 100755 index 4ad5ab32..00000000 --- a/data/conf/postfix/whitelist_forwardinghosts.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -while read QUERY; do - QUERY=($QUERY) - if [ "${QUERY[0]}" != "get" ]; then - echo "500 dunno" - continue - fi - result=$(curl -s http://nginx:8081/forwardinghosts.php?host=${QUERY[1]}) - logger -t whitelist_forwardinghosts -p mail.info "Look up ${QUERY[1]} on whitelist, result $result" - echo ${result} -done diff --git a/reset_admin.sh b/reset_admin.sh deleted file mode 100644 index 7ce1def8..00000000 --- a/reset_admin.sh +++ /dev/null @@ -1,36 +0,0 @@ -#/bin/bash -if [[ ! -f mailcow.conf ]]; then - echo "Cannot find mailcow.conf, make sure this script is run from within the mailcow folder." - exit 1 -fi - -echo -n "Checking MySQL service... " -docker-compose ps -q mysql-mailcow > /dev/null 2>&1 - -if [[ $? -ne 0 ]]; then - echo "failed" - echo "MySQL (mysql-mailcow) is not up and running, exiting..." - exit 1 -fi - -echo "OK" -read -r -p "Are you sure you want to reset the mailcow administrator account? [y/N] " response -response=${response,,} # tolower -if [[ "$response" =~ ^(yes|y)$ ]]; then - echo -e "\nWorking, please wait..." - source mailcow.conf - docker-compose exec -T mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM admin;" - docker-compose exec -T mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "INSERT INTO admin (username, password, superadmin, created, modified, active) VALUES ('admin', '{SSHA256}K8eVJ6YsZbQCfuJvSUbaQRLr0HPLz5rC9IAp0PAFl0tmNDBkMDc0NDAyOTAxN2Rk', 1, NOW(), NOW(), 1);" - docker-compose exec -T mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM domain_admins WHERE username='admin';" - docker-compose exec -T mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "INSERT INTO domain_admins (username, domain, created, active) VALUES ('admin', 'ALL', NOW(), 1);" - docker-compose exec -T mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DELETE FROM tfa WHERE username='admin';" - echo " -Reset credentials: ---- -Username: admin -Password: moohoo -TFA: none -" -else - echo "Operation canceled." -fi