Changeset 1068

Show
Ignore:
Timestamp:
03/21/08 20:07:30 (6 months ago)
Author:
rats
Message:

* Fixed #1085: disable protocols in server status which are not available by default

  • Fixed: two errors in htuser-mngr
  • Fixed #945: logrotate fails because of ispcp script
  • Fixed #1113: removed add COURIER_CONF_DIR and stored userdb to AUTHLIB_CONF_DIR path
  • Fixed #1126: do not add all domains into the MTA domains list
  • Fixed #919: IP Management UI
  • Fixed #1072: open directory (ftp class)
  • Fixed #1115: ispcp/gui/include/ispcp-config.php under FreeBSD
  • Fixed #1116: error in client template in ftp choose dir
  • Fixed #1127: Order of menu entries in webtools
  • Fixed #1114: FreeBSD ispcp-setup-methods should be changed
  • Fixed #1123: database revision should be 1 for updaters
  • Fixed #1117: (Gentoo) /etc/init.d/ispcp_network: line 155: log_warning_msg: command not found
  • Updated Czech, Danish, French
  • Fixed #1119: Update Spelling Mistake
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/CHANGELOG

    r1066 r1068  
    11ispCP ω 1.0.0 Changelog 
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     3 
     42008-03-20 Benedikt Heintel 
     5        - DATABASE: 
     6                * Fixed #1085: disable protocols in server status which are not available by default 
     7        - ENGINE: 
     8                * Fixed: two errors in htuser-mngr 
     9                * Fixed #945: logrotate fails because of ispcp script 
     10                * Fixed #1113: removed add COURIER_CONF_DIR and stored userdb to AUTHLIB_CONF_DIR path 
     11                * Fixed #1126: do not add all domains into the MTA domains list 
     12        - GUI: 
     13                * Fixed #919: IP Management UI 
     14                * Fixed #1072: open directory (ftp class) 
     15                * Fixed #1115: ispcp/gui/include/ispcp-config.php under FreeBSD 
     16                * Fixed #1116: error in client template in ftp choose dir 
     17                * Fixed #1127: Order of menu entries in webtools 
     18        - SETUP: 
     19                * Fixed #1114: FreeBSD ispcp-setup-methods should be changed 
     20                * Fixed #1123: database revision should be 1 for updaters 
     21        - DISTS: 
     22                * Fixed #1117: (Gentoo) /etc/init.d/ispcp_network: line 155: log_warning_msg: command not found 
     23        - LANGUAGES: 
     24                * Updated Czech, Danish, French 
     25 
     262008-03-18 Benedikt Heintel 
     27        - SETUP 
     28                * Fixed #1119: Update Spelling Mistake 
    329 
    4302008-03-16 Benedikt Heintel 
  • trunk/configs/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
    8787),( 
    88 'PORT_POP3-SSL', '995;tcp;POP3-SSL;1;0' 
     88'PORT_POP3-SSL', '995;tcp;POP3-SSL;0;0' 
    8989),( 
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/centos/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/centos/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /etc/authlib 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /etc/authlib 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 10485760 
    333329 
    334330TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic 
  • trunk/configs/dists/centos/logrotate/ispcp

    r1026 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/dists/fedora/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/fedora/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /usr/lib/courier-imap/etc 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /etc/authlib 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 10485760 
    333329 
    334330TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic 
  • trunk/configs/dists/fedora/logrotate/ispcp

    r785 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/httpd/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/dists/freebsd/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/freebsd/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /usr/local/etc/courier-imap 
    270  
    271 AUTHLIB_CONF_DIR =  /usr/local/etc/authlib 
     266# Courier data 
     267
     268 
     269AUTHLIB_CONF_DIR = /usr/local/etc 
    272270 
    273271CMD_MAKEUSERDB = /usr/local/sbin/makeuserdb 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 10485760 
    333329 
    334330TRAFF_ROOT_DIR = /usr/local/www/ispcp/engine/traffic 
  • trunk/configs/dists/freebsd/logrotate/ispcp

    r1026 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/dists/gentoo/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/gentoo/init.d/ispcp_network

    r1007 r1068  
    22 
    33# ispCP ω (OMEGA) a Virtual Hosting Control System 
    4 # Copyright (c) 2007 by ispCP 
     4# Copyright (c) 2007-2008 by ispCP 
    55# http://www.isp-control.net 
    66# 
     
    2727# 
    2828#    http://www.isp-control.net 
     29# 
    2930### BEGIN INIT INFO 
    3031# Provides:             ispcp_network 
     
    6465} 
    6566 
     67# Logging of warn messages 
     68function log_warning_msg () { 
     69    echo -en "$@" echo -e "${stat}${attn} warning${norm}" 
     70} 
     71 
    6672# if not present (e.g. *BSD) make sure to provide compatible methods via /etc/default/$NAME 
    6773if [ -f /lib/lsb/init-functions ]; then 
  • trunk/configs/dists/gentoo/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /etc/courier-imap 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /etc/courier/authlib 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 70391808 
    333329 
    334330TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic 
  • trunk/configs/dists/gentoo/logrotate/ispcp

    r1016 r1068  
    2222} 
    2323 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
     32} 
     33 
    2434/var/log/proftpd/xferlog { 
    2535  daily 
  • trunk/configs/dists/openbsd/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/openbsd/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /usr/local/etc/courier-imap 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /usr/local/etc 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 10485760 
    333329 
    334330TRAFF_ROOT_DIR = /usr/local/www/apache22/ispcp/engine/traffic 
  • trunk/configs/dists/openbsd/logrotate/ispcp

    r1026 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/dists/opensuse/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/opensuse/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /etc/courier 
    270  
     266# Courier data 
     267
     268 
     269# maybe /etc/authlib... has to be tested.. 
    271270AUTHLIB_CONF_DIR = /etc/courier 
    272 # maybe /etc/authlib... has to be tested.. 
    273271 
    274272CMD_MAKEUSERDB = /usr/sbin/makeuserdb 
     
    330328 
    331329MAIL_TRAFF_LOG = mail.log 
    332  
    333 PREV_TRAFF_LOG_MAX_SIZE = 70391808 
    334330 
    335331TRAFF_ROOT_DIR = /srv/www/ispcp/engine/traffic 
  • trunk/configs/dists/opensuse/logrotate/ispcp

    r1026 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/dists/redhat/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/redhat/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /etc/authlib 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /etc/authlib 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 10485760 
    333329 
    334330TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic 
  • trunk/configs/dists/redhat/logrotate/ispcp

    r1026 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/dists/ubuntu/database/database.sql

    r1026 r1068  
    8282'PORT_HTTP', '80;tcp;HTTP;1;0' 
    8383),( 
    84 'PORT_HTTPS', '443;tcp;HTTPS;1;0' 
     84'PORT_HTTPS', '443;tcp;HTTPS;0;0' 
    8585),( 
    8686'PORT_POP3', '110;tcp;POP3;1;0' 
     
    9090'PORT_IMAP', '143;tcp;IMAP;1;0' 
    9191),( 
    92 'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;1;0' 
     92'PORT_IMAP-SSL', '993;tcp;IMAP-SSL;0;0' 
    9393),( 
    9494'PORT_POSTGREY', '60000;tcp;POSTGREY;1;1' 
  • trunk/configs/dists/ubuntu/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /etc/courier 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /etc/courier 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 70391808 
    333329 
    334330TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic 
  • trunk/configs/dists/ubuntu/logrotate/ispcp

    r1016 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/configs/ispcp.conf

    r1066 r1068  
    99# 
    1010 
    11 BuildDate = 20080316 
    12  
    13 Version = 1.0.0 RC4 OMEGA 
     11BuildDate = 20080318 
     12 
     13Version = 1.0.0 RC5 OMEGA 
    1414 
    1515CodeName = Priamos 
     
    264264 
    265265# 
    266 # Courier IMAP/POP3 data 
    267 
    268  
    269 COURIER_CONF_DIR = /etc/courier 
     266# Courier data 
     267
    270268 
    271269AUTHLIB_CONF_DIR = /etc/courier 
     
    329327 
    330328MAIL_TRAFF_LOG = mail.log 
    331  
    332 PREV_TRAFF_LOG_MAX_SIZE = 70391808 
    333329 
    334330TRAFF_ROOT_DIR = /var/www/ispcp/engine/traffic 
  • trunk/configs/logrotate/ispcp

    r1012 r1068  
    2020        done 
    2121        endscript 
     22} 
     23 
     24/var/log/apache2/backup/*.log.perv { 
     25        size 5M 
     26        missingok 
     27        rotate 5 
     28        compress 
     29        delaycompress 
     30        notifempty 
     31        create 640 root adm 
    2232} 
    2333 
  • trunk/engine/ispcp-als-mngr

    r1026 r1068  
    44# Copyright (c) 2001-2006 by moleSoftware GmbH 
    55# http://www.molesoftware.com 
    6 # Copyright (c) 2006-2007 by isp Control Panel 
     6# Copyright (c) 2006-2008 by isp Control Panel 
    77# http://isp-control.net 
    88# 
     
    22092209    $working =~ s/^$als_name\t\t\t[^\n]+\n//gim; 
    22102210 
    2211     $working .= "$als_name\t\t\tvals_entry\n"; 
     2211        # Add domain entry only if mail accounts are activated 
     2212        if (@$als_data[15] >= 0) { 
     2213        $working .= "$als_name\t\t\tvals_entry\n"; 
     2214        } 
    22122215 
    22132216    # 
  • trunk/engine/ispcp-dmn-mngr

    r1042 r1068  
    27532753    $working =~ s/^$dmn_name\t\t\t[^\n]+\n//gim; 
    27542754 
    2755     $working .= "$dmn_name\t\t\tvdmn_entry\n"; 
     2755        # Add domain entry only if mail accounts are activated 
     2756        if (@$dmn_data[8] >= 0) { 
     2757        $working .= "$dmn_name\t\t\tvdmn_entry\n"; 
     2758    } 
    27562759 
    27572760    # 
  • trunk/engine/ispcp-htuser-mngr

    r1026 r1068  
    219219                                                 $htaccess_users_file, 
    220220                                                 $htaccess_users_content, 
    221                                                  $main::cfg{'ROOT_USER'} 
    222                                                  $main::cfg{'ROOT_GROUP'} 
     221                                                 $main::cfg{'ROOT_USER'}, 
     222                                                 $main::cfg{'ROOT_GROUP'}, 
    223223                                                 0644 
    224224                                                ); 
  • trunk/engine/ispcp-mbox-mngr

    r1026 r1068  
    44# Copyright (c) 2001-2006 by moleSoftware GmbH 
    55# http://www.molesoftware.com 
    6 # Copyright (c) 2006-2007 by isp Control Panel 
     6# Copyright (c) 2006-2008 by isp Control Panel 
    77# http://isp-control.net 
    88# 
     
    3131# 
    3232 
    33  
    3433use FindBin; 
    3534use lib "$FindBin::Bin/"; 
     
    24422441    my $conf_dir = $main::cfg{'CONF_DIR'}; 
    24432442 
    2444         my $authlib_dir = undef; 
    2445  
    2446     if (exists $main::cfg{'AUTHLIB_CONF_DIR'} && $main::cfg{'AUTHLIB_CONF_DIR'}) { 
    2447  
    2448             $authlib_dir = $main::cfg{'AUTHLIB_CONF_DIR'}; 
     2443    my $courier_dir = $main::cfg{'AUTHLIB_CONF_DIR'}; 
     2444 
     2445    my $cmd_makeuserdb = $main::cfg{'CMD_MAKEUSERDB'}; 
     2446 
     2447 
     2448    my $working_dir = "$conf_dir/courier/working"; 
     2449 
     2450    my $backup_dir = "$conf_dir/courier/backup"; 
     2451 
     2452    my $timestamp = time; 
     2453 
     2454    my ($sys, $working) = (undef, undef); 
     2455 
     2456        my $userdb_cfg = "$courier_dir/userdb"; 
     2457 
     2458    my $userdb_working_cfg = "$working_dir/userdb"; 
     2459 
     2460    my $userdb_backup_cfg = "$backup_dir/userdb.$timestamp"; 
     2461 
     2462    ($rs, $sys) = get_file($userdb_cfg); 
     2463 
     2464    return $rs if ($rs != 0); 
     2465 
     2466    $rs = store_file($userdb_backup_cfg, $sys, $main::cfg{'ROOT_USER'}, $main::cfg{'ROOT_GROUP'}, 0644); 
     2467 
     2468    return $rs if ($rs != 0); 
     2469 
     2470    my ($hash_key, $hash_value) = (undef, undef); 
     2471 
     2472    do { 
     2473 
     2474        my $dmn_name = $main::domain_id_name{$mail_dmn_id}; 
     2475 
     2476        ($rs, $rdata) = crypt_md5_data($mail_pass); 
     2477 
     2478        return $rs if ($rs != 0); 
     2479 
     2480        $hash_key = "$mail_acc\@$dmn_name"; 
     2481 
     2482        $hash_value = "uid=$mbox_uid|gid=$mbox_gid|home=$virtual_mail_dir/$dmn_name/$mail_acc|shell=/bin/false|systempw=$rdata|mail=$virtual_mail_dir/$dmn_name/$mail_acc"; 
     2483 
     2484        $rs = set_mta_hash_value($userdb_working_cfg, $hash_key, $hash_value); 
     2485 
     2486        return $rs if ($rs != 0); 
     2487 
     2488 
     2489    } if ($mail_type eq 'normal_mail'); 
     2490 
     2491    do { 
     2492 
     2493        my $dmn_name = $main::als_id_name{$mail_sub_id}; 
     2494 
     2495        ($rs, $rdata) = crypt_md5_data($mail_pass); 
     2496 
     2497        return $rs if ($rs != 0); 
     2498 
     2499        $hash_key = "$mail_acc\@$dmn_name"; 
     2500 
     2501        $hash_value = "uid=$mbox_uid|gid=$mbox_gid|home=$virtual_mail_dir/$dmn_name/$mail_acc|shell=/bin/false|systempw=$rdata|mail=$virtual_mail_dir/$dmn_name/$mail_acc"; 
     2502 
     2503        $rs = set_mta_hash_value($userdb_working_cfg, $hash_key, $hash_value); 
     2504 
     2505        return $rs if ($rs != 0); 
     2506 
     2507 
     2508    } if ($mail_type eq 'alias_mail'); 
     2509 
     2510    do { 
     2511 
     2512        my $sub_pref = $main::sub_id_name{$mail_sub_id}; 
     2513 
     2514        my $dmn_name = $main::domain_id_name{$mail_dmn_id}; 
     2515 
     2516        my $sub_name = "$sub_pref.$dmn_name"; 
     2517 
     2518        ($rs, $rdata) = crypt_md5_data($mail_pass); 
     2519 
     2520        return $rs if ($rs != 0); 
     2521 
     2522        $hash_key = "$mail_acc\@$sub_name"; 
     2523 
     2524        $hash_value = "uid=$mbox_uid|gid=$mbox_gid|home=$virtual_mail_dir/$sub_name/$mail_acc|shell=/bin/false|systempw=$rdata|mail=$virtual_mail_dir/$sub_name/$mail_acc"; 
     2525 
     2526        $rs = set_mta_hash_value($userdb_working_cfg, $hash_key, $hash_value); 
     2527 
     2528        return $rs if ($rs != 0); 
     2529 
     2530 
     2531    } if ($mail_type eq 'subdom_mail'); 
     2532 
     2533    ($rs, $working) = get_file($userdb_working_cfg); 
     2534 
     2535    return $rs if ($rs != 0); 
     2536 
     2537    $rs = store_file($userdb_cfg, $working, $main::cfg{'ROOT_USER'}, $main::cfg{'ROOT_GROUP'}, 0600); 
     2538 
     2539    return $rs if ($rs != 0); 
     2540 
     2541    $rs = sys_command($cmd_makeuserdb); 
     2542 
     2543    return $rs if ($rs != 0); 
     2544 
     2545    push_el(\@main::el, 'mbox_add_po_data()', 'Ending...'); 
     2546 
     2547    return 0; 
     2548 
     2549
     2550 
     2551 
     2552sub mbox_del_po_data { 
     2553 
     2554    my ($mbox_data) = @_; 
     2555 
     2556    push_el(\@main::el, 'mbox_del_po_data()', 'Starting...'); 
     2557 
     2558    if (!defined($mbox_data) || $mbox_data eq '') { 
     2559 
     2560        push_el(\@main::el, 'mbox_del_po_data()', 'ERROR: Undefined Input Data...'); 
     2561 
     2562        return -1; 
     2563 
    24492564    } 
    24502565 
    2451     my $courier_dir = $main::cfg{'COURIER_CONF_DIR'}; 
     2566    my ($rs, $rdata) = (undef, undef); 
     2567 
     2568    my $mail_id = @$mbox_data[0]; 
     2569 
     2570    my $mail_acc = @$mbox_data[1]; 
     2571 
     2572    my $mail_pass = @$mbox_data[2]; 
     2573 
     2574    my $mail_forward = @$mbox_data[3]; 
     2575 
     2576    my $mail_dmn_id = @$mbox_data[4]; 
     2577 
     2578    my $mail_type = @$mbox_data[5]; 
     2579 
     2580    my $mail_sub_id = @$mbox_data[6]; 
     2581 
     2582    my $mail_autorespond = @$mbox_data[8]; 
     2583 
     2584 
     2585    my $virtual_mail_dir = $main::cfg{'MTA_VIRTUAL_MAIL_DIR'}; 
     2586 
     2587    my $mbox_uid = $main::cfg{'MTA_MAILBOX_UID'}; 
     2588 
     2589    my $mbox_gid = $main::cfg{'MTA_MAILBOX_G