Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 1999 23:38:37 -0700 (PDT)
From:      Nicole Harrington <nicole@nmhtech.com>
To:        Greg Lehey <grog@lemis.com>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: web servers and canonotical domains
Message-ID:  <XFMail.990422233837.nicole@nmhtech.com>
In-Reply-To: <19990423151951.O91260@freebie.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 23-Apr-99 My Secret Spies Reported That Greg Lehey  wrote:
> On Thursday, 22 April 1999 at 22:31:42 -0700, Nicole Harrington wrote:
>>
>>
>>  OK, I may be asking a boneheaded question, but here goes.
>>
>>  I have a mailserver and a web server for a domain. www.domain.com goes =
to
>>  the
>> web server. Domain.com and the MX record point to the mail server. Well,=
 now
>> the
>> execs want http://domain.com to go to the web server.
>>
>> 1) What is the best way to do this?
>=20
> You don't need to change the MX, of course, but you do need to change
> the A record.  Theoretically, this isn't a problem: web browsers use
> the A record, MTAs should use the MX record.
>=20

 Yea, I tried that. SInce this is for an ISP, lossing mail was not an optio=
n
and we did. Sad I know.


>> 2) What is the best way to do this based on the fact that most of our
>> hosted domains are the same way and would be plenty upset if their custo=
mers
>> type http://otherdomain.com and got Our web page.
>=20
> I don't quite understand.  I'm assuming you're running apache, so
> you'll need to tell apache which domain to give for each domain name.
> But that's straightforward.
>=20

 What I meant was that since all the domains domain.com point to our mail
server, any pure redirect will redirect them to OUR web page.=20


>> 3) If I just take domain.com and make IN A X.X.X.X of the web server, it
>> seems
>> many stupid mailers out there don't pay alot of attention to the MX reco=
rd
>> and
>> report no mailer daemon and bounce.
>=20
> That's why I said "theoretically" above.  This is the one problem.
> Now you *could* say "forget them", but there's probably a simpler way:
> run sendmail on the web server and make the web server a
> higher-priority MX for the mail server.  Then those few misguided
> mailers which send to domain.com A instead of domain.com MX will still
> get through.  I don't expect the volume would be enough to worry about.
>=20

 Yes, the only problem is syncing this to the mail servers rcpthosts to kee=
p up
with who we accept mail for. Good idea though.


>>  I thought of a perl script that opened a port 80 socket and simply said
>>  "if $www.domain.com" then send BAD URL" (to prevent looping)
>>  " if .$domain.com send  error code moved permenently - (redirecting to
>> www.$domain.com)
>>
>>  Would this work?
>=20
> Not really.  Your problem is with mail, not http.  If you really
> wanted to keep separate IP addresses for www.domain.com and
> domain.com, you could run a small web server on the mail server and
> redirect from there, but I think this is the wrong solution: there's
> nothing wrong with the web clients, it's broken mail clients that are
> the problem.


 You said it!=20

>=20
>> anyone done something like this. I don't want to route the web
>> traffic through the mail server and I don't want to route mail
>> traffic through the web server.
>=20
> I'm suggesting that you could afford to route some mail through the
> web server.  I don't think it would be very much, less than 1% of the
> full load.  You have alternatives, of course: either ignore the
> problem (people with broken mailers can't send you messages) or get
> sendmail on that system to answer "go away, get a real MTA".
>=20

 Hmm keeping things synced to our Qmail system would be fun and we already =
have
1 backup MX and soon an offsite 2nd, so fitting this in would be fun. It wo=
uld
also force the web server into the role of caching mailserver, which is not
an option as we have many clients who have us cache mail for them for some
bizzare reason.

 Personally I like the "go away, get a real MTA" option, but having
people paying money putting on a nectie (my bosses) seems to change that
perspective.


 Hmmmm.=20


   Nicole


> Greg
> --
> See complete headers for address, home page and phone numbers
> finger grog@lemis.com for PGP public key

                          |\ __ /|   (`\           =20
                          | o_o  |__  ) )          =20
                         //      \\                =20
          nicole@nmhtech.com | http://www.webweaver.net/
webmistress@dangermouse.org  | http://www.dangermouse.org
-------------------------(((---(((-----------------------
=20
         -  Powered by Coka Cola and FreeBSD  -
     - Stong enough for a man - But made for a Woman -
=20
        - I'm not ADD - I'm just Multithreaded   -
      - Microsoft: What bug would you like today?  -
----------------------------------------------------------
SYSADMIN(1)
Sysadmin is the keeper of all things computer, is generally harangued, must=
 be=20
supplied with caffeine, chocolate,  and  sushi in order  to  function=20
properly,=20
cannot be exposed to direct sunlight, and must not be allowed to have a lif=
e.





To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990422233837.nicole>