ma
branchfoerste
changeset 54 1f74755c407e
parent 48 36aca6fb0ab8
child 71 2bb072311ed8
equal deleted inserted replaced
53:a1399e17cca4 54:1f74755c407e
     3 # © 2005 Heiko Schlittermann <hs@schlittermann.de>
     3 # © 2005 Heiko Schlittermann <hs@schlittermann.de>
     4 # $URL$
     4 # $URL$
     5 # $Id$
     5 # $Id$
     6 #
     6 #
     7 use constant USAGE => <<'#';
     7 use constant USAGE => <<'#';
     8 Usage: !ME! account|alias|group --add|--list|--modify|--delete [options] [user|alias|shared mbox]
     8 Usage: !ME! account|alias|group|acl --add|--list|--modify|--delete [options] [user|alias|shared mbox]
     9        * common options *
     9        * common options *
    10        --ldap_server=s	LDAP-Server	[!$Cf->ldap_server!]
    10        --ldap_server=s	LDAP-Server	[!$Cf->ldap_server!]
    11        --ldap_base=s	LDAP-Basis	[!$Cf->ldap_base!]
    11        --ldap_base=s	LDAP-Base	[!$Cf->ldap_base!]
    12        --ldap_admin=s	LDAP BIND DN	[!$Cf->ldap_admin!]
    12        --ldap_admin=s	LDAP BIND DN	[!$Cf->ldap_admin!]
    13        --ldap_password=s		[!$Cf->ldap_password!]
    13        --ldap_password=s		[!$Cf->ldap_password!]
    14 
    14 
    15        --imap_server=s  IMAP Server	[!$Cf->imap_server!]
    15        --imap_server=s  IMAP Server	[!$Cf->imap_server!]
    16        --imap_admin=s   IMAP Server	[!$Cf->imap_admin!]
    16        --imap_admin=s   IMAP Server	[!$Cf->imap_admin!]
    26        --group:s	Mail Group(s) this account is member of
    26        --group:s	Mail Group(s) this account is member of
    27 			(comma sep.)	[!$Cf->group!]
    27 			(comma sep.)	[!$Cf->group!]
    28        --forward:s	Forwarding	[!$Cf->forward!]
    28        --forward:s	Forwarding	[!$Cf->forward!]
    29 
    29 
    30        --fullname=s	Real Name	[!$Cf->fullname!]
    30        --fullname=s	Real Name	[!$Cf->fullname!]
    31        --password=s	Passwort	[!$Cf->password!]
    31        --password=s	Password	[!$Cf->password!]
       
    32 
       
    33        * acl options *
       
    34        --acl_admin=s    ACL Admin       [!$Cf->acl_admin!]
       
    35        --acl_password=s Pasword         [!$Cf->acl_admin!]
       
    36        --folder:s@      Folder(s)       [!join ',', @{$Cf->folder}!]
       
    37        --acl=s          ACL list        [!$Cf->acl!]
       
    38        --[no]recursive  Rekursive       [!$Cf->recursive!]
    32 
    39 
    33        * alias options *
    40        * alias options *
    34        --members=s	List of Members	[!$Cf->members!]
    41        --members=s	List of Members	[!$Cf->members!]
    35 
    42 
    36        * shared mailbox options *
    43        * shared mailbox options *
    37 
    44 
    38        [ z.Z. nicht unterstützt ]
    45        [ currently not supported ]
    39 
    46 
    40        * group options *
    47        * group options *
    41        --members=s	List of Members	[!$Cf->members!]
    48        --members=s	List of Members	[!$Cf->members!]
    42        --description=s  Descripton      [!$Cf->description!]
    49        --description=s  Descripton      [!$Cf->description!]
    43 
    50 
    44        [ z.Z. nicht unterstützt ]
    51        [ currently not supported ]
    45 
    52 
    46 Passwords for LDAP and IMAP can be read from environment LDAP_PASS resp. IMAP_PASS.
    53 Passwords for LDAP and IMAP can be read from environment LDAP_PASS resp. IMAP_PASS.
    47 Options can be read from config file named in $MA_CONF [!$ENV{MA_CONF}!].
    54 Options can be read from config file named in $MA_CONF [!$ENV{MA_CONF}!].
    48 
    55 
    49 $Id$
    56 $Id$
    96         else                                      { open( X, ">&STDOUT" ); }
   103         else                                      { open( X, ">&STDOUT" ); }
    97         print X help();
   104         print X help();
    98         exit 0;
   105         exit 0;
    99     }
   106     }
   100 
   107 
   101     @_ = grep { $_ =~ /^\Q$Module\E/ } qw/account alias shared group/;
   108     @_ = grep { $_ =~ /^\Q$Module\E/ } qw/account acl alias shared group/;
   102     die "Need module.  Try --help\n" if @_ == 0;
   109     die "Need module.  Try --help\n" if @_ == 0;
   103     die "Module ambigous. (@_)\n" if @_ > 1;
   110     die "Module ambigous. (@_)\n" if @_ > 1;
   104 
   111 
   105     if ( $_[0] eq 'account' ) {
   112     if ( $_[0] eq 'account' ) {
   106         require account;
   113         require account;
   107         account::import($Cf);
   114         account::import($Cf);
   108         account::run();
   115         account::run();
       
   116     } elsif ( $_[0] eq 'acl' ) {
       
   117         require acl;
       
   118         acl::import($Cf);
       
   119         acl::run();
   109     } elsif ( $_[0] eq 'alias' ) {
   120     } elsif ( $_[0] eq 'alias' ) {
   110         require alias;
   121         require alias;
   111         alias::import($Cf);
   122         alias::import($Cf);
   112         alias::run();
   123         alias::run();
   113     } elsif ( $_[0] eq 'shared' ) {
   124     } elsif ( $_[0] eq 'shared' ) {