Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I wish to host some managed email servers for some customers. Each customer will have their own email server which will be an all-in-one virtual machine running postfix, dovecot and some webmail suite.

Even though each customer will have their own server, I do not wish to give each email server it's own public facing IP. I wish to avail the use of proxy servers so all customers use the same public IP. As for the "smtp-in" from the public internet, this isn't a problem as I can set up many mx servers (using postfix) which will store-and-forward the mail to the correct server (using transport maps). As for the IMAP access from the customer, I was thinking of using perdition which is an IMAP proxy - I believe that this will suit my needs.

I am confused however on what to use for the "smtp-out" proxy. The customers will have to authenticate with their receptive email server, however they will have to go via a proxy of some sort as they won't have direct access to their server instance. It probably can't be a store-and-forward proxy either.

Does anyone have any idea on what I could use here?

Many Thanks

share|improve this question
    
OK, I can't help but ask... why? –  Stemen Jan 10 '11 at 23:16
    
Why to what part? I'll gladly answer :) –  jtnire Jan 10 '11 at 23:22
    
Why does each client need to be assigned a virtual machine running a mail server, rather than take the much easier approach of shared hosting? It should be possible to accomplish what you desire, but is adding a lot of overhead (in my opinion). As far as mail serving goes, shared-hosting is the most commonly found solution. Are you familiar with the way cPanel configures web hosts for mail services? –  Stemen Jan 11 '11 at 13:51

2 Answers 2

Why do they have to authenticate with their own server? Give them each a user and pass for authenticating against the Postfix server doing the proxy and let that act as the outbound relay?

share|improve this answer
    
This is a good idea. But then how would each customer server do authentication (assuming that I don't want to maintain 2 DBs for each customer) ? –  jtnire Jan 11 '11 at 13:08

I could see a few options.

For mail read ( imap ), and write ( smtp ) force them to use a web front end. You can then either use something like squirrelmail, or round cube. Have that server talk imap and smtp to their server. Their server would then either go out a NAT connection, or relay through a server with public access.

Skip this multiple vm, ( one for each customer ). Dovecot, and Postfix on linux can be setup to use a mysql backend, so users authenticate with their email address and password.

If you require their mail to be stored in imap on different systems, then still use dovecot/postfix, but have one smtp server that knows which server to send their email to, but if its outbound to the internet, they still authenticate against the mysql db table. http://johnny.chadda.se/article/mail-server-howto-postfix-and-dovecot-with-mysql-and-tlsssl-postgrey-and-dspam/ covers the setup of postfix and dovecot using mysql.

share|improve this answer
    
Can't do the webmail option as all these customers want to use outlook/thunderbird. I guess I'm just trying to make my system scalable. While I'm familiar with the steps to get postfix working with dovecot and mysql as per the link you posted, how would I get different domains routed to different dovecot servers? –  jtnire Jan 11 '11 at 10:39
    
I would assume that you had that part already, I've never used horms.net/projects/perdition personally. –  becomingwisest Jan 11 '11 at 18:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.