Line 69: |
Line 69: |
| cyrus_password=<password_required> | | cyrus_password=<password_required> |
| # ========================================================================= | | # ========================================================================= |
− | | + | mv -f sherwood70 sherwood70.old |
− | mv -f sherwood70 sherwood70.old | + | mv -f user-create-unix user-create-unix.old |
− | mv -f user-create-unix user-create-unix.old | + | mv -f user-delete-unix user-delete-unix.old |
− | mv -f user-delete-unix user-delete-unix.old | + | mv -f user-create-cyrus user-create-cyrus.old |
− | mv -f user-create-cyrus user-create-cyrus.old | + | mv -f user-delete-cyrus user-delete-cyrus.old |
− | mv -f user-delete-cyrus user-delete-cyrus.old | + | mv -f create-accounts create-accounts.old |
− | mv -f create-accounts create-accounts.old | + | |
− | | + | sed "s/%imapmail%/$cyrus_password/" create-accounts.old > create-accounts |
− | sed "s/%imapmail%/$cyrus_password/" create-accounts.old > create-accounts | + | sed "s/%imapmail%/$cyrus_password/" sherwood70.old > sherwood70 |
− | sed "s/%imapmail%/$cyrus_password/" sherwood70.old > sherwood70 | + | sed "s/%imapmail%/$cyrus_password/" user-create-unix.old > user-create-unix |
− | sed "s/%imapmail%/$cyrus_password/" user-create-unix.old > user-create-unix | + | sed "s/%imapmail%/$cyrus_password/" user-create-cyrus.old > user-create-cyrus |
− | sed "s/%imapmail%/$cyrus_password/" user-create-cyrus.old > user-create-cyrus | + | sed "s/%imapmail%/$cyrus_password/" user-delete-cyrus.old > user-delete-cyrus |
− | sed "s/%imapmail%/$cyrus_password/" user-delete-cyrus.old > user-delete-cyrus | + | sed "s/%imapmail%/$cyrus_password/" sherwood70.old > sherwood70 |
− | sed "s/%imapmail%/$cyrus_password/" sherwood70.old > sherwood70 | + | |
− | | + | ========================================================================= |
− | ========================================================================= | + | # PHASE # 1 |
− | # PHASE # 1 | + | # ========================================================================= |
− | # ========================================================================= | + | |
− | | + | # Save current files |
− | # Save current files | + | cp /etc/e-smith/events/actions/user-create-unix uninstall/user-create-unix-b4cyrus |
− | cp /etc/e-smith/events/actions/user-create-unix uninstall/user-create-unix-b4cyrus | + | cp /etc/e-smith/events/actions/user-delete-unix uninstall/user-delete-unix-b4cyrus |
− | cp /etc/e-smith/events/actions/user-delete-unix uninstall/user-delete-unix-b4cyrus | + | |
− | | + | #Stopping existing services (if running): |
− | #Stopping existing services (if running): | + | |
− | | + | /etc/rc.d/init.d/saslauthd stop |
− | /etc/rc.d/init.d/saslauthd stop | + | /etc/rc.d/init.d/xinetd stop |
− | /etc/rc.d/init.d/xinetd stop | + | service imap stop |
− | service imap stop | + | service imaps stop |
− | service imaps stop | + | |
− | | + | #Disabling existing IMAP & POP services: |
− | #Disabling existing IMAP & POP services: | + | |
− | | + | /sbin/e-smith/config setprop imap status disabled |
− | /sbin/e-smith/config setprop imap status disabled | + | /sbin/e-smith/config setprop imaps status disabled |
− | /sbin/e-smith/config setprop imaps status disabled | + | /sbin/e-smith/config setprop pop3 status disabled |
− | /sbin/e-smith/config setprop pop3 status disabled | + | /sbin/e-smith/config setprop pop3s status disabled |
− | /sbin/e-smith/config setprop pop3s status disabled | + | |
− | | + | #Activating new services : |
− | #Activating new services : | + | |
− | | + | /sbin/e-smith/config set saslauthd service InitscriptOrder 70 access private status enabled |
− | /sbin/e-smith/config set saslauthd service InitscriptOrder 70 access private status enabled | + | /sbin/e-smith/config set cyrus-imapd service InitscriptOrder 71 access private status enabled |
− | /sbin/e-smith/config set cyrus-imapd service InitscriptOrder 71 access private status enabled | + | |
− | | + | # Initialisation des fichiers de configuration grace aux patrons |
− | # Initialisation des fichiers de configuration grace aux patrons | + | # Donne Acces au service cyrus imap qui ne demarre pas avec Xinetd |
− | # Donne Acces au service cyrus imap qui ne demarre pas avec Xinetd | + | |
− | | + | #Installing custom-templates: |
− | #Installing custom-templates: | + | |
− | | + | mkdir -p /etc/e-smith/templates-custom/etc/hosts.deny/ |
− | mkdir -p /etc/e-smith/templates-custom/etc/hosts.deny/ | + | cp ./00startup /etc/e-smith/templates-custom/etc/hosts.deny/ |
− | cp ./00startup /etc/e-smith/templates-custom/etc/hosts.deny/ | + | |
− | | + | # ========================================================================= |
− | | + | # PHASE # 2 |
− | | + | # ========================================================================= |
− | # ========================================================================= | + | |
− | # PHASE # 2 | + | #Installation des RPMs |
− | # ========================================================================= | + | |
− | | + | yum -y install \ |
− | #Installation des RPMs | + | cyrus-imapd \ |
− | | + | cyrus-imapd \ |
− | yum -y install \ | + | cyrus-imapd-devel \ |
− | cyrus-imapd \ | + | cyrus-imapd-murder \ |
− | cyrus-imapd \ | + | cyrus-imapd-nntp \ |
− | cyrus-imapd-devel \ | + | cyrus-imapd-utils \ |
− | cyrus-imapd-murder \ | + | cyrus-sasl-devel \ |
− | cyrus-imapd-nntp \ | + | cyrus-sasl-gssapi \ |
− | cyrus-imapd-utils \ | + | cyrus-sasl-ntlm \ |
− | cyrus-sasl-devel \ | + | cyrus-sasl-plain \ |
− | cyrus-sasl-gssapi \ | + | perl-Cyrus \ |
− | cyrus-sasl-ntlm \ | + | cyrus-sasl \ |
− | cyrus-sasl-plain \ | + | cyrus-sasl-md5 |
− | perl-Cyrus \ | + | |
− | cyrus-sasl \ | + | # ========================================================================= |
− | cyrus-sasl-md5 | + | # PHASE # 3 |
− | | + | # ========================================================================= |
− | # ========================================================================= | + | |
− | # PHASE # 3 | + | # Configure Custom Templates |
− | # ========================================================================= | + | |
− | | + | #Configuration de Cyrus |
− | # Configure Custom Templates | + | |
− | | + | mkdir -p /etc/e-smith/templates-custom/etc/cyrus.conf/ |
− | #Configuration de Cyrus | + | cp ./cyrus /etc/e-smith/templates-custom/etc/cyrus.conf/ |
− | | + | cp ./template-begin /etc/e-smith/templates-custom/etc/cyrus.conf/ |
− | mkdir -p /etc/e-smith/templates-custom/etc/cyrus.conf/ | + | cp ./template-end /etc/e-smith/templates-custom/etc/cyrus.conf/ |
− | cp ./cyrus /etc/e-smith/templates-custom/etc/cyrus.conf/ | + | |
− | cp ./template-begin /etc/e-smith/templates-custom/etc/cyrus.conf/ | + | mkdir -p /etc/e-smith/templates-custom/etc/imapd.conf/ |
− | cp ./template-end /etc/e-smith/templates-custom/etc/cyrus.conf/ | + | cp ./imapd /etc/e-smith/templates-custom/etc/imapd.conf/ |
− | | + | cp ./template-begin /etc/e-smith/templates-custom/etc/imapd.conf/ |
− | mkdir -p /etc/e-smith/templates-custom/etc/imapd.conf/ | + | cp ./template-end /etc/e-smith/templates-custom/etc/imapd.conf/ |
− | cp ./imapd /etc/e-smith/templates-custom/etc/imapd.conf/ | + | |
− | cp ./template-begin /etc/e-smith/templates-custom/etc/imapd.conf/ | + | # On ajoute un script Perl pour gerer les connexions Telnet |
− | cp ./template-end /etc/e-smith/templates-custom/etc/imapd.conf/ | + | # dont nous avons besoin pour ajouter/supprimer des comptes IMAP |
− | | + | |
− | # On ajoute un script Perl pour gerer les connexions Telnet | + | mkdir /usr/lib/perl5/site_perl/5.8.5/Net |
− | # dont nous avons besoin pour ajouter/supprimer des comptes IMAP | + | cp ./Telnet.pm /usr/lib/perl5/site_perl/5.8.5/Net/ |
− | | + | cp ./user-create-cyrus /etc/e-smith/events/actions/ |
− | mkdir /usr/lib/perl5/site_perl/5.8.5/Net | + | cp ./user-delete-cyrus /etc/e-smith/events/actions/ |
− | cp ./Telnet.pm /usr/lib/perl5/site_perl/5.8.5/Net/ | + | |
− | cp ./user-create-cyrus /etc/e-smith/events/actions/ | + | chmod 554 /etc/e-smith/events/actions/user-create-cyrus |
− | cp ./user-delete-cyrus /etc/e-smith/events/actions/ | + | chmod 554 /etc/e-smith/events/actions/user-delete-cyrus |
− | | + | |
− | chmod 554 /etc/e-smith/events/actions/user-create-cyrus | + | ln -s /etc/e-smith/events/actions/user-create-cyrus /etc/e-smith/events/user-create/S95user-create-cyrus |
− | chmod 554 /etc/e-smith/events/actions/user-delete-cyrus | + | ln -s /etc/e-smith/events/actions/user-delete-cyrus /etc/e-smith/events/user-delete/S05user-delete-cyrus |
− | | + | |
− | ln -s /etc/e-smith/events/actions/user-create-cyrus /etc/e-smith/events/user-create/S95user-create-cyrus | + | # Create symlinks for starting & stopping services |
− | ln -s /etc/e-smith/events/actions/user-delete-cyrus /etc/e-smith/events/user-delete/S05user-delete-cyrus | + | |
− | | + | #Configuring start up services |
− | # Create symlinks for starting & stopping services | + | |
− | | + | ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S71cyrus-imapd |
− | #Configuring start up services | + | ln -s /etc/rc.d/init.d/cyrus-imapd /etc/rc.d/rc0.d/K71cyrus-imap |
− | | + | ln -s /etc/rc.d/init.d/saslauthd /etc/rc.d/rc7.d/S71saslauthd |
− | ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S71cyrus-imapd | + | ln -s /etc/rc.d/init.d/saslauthd /etc/rc.d/rc0.d/K71saslauthd |
− | ln -s /etc/rc.d/init.d/cyrus-imapd /etc/rc.d/rc0.d/K71cyrus-imap | + | |
− | ln -s /etc/rc.d/init.d/saslauthd /etc/rc.d/rc7.d/S71saslauthd | + | # Configuring Qmail |
− | ln -s /etc/rc.d/init.d/saslauthd /etc/rc.d/rc0.d/K71saslauthd | + | # The original script changes permissions like this: |
− | | + | # chmod 4755 /var/qmail/bin/preline |
− | # Configuring Qmail | + | # chmod 4755 /var/qmail/bin/sendmail |
− | # The original script changes permissions like this: | + | # ... but the standard permissions are already set to 0755 for files that exist. |
− | # chmod 4755 /var/qmail/bin/preline | + | # ... so why change? |
− | # chmod 4755 /var/qmail/bin/sendmail | + | chmod o+x /usr/lib/cyrus-imapd/deliver |
− | # ... but the standard permissions are already set to 0755 for files that exist. | + | # this sticky bit is used to allow a called process |
− | # ... so why change? | + | # to inherit/assume the user credentials of the calling process. |
− | chmod o+x /usr/lib/cyrus-imapd/deliver | + | |
− | # this sticky bit is used to allow a called process | + | mkdir /etc/e-smith/templates-user-custom/.qmail/ |
− | # to inherit/assume the user credentials of the calling process. | + | cp ./90local /etc/e-smith/templates-user-custom/.qmail/ |
− | | + | |
− | mkdir /etc/e-smith/templates-user-custom/.qmail/ | + | mkdir -p /etc/e-smith/templates-custom/etc/services |
− | cp ./90local /etc/e-smith/templates-user-custom/.qmail/ | + | cp ./30cyrus-imap /etc/e-smith/templates-custom/etc/services/ |
− | | + | |
− | mkdir -p /etc/e-smith/templates-custom/etc/services | + | # On remet a jour les fichiers de configuration a partir des templates. |
− | cp ./30cyrus-imap /etc/e-smith/templates-custom/etc/services/ | + | |
− | | + | #Expanding Templates |
− | # On remet a jour les fichiers de configuration a partir des templates. | + | |
− | | + | /sbin/e-smith/expand-template /etc/hosts.deny |
− | #Expanding Templates | + | /sbin/e-smith/expand-template /etc/xinetd.conf |
− | | + | /sbin/e-smith/expand-template /etc/cyrus.conf |
− | /sbin/e-smith/expand-template /etc/hosts.deny | + | /sbin/e-smith/expand-template /etc/imapd.conf |
− | /sbin/e-smith/expand-template /etc/xinetd.conf | + | /sbin/e-smith/expand-template /etc/services |
− | /sbin/e-smith/expand-template /etc/cyrus.conf | + | |
− | /sbin/e-smith/expand-template /etc/imapd.conf | + | #Restarting services |
− | /sbin/e-smith/expand-template /etc/services | + | |
− | | + | /etc/rc.d/init.d/xinetd start |
− | #Restarting services | + | /etc/rc.d/init.d/saslauthd start |
− | | + | /etc/rc.d/init.d/cyrus-imapd start |
− | /etc/rc.d/init.d/xinetd start | + | |
− | /etc/rc.d/init.d/saslauthd start | + | #Configuring Server Manager |
− | /etc/rc.d/init.d/cyrus-imapd start | + | |
− | | + | cp ./sherwood70 /etc/e-smith/web/functions/sherwood |
− | #Configuring Server Manager | + | chown root:admin /etc/e-smith/web/functions/sherwood |
− | | + | chmod 4750 /etc/e-smith/web/functions/sherwood |
− | cp ./sherwood70 /etc/e-smith/web/functions/sherwood | + | |
− | chown root:admin /etc/e-smith/web/functions/sherwood | + | ln -s /etc/e-smith/web/functions/sherwood /etc/e-smith/web/panels/manager/cgi-bin/sherwood |
− | chmod 4750 /etc/e-smith/web/functions/sherwood | + | |
− | | + | #Setting IMAP administration password |
− | ln -s /etc/e-smith/web/functions/sherwood /etc/e-smith/web/panels/manager/cgi-bin/sherwood | + | # The cyrus user was created by rpm (?) |
− | | + | # Change password for cyrus using the variable set at the beginning |
− | #Setting IMAP administration password | + | echo $cyrus_password | `passwd cyrus --stdin >/dev/null 2>&1` |
− | # The cyrus user was created by rpm (?) | + | |
− | # Change password for cyrus using the variable set at the beginning | + | # create cyrus-imap individual account based on user names |
− | echo $cyrus_password | `passwd cyrus --stdin >/dev/null 2>&1` | + | |
− | | + | chmod 750 create-accounts |
− | # create cyrus-imap individual account based on user names | + | ./create-accounts |
− | | + | /sbin/e-smith/db /home/e-smith/db/navigation/navigation.en set sherwood panel Description "cyrus-IMAP" DescriptionWeight 6750 Heading Configuration HeadingWeight 6000 |
− | chmod 750 create-accounts | + | #/sbin/e-smith/db /home/e-smith/db/navigation/navigation.fr set sherwood panel Description "Gestion Des comptes Imap" DescriptionWeight 8555 Heading Sherwood HeadingWeight 8000 |
− | ./create-accounts | + | #/sbin/e-smith/db /home/e-smith/db/navigation/navigation.fr-ca set sherwood panel Description "Gestion Des comptes Imap" DescriptionWeight 8555 Heading Sherwood HeadingWeight 8000 |
− | /sbin/e-smith/db /home/e-smith/db/navigation/navigation.en set sherwood panel Description "cyrus-IMAP" DescriptionWeight 6750 Heading Configuration HeadingWeight 6000 | + | |
− | #/sbin/e-smith/db /home/e-smith/db/navigation/navigation.fr set sherwood panel Description "Gestion Des comptes Imap" DescriptionWeight 8555 Heading Sherwood HeadingWeight 8000 | + | # Apply changes |
− | #/sbin/e-smith/db /home/e-smith/db/navigation/navigation.fr-ca set sherwood panel Description "Gestion Des comptes Imap" DescriptionWeight 8555 Heading Sherwood HeadingWeight 8000 | + | |
− | | + | signal-event email-update</nowiki> |
− | # Apply changes | + | |
− | | |
− | signal-event email-update</nowiki> | |
− | | |
| ---- | | ---- |
| '''Uninstallation''' | | '''Uninstallation''' |