Dear all,

First, I am sorry if my question is more to python script.
I am running Mailman (2.0.10) list in the exist virtual domain
(qmail+vpopmail, had some users (POP3) and 2 mailing-lists /w ezmlm).

Because I dont want to creates/removes files .qmail-* manually, I tried to
insert (newbie) script commands in file "newlist", where it will
automatically generates .qmail-* in the proper location (Mailman directory
OR vpopmail 'domain*name' directory) and it works.

The problem is I am a very newbie with python, (in file rmlist) I don't
know how to create script commands to removes the relevant .qmail-*
automatically, any help for the script would be appreciated. Thanks.



configured with:
--prefix=/home/mailman --with-mail-gid=vchkpw \
--with-cgi-id=nobody --with-cgi-gid=nobody


mm_cfg.py :
-----------
DEFAULT_HOST_NAME   = 'list.add.com.id'      #example
MTA_ALIASES_STYLE   = 'qmail'

# vpopmail domains directory, usually '/home/vpopmail/domains',
# '' if not using vpopmail (virtual list only domains)
VPDPREFIX       = '/home/vpopmail/domains'


from file bin/newlist :
-----------------------
...
...
print STDOUTMSG
print output

##--start-- insert--##

# will creates .qmail-* at PREFIX directory or at vpopmail 'domain*name'
# directory (/home/vpopmail/domains/list.add.com.id) for listname 'test':
# .qmail-test, .qmail-owner-test, .qmail-test-admin, .qmail-test-owner,
# .qmail-test-request

if style  == 'qmail':
    from Mailman.mm_cfg import PREFIX, DEFAULT_HOST_NAME, VPDPREFIX
    WRAPLOC = os.path.join(PREFIX, 'mail', 'wrapper')
    if VPDPREFIX != '':
        DOTLOC = os.path.join(VPDPREFIX, DEFAULT_HOST_NAME)
    else:
        DOTLOC = PREFIX
    dotq='.qmail-'
    dotqext = open(DOTLOC+"/"+dotq+listname, 'w')
    dotqext.write( "|preline " +WRAPLOC +" post " +listname +"\012" )
    dotqext.close()
    dotqext = open(DOTLOC+"/"+dotq+listname+"-admin", "w" )
    dotqext.write( "|preline " +WRAPLOC +" mailowner " +listname +"\012" )
    dotqext.close()
    dotqext = open(DOTLOC+"/"+dotq+listname+"-owner", "w" )
    dotqext.write( "|preline " +WRAPLOC +" mailowner " +listname +"\012" )
    dotqext.close()
    dotqext = open(DOTLOC+"/"+dotq+"owner-"+listname, "w" )
    dotqext.write( "|preline " +WRAPLOC +" mailowner " +listname +"\012" )
    dotqext.close()
    dotqext = open(DOTLOC+"/"+dotq+listname+"-request", "w" )
    dotqext.write( "|preline " +WRAPLOC +" mailcmd " +listname +"\012" )
    dotqext.close()
##-- end --##

if appendfile:
    fp = open(appendfile, 'a')
    fp.write(output)
    fp.write('\n')
    fp.close()
...
...
------------------------------------------------------------------------






_______________________________________________
Mailman-Developers mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-developers

Reply via email to