Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

post_message.js: Configuration property "web.port" is not defined #72

Open
rda0 opened this issue Feb 22, 2022 · 0 comments
Open

post_message.js: Configuration property "web.port" is not defined #72

rda0 opened this issue Feb 22, 2022 · 0 comments

Comments

@rda0
Copy link

rda0 commented Feb 22, 2022

Using post_message.js from a postfix mailserver via pipe produces the following error:

WARNING: No configurations found in configuration directory:/etc/postfix/config
WARNING: To disable this warning set SUPPRESS_NO_CONFIG_WARNING in the environment.
post_message Using stdin as email source
/opt/email-bot/node_modules/config/lib/config.js:182
    throw new Error('Configuration property "' + property + '" is not defined');
    ^

Error: Configuration property "web.port" is not defined
    at Config.get (/opt/email-bot/node_modules/config/lib/config.js:182:11)
    at postMessage (/opt/email-bot/post_message.js:40:43)
    at Socket.<anonymous> (/opt/email-bot/post_message.js:23:9)
    at Socket.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

I tried hardcoding process.env.NODE_ENV = 'production'; which did not help (no idea how to set the env variable via postfix).

Postfix is configured as in https://serverfault.com/a/258491/209089 and in /etc/postfix/master.cf:

matrixemailbot   unix  -       n       n       -       -       pipe
  flags=FR user=email-bot argv=/usr/bin/node /opt/email-bot/post_message.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant