This is a discussion on MX record in control/smtproutes within the alt.comp.mail.qmail forums, part of the Mail Servers and Related category; Hi, Is there a patch or work-around to have an MX record in control/smtproutes? This is much cheaper ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Vahid Moghaddasi wrote:
> Hi, > Is there a patch or work-around to have an MX record in > control/smtproutes? This is much cheaper than a hardware load balancer. > Thanks, > Not sure I understand your question. The normal operation of qmail-remote is to perform an MX record lookup. The short answer to your question is yes there is a "patch" and "work-around" such that outgoing emails rely on MX records and that is that no domain specific entries are added into the control/smtproutes file. Unfortunately, it seems that you are confusing the use of smtproutes and load-balancers. 1) load-balancers are used for the incoming portion of emails into your server/servers. 2) smtproutes are used for the outgoing routing of emails from your server. 3) Normally an external mail server does not have a specific routing direction for their email server for domains of other people (no smptroutes/routing tables). Their mail servers will consult the MX records for each email recipient's domain. 4) Even though MX records provide for "email distribution" amoung multiple servers, it in now way guarantees that the load will be evently distributed accross the multiple server as one would achieve with a load-balancer. i.e. since these days many mail servers are providing anti-virus/anti-spam etc filtering, an influx of a particular set of messages could drive the load on a system higher a load balancer could potentially distribute the set of messages amoung several mail servers. AK |
|
|||
|
AK wrote:
> Vahid Moghaddasi wrote: > > > Hi, > > Is there a patch or work-around to have an MX record in > > control/smtproutes? This is much cheaper than a hardware load balancer. > > Thanks, > > > > Not sure I understand your question. > > The normal operation of qmail-remote is to perform an MX record lookup. > In normal circumstances we don't need control/smtproutes since qmail sends the mail to the MX record of the recipient address. Right? I have two smpt servers with MX record of smtp.example.com which resolve into two servers: 10 smtp1.example.com 20 smtp2.example.com Now, I have many qmail servers who can *not* send mail out anywhere except to the two servers above smtp1 and smtp2 but I want them to follow MX rule of sending to smtp1 first then smtp2. I can not put two servers in the following format in control/smtproutes or can I?: : smtp1.example.com : smtp2.example.com Therefore I need either a hardware load balancer to create a VIP for smtp.example.com and have the LB do the balance or find a way to have qmail understand the MX record (not A record) in the control/smtproutes. If I just put :smtp.example.com in that file, I will just get error of host not found. |
|
|||
|
Vahid moghaddasi wrote:
> AK wrote: > >>Vahid Moghaddasi wrote: >> >> >>>Hi, >>>Is there a patch or work-around to have an MX record in >>>control/smtproutes? This is much cheaper than a hardware load balancer. >>>Thanks, >>> >> >>Not sure I understand your question. >> >>The normal operation of qmail-remote is to perform an MX record lookup. >> > > In normal circumstances we don't need control/smtproutes since qmail > sends the mail to the MX record of the recipient address. Right? > I have two smpt servers with MX record of smtp.example.com which > resolve into two servers: > 10 smtp1.example.com > 20 smtp2.example.com > Now, I have many qmail servers who can *not* send mail out anywhere > except to the two servers above smtp1 and smtp2 but I want them to > follow MX rule of sending to smtp1 first then smtp2. > I can not put two servers in the following format in control/smtproutes > or can I?: > : smtp1.example.com > : smtp2.example.com > Therefore I need either a hardware load balancer to create a VIP for > smtp.example.com and have the LB do the balance or find a way to have > qmail understand the MX record (not A record) in the > control/smtproutes. If I just put :smtp.example.com in that file, I > will just get error of host not found. > Are you saying that you have a setup where you have remote qmail servers and all they do is forward their queue to the two smpt1 and smpt2 servers? smtproutes can only handle a single route entry. have you looked into using qmail-qmtp on those remote servers? you will not get an error on smtp.example.com if you were to define it in DNS to resolve to as many or as few IPs as you want. use a short TTL 30/60 seconds. As I said in the prior email, it will not load balance, but it will distribute the connections. Any hostname you use, you need to define. hostnames do not magically appear in DNS. AK |
|
|||
|
AK wrote:
> > Are you saying that you have a setup where you have remote qmail servers > and all they do is forward their queue to the two smpt1 and smpt2 servers? > Yes. > > smtproutes can only handle a single route entry. :( > > have you looked into using qmail-qmtp on those remote servers? > No, not sure how it will help me, will take a look. > > you will not get an error on smtp.example.com if you were to define it > in DNS to resolve to as many or as few IPs as you want. use a short TTL > 30/60 seconds. As I said in the prior email, it will not load balance, > but it will distribute the connections. I don't want to distribute the connections, want to go to the first smtp1 all the times until smtp1 is down then go to smtp2, typicat MX/LB behaviour. > > Any hostname you use, you need to define. hostnames do not magically > appear in DNS. I hope not! > > AK |