theflyingape/dankdomain

Failing to find smtp.json

ryanfantus opened this issue · 3 comments

On a new install, after the initial run of install.sh while creating my first user, I'm presented with the dialog during user creation to enter an email address. This is required for user email validation. After entering the email address twice, I receive the following error:

for Ryan <ryanfantus@gmail.com> (node:1004) UnhandledPromiseRejectionWarning: Error: Cannot find module './etc/smtp.json'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)
    at /usr/local/games/dankdomain/email.js:125:31
    at Generator.next (<anonymous>)
    at /usr/local/games/dankdomain/email.js:11:71
    at new Promise (<anonymous>)
    at __awaiter (/usr/local/games/dankdomain/email.js:7:12)
    at Message (/usr/local/games/dankdomain/email.js:124:16)
(node:1004) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:1004) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

It would probably be good to fix this, but optionally is there a way to disable email verification completely? Thanks!

Ah, noticed that there are a couple of smtp options, so was able to get it working. Though, is there a way to completely disable email verification and just set the password manually during user creation?

Thanks! So far so good.

Thanks for the feedback. Glad you found how to configure it.

I suppose I could disable SMTP by default, but it will be up to the Sysop (use @ at Main Menu for Sysop menu) to elevate any new remote user to an appropriate access level. You can do this manually with:

$ sqlite3 ./users/dankdomain.sql
sqlite> update set access='Serf' where id = 'TFA';

There is a "backdoor" to this, just enter the same email as the Sysop email address (grep email etc/sysop.json) and the new user registration will "skip delivery" and echo SQL instructions to retrieve the password (locally).

Ok, no biggie, I think we can probably close this one out. I have it configured to email users so all is good. Thanks again!