[Mailman-Developers] Virtual Domains Redux (w proposal)
Rich Johnson
rjohnson at dogstar-interactive.com
Thu Mar 9 19:02:31 CET 2006
On Mar 9, 2006, at 9:55 AM, Ian Eiloart wrote:
>>
>> Actually, implementing the lists/<hostname>/<localpart> and
>> archives/(private|public)/<hostname>/<localpart> was one of the first
>> things I have implemented, as it is one of the easiest parts and had
>> been mentioned at
>> http://www.zope.org/Members/bwarsaw/MailmanDesignNotes/VirtualHosting
>
> I'd propose a slight variation on that, to better accommodate
> campus/corporate setups, as well as hosting providers:
>
> lists/tld/subdomain/.../listname
>
> [...snip...]
With all these variations, it might be reasonable to consider dumping
the path macros altogether and switch to a functional model.
The path mapping functions could be supplied by mm_cfg and modified
as appropriate for the installation.
For example, the existing 2.1 storage is functionally equivalent to:
def list_dir ( domain, list_localpart ) {
return os.path.join( VAR_PREFIX, 'lists', list_localpart )
Whereas what you're asking for is:
def list_dir( domain, list_localpart ){
leaf = list_localpart
for dom_part in domain.split('.'):
leaf = os.path.join( dom_part, leaf )
return os.path.join( VAR_PREFIX, 'lists', leaf )
And what works for _my systems_ would be:
def list_dir( domain, list_localpart ){
return os.path.join( '/var/vdomains/', domain, '/mailman/
lists', list_localpart)
IF one simply _MUST_ have different mapping regimes for different
domains....well, then encode it into your mm_cfg.list_dir().
More information about the Mailman-Developers
mailing list