views:

173

answers:

1

I have a strange requirement, any website user(not linux system user) will be getting a email id, say [email protected],[email protected] 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 [email protected] 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?

A: 

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.

Ryan Watkins
If you dont mind, Could you explain clearly? And I use postfix.
Maddy
Just to be clear, any website user will be having their own personal login email id(say [email protected]) and he will be picking his own "mywebsite" ALIAS(equivalent of [email protected]) for his inbox. This will be his inbox email id. He receives everything at that email id.
Maddy
Awesome Ryan. :D
Maddy
Correct - this will send email for <anything>@mywebsite.com to [email protected]. Then setup [email protected] to do whatever you want with that incoming mail. Ex, pump it all into "processmail.pl" - a perl script to put it wherever your webserver is going to be looking for email.
Ryan Watkins
Ryan As you have mentioned,"...So setup an MX record for the domain to point to your host with the postfix SMTP server setup.", I did it. My mx record is pointing to www.mysite.com. Still I am unable to receive emails at my virtual alias account. My Postfix virtual file has: [email protected] web
Maddy
I assume you ran postmap after updating the file? 'postmap /etc/postfix/virtual'? Have you verified that the mx record is working and that mail is getting delivered to the machine, its just not being mapped to the virtual accnt?
Ryan Watkins