After thinking long and hard about the best way to provide sorted domains names, I believe the winner is to sort /var/qmail/users/assign when it is updated by vopomail. Since Qmail and vpopmail don't care about the order of entries in the file, I don't expect it to have any effect on existing programs, but I believe it is the most efficient way to maintain a sorted list of domains.

Vpopmail is happily running here with a sorted users/assign file.


Comments?



Should it have a ./configure option?



Which way should it sort? ( Normal order: Host.Domain.TLD)


dth       Domain - TLD - Host
------
domaina.com
a.domaina.com
b.domaina.com
domaina.net
a.domaina.net
b.domaina.net
domainb.com
a.domainb.com
b.domainb.com
domainb.net
a.domainb.net
b.domainb.net

This one groups all the second level domain names together, so if a custoemr owns domain.com, domain.net and domain.org, they will app appear together in the sort. This is the one I find most useful.


This is the natural sort if you just take the alphanumeric value of the entire domain name. This groups similar host names together, or similar domain names, if the name is only domain.tld. This is easy, but not very valuable.


-------------------------------------------------------------------------

dth    Top Domain Host
domaina.com
a.domaina.com
b.domaina.com
domainb.com
a.domainb.com
b.domainb.com
domaina.net
a.domaina.net
b.domaina.net
domainb.net
a.domainb.net
b.domainb.net

This one groups all the .au, .com, .net etc together. Within the top level domain groups the domain names are sorted. If a domain has multiple hosts, the host names are sorted, and appear after the domain name with no host.


-------------------------------------------------------------------------


hdt       Host - Domain - TLD
-----
a.domaina.com
a.domaina.net
a.domainb.com
a.domainb.net
b.domaina.com
b.domaina.net
b.domainb.net
b.domainb.net
domaina.com
domaina.net
domainb.com
domainb.net


Rick




Reply via email to