52 lines
2.3 KiB
Bash
52 lines
2.3 KiB
Bash
passwd tiffany
|
|
apt update
|
|
apt install curl nginx python3-venv postfix dovecot-imapd opendkim opendkim-tools php-fpm php-mbstring php-sqlite3 php-xml php-intl
|
|
mkdir /var/www/tiffany
|
|
nano /var/www/tiffany/index.html
|
|
nano /etc/nginx/conf.d/tiff.conf
|
|
systemctl reload nginx
|
|
python3 -m venv /opt/bronya
|
|
/opt/bronya/bin/pip install --upgrade pip
|
|
/opt/bronya/bin/pip install certbot-nginx
|
|
/opt/bronya/bin/certbot --nginx -d tiffany.eu.org
|
|
crontab -e
|
|
postconf -e "smtpd_tls_cert_file = /etc/letsencrypt/live/tiffany.eu.org/fullchain.pem"
|
|
postconf -e "smtpd_tls_key_file = /etc/letsencrypt/live/tiffany.eu.org/privkey.pem"
|
|
postconf -e "smtpd_tls_security_level = encrypt"
|
|
postconf -e "smtp_tls_security_level = encrypt"
|
|
postconf -e "home_mailbox = Maildir/"
|
|
postconf -e "smtpd_sasl_type = dovecot"
|
|
postconf -e "smtpd_sasl_path = private/auth"
|
|
postconf -e "smtpd_sasl_auth_enable = yes"
|
|
postconf -e "smtpd_sasl_security_options = noanonymous"
|
|
postconf -e "smtpd_sasl_local_domain = /etc/mailname"
|
|
postconf -e "smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject"
|
|
postconf -e "smtpd_milters = local:opendkim/opendkim.sock"
|
|
postconf -e "non_smtpd_milters = local:opendkim/opendkim.sock"
|
|
postconf -e "milter_default_action = accept"
|
|
postconf -e "mynetworks = 91.239.208.63 [2a12:5e40:1:6dff:c13f:fe36:19c3:e562] 127.0.0.1 [::1]"
|
|
# postconf -e "myhostname = tiffany.eu.org" # only needed in ubuntu
|
|
nano /etc/postfix/master.cf
|
|
nano /etc/dovecot/local.conf
|
|
export domain=tiffany.eu.org
|
|
mkdir -p /etc/opendkim/keys/$domain
|
|
mkdir /var/spool/postfix/opendkim
|
|
chown opendkim:opendkim /var/spool/postfix/opendkim
|
|
usermod -aG opendkim postfix
|
|
cd /etc/opendkim/keys/$domain
|
|
opendkim-genkey -d $domain -s lynch
|
|
echo "lynch._domainkey.$domain $domain:lynch:/etc/opendkim/keys/$domain/lynch.private" >> /etc/opendkim/KeyTable
|
|
echo "*@$domain lynch._domainkey.$domain" >> /etc/opendkim/SigningTable
|
|
chown -R opendkim:opendkim /etc/opendkim
|
|
cat lynch.txt
|
|
sleep 120
|
|
nano /etc/opendkim.conf
|
|
nano /etc/aliases
|
|
newaliases
|
|
systemctl restart postfix dovecot opendkim
|
|
touch /var/www/march.sqlite
|
|
mkdir /var/www/tiffany/herta
|
|
curl -L -o round.tar.gz https://github.com/roundcube/roundcubemail/releases/download/1.6.11/roundcubemail-1.6.11-complete.tar.gz
|
|
tar -xzf round.tar.gz
|
|
mv roundcubemail-1.6.11/* /var/www/tiffany/herta
|
|
chown -R www-data:www-data /var/www
|