diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-01-31 21:39:01 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-01-31 21:39:01 +0900 |
| commit | 69fdb5244dc30285c3724b348fe34a4f54fb8f7f (patch) | |
| tree | 506d6ea7f926c880da2c1b2906558803f682ee21 | |
| parent | 5318d64fb58b867a21ee7e864ade3f8783202a82 (diff) | |
modified README.md, deleted adddomain.sh, deleted emailwiz.sh, created add-domain.sh, created email-wizard.sh
| -rw-r--r-- | README.md | 6 | ||||
| -rwxr-xr-x | add-domain.sh (renamed from adddomain.sh) | 10 | ||||
| -rwxr-xr-x | email-wizard.sh (renamed from emailwiz.sh) | 8 |
3 files changed, 12 insertions, 12 deletions
@@ -7,7 +7,7 @@ I've linked this file on Github to a shorter, more memorable address on my website so you can get it on your machine with this short command: ```sh -curl -LO thesiah.xyz/emailwiz.sh +curl -LO thesiah.xyz/email-wizard.sh ``` When prompted by a dialog menu at the beginning, select "Internet Site", then @@ -65,7 +65,7 @@ non-spam. The 4 records are: 2. A TXT record for SPF (to reduce mail spoofing). 3. A TXT record for DMARC policies. 4. A TXT record with your public DKIM key. This record is long and **uniquely - generated** while running `emailwiz.sh` and thus must be added after + generated** while running `email-wizad.sh` and thus must be added after installation. They will look something like this: @@ -77,7 +77,7 @@ _dmarc.example.org TXT v=DMARC1; p=reject; rua=mailto:dmarc@example.org; example.org TXT v=spf1 mx a: -all ``` -The script will create a file, `~/dns_emailwiz` that will list our the records +The script will create a file, `~/dns_email_wizard` that will list our the records for your convenience, and also prints them at the end of the script. ### Add a rDNS/PTR record as well! diff --git a/adddomain.sh b/add-domain.sh index d44b567..e50c7b7 100755 --- a/adddomain.sh +++ b/add-domain.sh @@ -8,7 +8,7 @@ subdom="mail" # Add the domain to the valid postfix addresses. grep -q "^mydestination.*$domain" /etc/postfix/main.cf || - sed -i "s/^mydestination.*/&, $domain/" /etc/postfix/main.cf + sed -i "s/^mydestination.*/&, $domain/" /etc/postfix/main.cf # Create DKIM for new domain. mkdir -p "/etc/postfix/dkim/$domain" @@ -17,8 +17,8 @@ chgrp -R opendkim /etc/postfix/dkim/* chmod -R g+r /etc/postfix/dkim/* # Add entries to keytable and signing table. -echo "$subdom._domainkey.$domain $domain:$subdom:/etc/postfix/dkim/$domain/$subdom.private" >> /etc/postfix/dkim/keytable -echo "*@$domain $subdom._domainkey.$domain" >> /etc/postfix/dkim/signingtable +echo "$subdom._domainkey.$domain $domain:$subdom:/etc/postfix/dkim/$domain/$subdom.private" >>/etc/postfix/dkim/keytable +echo "*@$domain $subdom._domainkey.$domain" >>/etc/postfix/dkim/signingtable systemctl reload opendkim postfix @@ -33,11 +33,11 @@ mxentry="$domain MX 10 $maildomain 300" echo "$dkimentry $dmarcentry $spfentry -$mxentry" >> "$HOME/dns_emailwizard_added" +$mxentry" >>"$HOME/dns_email_wizard_added" echo "=== ADD THE FOLLOWING TO YOUR DNS TXT RECORDS ===" echo "$dkimentry $dmarcentry $spfentry $mxentry" -echo "They have also been stored in ~/dns_emailwizard_added" +echo "They have also been stored in ~/dns_email_wizard_added" diff --git a/emailwiz.sh b/email-wizard.sh index 5c5bd03..e099dd9 100755 --- a/emailwiz.sh +++ b/email-wizard.sh @@ -386,14 +386,14 @@ postconf -e 'smtpd_forbid_bare_newline_exclusions = $mynetworks' systemctl daemon-reload # Enable fail2ban security for dovecot and postfix. -[ ! -f /etc/fail2ban/jail.d/emailwiz.local ] && echo "[postfix] +[ ! -f /etc/fail2ban/jail.d/email-wizard.local ] && echo "[postfix] enabled = true [postfix-sasl] enabled = true [sieve] enabled = true [dovecot] -enabled = true" >/etc/fail2ban/jail.d/emailwiz.local +enabled = true" >/etc/fail2ban/jail.d/email-wizard.local sed -i "s|^backend = auto$|backend = systemd|" /etc/fail2ban/jail.conf @@ -443,7 +443,7 @@ echo "NOTE: Elements in the entries might appear in a different order in your re $dkimentry $dmarcentry $spfentry -$mxentry" >"$HOME/dns_emailwizard" +$mxentry" >"$HOME/dns_email_wizard" printf "\033[31m _ _ @@ -466,7 +466,7 @@ $mxentry NOTE: You may need to omit the \`.$domain\` portion at the beginning if inputting them in a registrar's web interface. -Also, these are now saved to \033[34m~/dns_emailwizard\033[0m in case you want them in a file. +Also, these are now saved to \033[34m~/dns_email_wizard\033[0m in case you want them in a file. Once you do that, you're done! Check the README for how to add users/accounts and how to log in.\n" |
