Changeset 811

Show
Ignore:
Timestamp:
09/08/08 21:29:07 (2 months ago)
Author:
free
Message:

Added webmin and postifx classes

Location:
ares/trunk
Files:
1 added
3 modified

Legend:

Unmodified
Added
Removed
  • ares/trunk/ares.py

    r808 r811  
    6969        self.apt          = _Apt(self) 
    7070        self.sshd         = _Sshd(self) 
     71        self.postfix      = _Postfix(self) 
     72        self.webmin       = _Webmin(self) 
    7173        self.postconfig   = _Postconfig(self) 
    7274 
     
    622624 
    623625# 
     626# Postfix 
     627# 
     628class _Postfix: 
     629 
     630    def __init__(self, ares): 
     631        self._ares = ares 
     632        self._cfg = '/files/etc/postfix/main.cf' 
     633 
     634    def setup(self): 
     635        cfg = self._cfg 
     636        aug = self._ares.aug 
     637 
     638        aug.set(cfg + '/home_mailbox', 'Maildir/') 
     639        aug.set(cfg + '/content_filter', 'smtp-amavis:[127.0.0.1]:10024') 
     640 
     641# 
     642# Webmin 
     643# 
     644class _Webmin: 
     645 
     646    def __init__(self, ares): 
     647        self._ares = ares 
     648        self._cfg = '/files/etc/webmin/miniserv.conf' 
     649 
     650    def setup(self): 
     651        cfg = self._cfg 
     652        aug = self._ares.aug 
     653 
     654        aug.set(cfg + '/ssl', '1') 
     655 
     656        cfg =  '/files/etc/webmin/ldap-useradmin/config' 
     657        aug.set(cfg + '/auth_ldap', '/etc/ldap.conf') 
     658        aug.set(cfg + '/shells',        'fixed,passwd,shells') 
     659        aug.set(cfg + '/samba_def',     '1')    
     660        aug.set(cfg + '/samba_gclass',  'sambaGroupMapping') 
     661        aug.set(cfg + '/other_class',   'inetOrgPerson') 
     662        aug.set(cfg + '/ldap_tls',      '0')         
     663        aug.set(cfg + '/login',         'cn=admin,dc=nodomain') 
     664        aug.set(cfg + '/user_base',     'ou=People,dc=nodomain')  
     665        aug.set(cfg + '/group_base',    'ou=Group,dc=nodomain') 
     666        aug.set(cfg + '/props',         'sn:Cognome') 
     667        aug.set(cfg + '/default_shell', '/bin/bash')           
     668        aug.set(cfg + '/pass',          'admin')             
     669        aug.set(cfg + '/samba_domain',  'S-1-0-0') 
     670 
     671# 
    624672# Postconfig 
    625673# 
  • ares/trunk/debian/postinst

    r804 r811  
    2525     done 
    2626 
    27      cdd-config ldap server 
    28      cdd-config ldap client 
    29  
     27     # TODO 
    3028     db_get ares/manager-password 
    3129     password="$RET" 
     
    4240     db_get arno-iptables-firewall/config-int-net 
    4341     net="$RET" 
    44      cdd-config squid $net 
    4542 
    46      db_get postfix/mailname 
    47      hostname="$RET" 
    48      cdd-config fqdn $hostname 
    49  
    50      db_get postfix/root_address 
    51      root="$RET" 
     43     # TODO set root alias and custom master.cf 
    5244     cdd-config postfix $root 
    53  
    54      cdd-config dnsmasq $(echo $net |cut -f 1-3 -d .) 
    55      cdd-config hosts $(echo $net |cut -f 1-3 -d .).1 $hostname ares 
    56      cdd-config monit 
    57      cdd-config ssl 
    58      cdd-config squirrelmail $hostname 
    59      cdd-config amavis $hostname 
    60  
    61      cdd-config spamassassin 
    62      cdd-config fetchmail 30 
    63      cdd-config samba 
    64      cdd-config webmin 
    65      cdd-config nfs server 
    66      cdd-config havp 
    67      cdd-config klogd 
    68      cdd-config apt ares hardy 
    69      cdd-config sshd /usr/share/ares/authorized_keys 
     45      
     46     # TODO create a proper lens for webmin 
    7047 
    7148    ;; 
  • ares/trunk/tests/TestAres.py

    r804 r811  
    1616        ares = Ares(test=True) 
    1717        ares.ldap.setup() 
     18        ares.hostname.setup() 
     19        ares.hosts.setup() 
     20        ares.dnsmasq.setup() 
     21        ares.monit.setup() 
    1822        ares.squid.setup() 
    19         ares.hostname.setup() 
    20         ares.dnsmasq.setup() 
    21         ares.hosts.setup() 
    22         ares.monit.setup() 
     23        ares.amavis.setup() 
     24        ares.spamassassin.setup() 
     25        ares.postfix.setup() 
    2326        ares.ssl.setup() 
    2427        ares.squirrel.setup() 
    25         ares.amavis.setup() 
    26         ares.spamassassin.setup() 
    2728        ares.fetchmail.setup() 
    2829        ares.samba.setup() 
     30        ares.webmin.setup() 
    2931        ares.nfs.setup() 
    3032        ares.havp.setup() 
    3133        ares.apt.setup() 
    3234        ares.sshd.setup() 
     35        ares.nfs.setup() 
    3336        ares.aug.save() 
    3437        ares.postconfig.setup()