LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2008, 05:57 PM   #1
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Rep: Reputation: 15
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.
 
Old 08-18-2008, 10:32 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
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.
 
Old 08-18-2008, 11:05 PM   #3
popowich
Member
 
Registered: Nov 2004
Location: Rochester, New York
Distribution: RHEL5
Posts: 53

Rep: Reputation: 15
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
 
Old 08-19-2008, 02:05 AM   #4
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
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
 
Old 08-19-2008, 11:01 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ]SK[ View Post
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..

Last edited by trickykid; 08-19-2008 at 11:02 AM.
 
Old 08-19-2008, 11:40 AM   #6
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
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.
 
Old 08-19-2008, 02:06 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ]SK[ View Post
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.
 
Old 08-19-2008, 02:35 PM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
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.
 
Old 08-19-2008, 02:40 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by Mr. C. View Post
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.
 
Old 08-19-2008, 03:56 PM   #10
]SK[
Member
 
Registered: Jun 2004
Location: Nottingham, England
Posts: 89

Original Poster
Rep: Reputation: 15
I'll take a look at that, thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Godaddy webmail & my postfix server hank43 Linux - General 3 10-10-2006 11:22 PM
Postfix Mail Server, OE can't receive but Webmail can read rickylim *BSD 2 03-14-2006 04:09 AM
taking backup and restoring postfix mail files cbekannan Linux - Software 0 11-04-2005 03:49 AM
taking backup and restoring postfix mail files cbekannan Linux - Software 3 10-28-2005 05:34 AM
Postfix mail server not accepting incoming mail from the external interface rexmundi Linux - Networking 7 12-22-2003 04:41 PM


All times are GMT -5. The time now is 08:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration