I'm using cPanel and Mailman (mailing lists) on a shared server with a webhost.
After changing the 'A' record for one of my add-on domains (let's say abc.org), so that its website traffic goes to another sort-of webhost (123.com) but email stays where it is (a few other changes were done to keep mail were it was), I now find that my Perl scripts which try to access the Mailman mailing lists for that domain, don't work.

Note: I prefer to sometimes use Perl scripts to work with the mailing lists, instead of doing it from cPanel because:

It allows people to make mailing list updates via my Perl web
application.

It allows me to make bulk queries and updates.

The 1st reason the scripts are failing is because the URL they usually use to access all my mailing lists for several domains from Perl is: domain-name/mailman/listinfo
So, because the abc.org's 'A' record now points to 123.com, the above URL tries to find abc.org/mailman/listinfo at 123.com, but fails with a "404 - Not Found" error, of course, because the mailing lists are not there.

My webhost has suggested I create a subdomain (e.g. mailman.abc.org), and then recreate all the mailing lists for abc.org in that, but I want to avoid that if possible because of the hassle and side-effects.

Q1. Any suggestions on what URL I can now use to access the mailman/listinfo page of my abc.org mailing lists?

Q2. Or, can you suggest a way to prevent my requests for abc.org/mailman/listinfo from being redirected to 123.com with the rest of the traffic for abc.org?

Months later...
Now that I happen to have another domain name for the same site (let's call it "abc.net"), I'm planning to work around this issue as follows. In cPanel, redirect abc.net web traffic to abc.org, and I can even use the "Wildcard Redirect" option. I'll then move the mailing lists and accounts to the abc.net domain, and add a domain forwarder to forward all abc.org emails to abc.net. If I then visit pages like abc.net/mailman it will fail because of the wildcard redirect (and that's fine coz I don't need to go there). However, my tests show that the wildcard redirect works only to a depth of 1 directory, so when I visit pages like abc.net/mailman/admin, it should work. (I've tested that last part and it does work.)

Not possible. DNS records are looked up completely independent of any path appended to the domain. DNS servers will never see the path the user is requesting, only the domain name.
– nathangiesbrechtMay 8 '14 at 17:23

1 Answer
1

Unfortunately with your current hosting setup, there is nothing you can do except to make a separate subdomain for your mailing lists.

You need a reverse proxy in front of your abc.org site, that forwards traffic based on the URL either to the webydo hosting service or your server that has the mailman software.

This cannot be accomplished via DNS.

Your terminology is not correct. There is no redirection performed when DNS A records are used. DNS A records simply tell on which IP address a particular domain name is. So, abc.org/mailman/listinfo is not redirected anywhere.