LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Postfix Backup Mail Server with Webmail (https://www.linuxquestions.org/questions/linux-newbie-8/postfix-backup-mail-server-with-webmail-663686/)

]SK[ 08-18-2008 04:57 PM

Postfix Backup Mail Server with Webmail
 
I would like to offer my customers a backup mail service where should their main mail server go down, mail will hit my backup mail server. Whilst the mail is sat on this server I would like to give them access to read the emails using webmail software such as squirrelmail?

I know the backup mail server part is easily possible, I just don't know if webmail would be an available option.

Thanks before hand.

trickykid 08-18-2008 09:32 PM

Why wouldn't webmail be a viable option? I think the only downside to using squirrelmail or the like is that you would need to install the application for each domain for the email and also run a virtual host with apache for each.

Say for instance if you wanted to backup mail for domainA.com, you need them to point an MX record to your server. If they're gonna do this using a name like mail2.domainA.com, they also have to create an A record for it so all you have to do is setup apache to also listen on port 80 for mail2.domainA.com.

It actually sounds quite easy if you take that approach.

popowich 08-18-2008 10:05 PM

I think this is more complicated than you realize. If you have a web based client like squirrel mail that is trying to read e-mail from actual e-mail accounts you will need to deliver the mail and are no longer providing backup-mx. Also, you'll run into the problem where sometimes their server won't be down but the mail will end up on your server anyways. What about a custom web page that can view a read-only e-mail To: their account, and reply from that page, with the understanding they'll get it on the main server later. I suppose it's possible to also remove the e-mail from your queue if you want to, this is easier done with postfix I'd think that a qmail server. These are some of my first time thoughts on this, but I'm sure more will come to me. Is there an actual client request that you are trying to satisfy or are you simply being creative? If you do come up with a stable working solution for this I'd like to know what it is.

-Raymond

]SK[ 08-19-2008 01:05 AM

The idea is that yes it is a typical backup mail server. So when their primary MX is down mail will be temporarily stored until their main server is back online. After which mail will be routed to its final destination. The bonus I was looking for was to enable webmail to allow them to view mail whilst it sits in the queue.

I know this isn't easy as typically the mail is not being delivered, only stored and queued to be resent.

I guess one solution is to deliver the mail then somehow use something like fetchmail, although this would be different as rather than fetching the mail we are fetching it then pushing it elsewhere. I guess there is no native/easy way of doing this which, is what I was looking for.

Just a few notes. I have basic linux knowledge since I am primarily a Windows IT Engineer. However linux, in my opinion, has great internet services. We use Apache all the time for any web services. Anyway, go easy on me, I only know the basics :)

trickykid 08-19-2008 10:01 AM

Quote:

Originally Posted by ]SK[ (Post 3252250)
The idea is that yes it is a typical backup mail server. So when their primary MX is down mail will be temporarily stored until their main server is back online. After which mail will be routed to its final destination. The bonus I was looking for was to enable webmail to allow them to view mail whilst it sits in the queue.

I know this isn't easy as typically the mail is not being delivered, only stored and queued to be resent.

I guess one solution is to deliver the mail then somehow use something like fetchmail, although this would be different as rather than fetching the mail we are fetching it then pushing it elsewhere. I guess there is no native/easy way of doing this which, is what I was looking for.

Just a few notes. I have basic linux knowledge since I am primarily a Windows IT Engineer. However linux, in my opinion, has great internet services. We use Apache all the time for any web services. Anyway, go easy on me, I only know the basics :)

If you read my reply, this is certainly doable.

If you're going to have a backup mail server for others domains, they have to setup an A record along with it so setting up webmail so they can view email until their main or primary email servers are running again and the email is resent from your servers is certainly doable.

So for instance, I have my own domain called mydomain.com. I have my own mail servers, say mail.mydomain.com and mail2.mydomain.com with the proper MX records for each. Now let's say I want to use your services just in case both of mine go offline, I'd setup mail3.mydomain.com which I'd also have to create not only the MX record but the A record for it that points to the IP you give me. You configure it, I provide the users and passwords, etc.

All you do from that point is also setup apache or your choice with whatever webmail you want (squirrelmail) to listen for mail3.mydomain.com on port 80 or where ever you serve web pages from that's configured for my domain, etc so it's accessible by web as well. Just make sure that squirrelmail is only configured to fetch mail locally from the mail server you're running, no need to fetch from the other servers since they're down.

Easy pleasy nice and cheesy I say.. ;)

]SK[ 08-19-2008 10:40 AM

I don't think you quite understand.

Mail will not actually be accepted on the server as a final destination. This therefore means that email will not be placed into a users folder like it would normally. Reason being is that when a server is configured as a backup MX the mail is re-queued and stays there until it manages to contact the primary MX and make a full delivery. Squirrelmail cannot (as far as I know) read from the mail queue. Squirrelmail is basically a web based IMAP client.

trickykid 08-19-2008 01:06 PM

Quote:

Originally Posted by ]SK[ (Post 3252699)
I don't think you quite understand.

Mail will not actually be accepted on the server as a final destination. This therefore means that email will not be placed into a users folder like it would normally. Reason being is that when a server is configured as a backup MX the mail is re-queued and stays there until it manages to contact the primary MX and make a full delivery. Squirrelmail cannot (as far as I know) read from the mail queue. Squirrelmail is basically a web based IMAP client.

Okay, now I see where you're getting at. I don't think there's a default option to deliver and also resend in Postfix from what I can tell and searched. Yeah, only way this would work is to make the backup MX the final destination.

Mr. C. 08-19-2008 01:35 PM

On the backup MX, you can create virtual aliases, that splits the mail, one to the primary MX as final destination, and one to the local mail store that you allow customer's to view via webmail.

trickykid 08-19-2008 01:40 PM

Quote:

Originally Posted by Mr. C. (Post 3252852)
On the backup MX, you can create virtual aliases, that splits the mail, one to the primary MX as final destination, and one to the local mail store that you allow customer's to view via webmail.

Ah, forgot about virtual aliases. I was digging around with transport options when I briefly looked.

]SK[ 08-19-2008 02:56 PM

I'll take a look at that, thanks.


All times are GMT -5. The time now is 03:36 AM.