Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi Site, Single domain Vpop+mysql

Status
Not open for further replies.

Trancemission

Technical User
Oct 16, 2001
108
GB
I am looking at implementing a multi site qmail solution. Currently I am looking at having a primary mail server [with high availibility] configured as my lowest MX preference for a single domain.

This server would then need to forward/deliver the mail to the relevant local mailserver where the users Maildir exists. I am only looking at having 3 local mailservers. These mailservers would ideally be configured identical so that they will accept and forward mail for any user within my domain.

I have followed many times before and am very happy with the results, my problem is I do not fully understand at what point the mail is deemed to be local [ie has a local mailbox Maildir] and whether the email is forewarded to the a mailserver.

I looked at a server centric solution using NFS to store mail folders but decided not to follow.

I have looked thorugh the forums on here and see that this has been referenced before but I cannot find any How-to's or guides.

I am confident I can implement qmailrocks at all sites, but I need more understaing of internal routing of mail [using VPOPmail with mysql] so I can deliever mail to remote mail-servers which carry mailboxes for a single domain.

I am looking for a quick note to see where configuration data is held for mailboxes located on local server, if the mailbox doesn't exist then forward to the relvant server. I want to use a single domain with no sub domains to receive mail from the internet [ie not user@location.domain.com

Trancemission
=============
If it's logical, it'll work!
 
Trance, typically you would implement redundancy in your qmail implementation in the following ways:

1) Add more MX servers at geographically disparate networks with the same MX number. These servers (gateways) would (could) do anti-virus processing on their level and would forward email into your local server farm.

2) Your local server farm is based upon a single NFS server with multiple IMAP/POP3/Webmail servers running who have no local email boxes.

Your situation is a bit different and probably should be thought out a bit more to make sure you're getting what you want...

What you COULD do is use multiple gateways with MX records answering/sending email for your mail servers which have NO MX records. Name these local servers mail1.example.com, mail2.... etc.

Then in your gateways, you would use .qmail-username files for delivery to the local gateways by forwarding the email from "user@example.com" to "user@mail1.example.com" locally. This way you do not have to publicly deal with exposing the multiple internal hosts.

HOWEVER, please do spend some time forecasting the amount of administrative effort you'll require to support this. Once you start adding, deleting, MOVING users, this has the potential to become a quagmire of effort.

This is why many email solutions get built with a central NFS server instead.




Internet Directory
 
What you COULD do is use multiple gateways with MX records answering/sending email for your mail servers which have NO MX records. Name these local servers mail1.example.com, mail2.... etc.

Then in your gateways, you would use .qmail-username files for delivery to the local gateways by forwarding the email from "user@example.com" to "user@mail1.example.com" locally. This way you do not have to publicly deal with exposing the multiple internal hosts.

I like this idea - I do not forsee [famous last words] a huge administration task on this domain - adding/[re]moving users will not be common. I like the idea of a single gateway facing the public internet, recieving all mail for my domain, scanning the mail for viruses - use spam assasain to remove spam, then forward mail to the local mail server [which runs IMAP/POP services]

I have never directly edited .qmail files to filter mail to mailboxes - I have always used vpopmail which seems to automatically create the Maildir and setup forwards to that mailbox? How would I use VPOP in the proposed scenario - at the moment I haven't thought about it much but I am assuming I will need to implement a local1.domain.com system - something which I have never attempted, any direction here would be appreciated.

I think I need help with fundamental understanding of mail routing with qmail and how VPOP uses this [if at all]. Using VPOP although simple, seems to hide some important qmail processes.


Trancemission
=============
If it's logical, it'll work!
 
I think your asking how you can send mail a server deems "local" to another server - here is info off the qmail FAQ

How do I send local messages to another host? All the mail for af.mil should be delivered to our disk server, pokey.af.mil. I've set up an MX record for af.mil in DNS. The problem is that we also have a machine named af.mil; when a user on that host sends a message to af.mil, af.mil tries to deliver it locally. How do I stop that?

Answer: Remove af.mil from /var/qmail/control/locals, and tell qmail to read locals. Make sure the MX is set up properly before you do this. Also make sure that pokey can receive mail for af.mil.
 
I think you're starting to mix the solutions and getting into dangerous territory...

The public-facing gateway(s) would be the only machines defined as MX's. Local machine(s) would only provide mail service to users.

These two classes of machines would be taught (via smtproutes and rcpthosts) files how they should behave.

If you are willing to use only one internal mailhost then the architecture is quite simple. Using more than one internal host creates substantially more effort.

Internet Directory
 
Thanks for the replies, I think I am getting there:

Public Facing mailserver listed as only MX entry in domain -> [virus scanning etc..]

I would then need to configure this server to route mail using smtproutes and rcphosts to the relevant mailserver which holds that mailbox [and offers IMAP/POP services]

If a user is added/changed, I would need to configure above mentioned files as well as adding the mailbox on the local mailserver.

I think?

I have been thinking about centrel NFS solution but think I will go for the above.

I need to educate myself more about configuration of qmail and routing of the mail when receieved to local/remote mailboxes.


Trancemission
=============
If it's logical, it'll work!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top