LukeSmithxyz / emailwiz

Script that installs/configures a Dovecot, Postfix, Spam Assassin, OpenDKIM Debian web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Script does not print the DNS records

arnpatel opened this issue · comments

Hello, I just ran this script today on a fresh Debian 11 instance. It installed the required utilities for the mailserver but never printed the DNS records at the end. It also did not create a file called dns_emailwiz to save the records. I ran the script as root. Any thoughts on could be wrong here?

Arth

It runs as normal trying to install and configure the utilities, and then stops at this output:
...
Unpacking opendkim-tools (2.11.0beta2-1) ...
Setting up opendkim-tools (2.11.0
beta2-1) ...
Processing triggers for man-db (2.9.1-1) ...
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)
Rules updated
Rules updated (v6)

I am thinking it never gets to the end of the script where you echo the DNS entry variables. FYI - I already set up SSL cert before running the script. Maybe a recent commit broke something?

Found it, on line 70, the 'esac || exit $1' command tries to exit the script with the exit status passed as argument $1, only if the previous case statement has failed. And somehow the SSL code block is failing. You need to check the lines 51-70 again. I removed '|| exit $1' for debugging, and the script worked as expected.

esac || exit $1

The $ is definitely a typo, but I don't think it should've failed anyway.

Did you get your SSL with certbot or some other service?