0

POSTFIX - DOVECOT - NODE JS - SMTP - RECEIVING_EMAIL

I have completed the setup for sending email from my custom domain using the Postfix Smtp server. Now I need to receive the email from any mail service on my custom domain server.

Use Case: I need to save the received email from anywhere, like GMAIL, Outlook, Thunderbird, etc., and I need to save it on the Postgres database.


POSTFIX Config: In the main.cf file for Postfix, the following line is configured:

mailbox_command = /usr/bin/node /opt/nodejs/DMail-PWA-api/receiveEmail.js

receiveEmail.js - this is my custom nodejs script that will save the received email to the database and trigger a API.

I can successfully receive emails and trigger the receiveEmail.js script, which then calls a specific API with the received emails.

Issue: Emails are only being received when sent using the echo command or through our SMTP. Emails from external services like Gmail or Outlook are not being received by our custom domain on the postfix server.

Question : How do I resolve the above derived issue? How do I receive the email from Gmail to my custom domain?

If any other alternate option/workaround is available, please let me know. Any input is appreciated.

1
  • Guys Please check the above issue and give us your feedback. Thanks!
    – AIT DEV
    Commented Jun 17 at 13:18

0

You must log in to answer this question.

Browse other questions tagged .