Question

I have a strange requirement, any website user(not linux system user) will be getting a email id, say jack@mywebsite.com,sarah@mywebsite.com with which they are going to have a inbox feature built into their dashboard. Any outside user(can be anyone on the planet/not precisely my website user) can email this jack@mywebsite.com and jack receives email at her inbox(built into her dashboard). To accomplish this, I think, the following are the prerequisites:

  1. I need to put MX records pointing to my production machine for mywebsite.com
  2. I need to have a smtp server(can be Postfix) running on my prod machine

Along with these, do I need to setup any sort of mail accounts with MTA? I dont want create these website users as actual system users(I hat doing "useradd -s /sbin/nologin username ") How can I accomplish this entire behaviour?

Was it helpful?

Solution

In sendmail this can be done via virtusertable. For postfix this is the virtual alias table.

So setup an MX record for the domain to point to your host with the postfix SMTP server setup.

Then config postfix to accept *@mywebsite.com and deliver it to a local mail box. Details in the Virtual Domain How To
Add the virtual domain (mywebsite.com) to the main.cf file, and then an entry for @mywebsite.com to point to a real account, say "webmail".

Then setup a real linux account for "webmail" and configure procmail in that account to process all incoming email and do whatever is necessary to put it into their web dashboard.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top