Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: soprom on March 13, 2008, 05:42:20 PM

Title: Cyrus Imap for sme7 and sme8
Post by: soprom on March 13, 2008, 05:42:20 PM
I'm preparing a howto for the cyrus-imap installation. It is tested on sme7 and sme8.
I used the existing package and removed the included RPMS to replace them with a yum install instruction. Also, the install and uninstall scripts are modified to do the yum install part.

http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/index.html (http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/index.html)

Your comments are welcome.
Title: Re: Cyrus Imap for sme7 and sme8
Post by: CharlieBrady on March 13, 2008, 08:51:00 PM
Your comments are welcome.

Why do you change permission on the qmail executables? What makes you confident that the change is safe?
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on March 13, 2008, 10:47:55 PM
This is the way the orginal script is working.
If permissions should be set differently, your input is more than welcome.
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on May 21, 2008, 06:11:32 PM
Following a comment from Charlie Brady concerning the permissions
chmod 4755 /var/qmail/bin/preline
chmod 4755 /var/qmail/bin/sendmail
(instead of 0755)

After applying the last updates, the modified cyrus-imap could not receive email, saying that
preline: fatal: unable to run /usr/lib/cyrus-imapd/deliver: access denied

After changing the permissions to 4755, the error was corrected.

The solution refers to this post:
http://forums.contribs.org/index.php?topic=23628.0

It says that this sticky bit is used to allow a called process to inherit/assume the user credentials of the calling process.

Title: Re: Cyrus Imap for sme7 and sme8
Post by: CharlieBrady on May 21, 2008, 06:35:40 PM
Following a comment from Charlie Brady concerning the permissions
chmod 4755 /var/qmail/bin/preline
chmod 4755 /var/qmail/bin/sendmail
(instead of 0755)

After applying the last updates, the modified cyrus-imap could not receive email, saying that
preline: fatal: unable to run /usr/lib/cyrus-imapd/deliver: access denied

After changing the permissions to 4755, the error was corrected.

Instead of changing the permissions of preline and/or sendmail, you should have changed the permissions of /usr/lib/cyrus-imapd/deliver. Try:

Code: [Select]
chmod o+x /usr/lib/cyrus-imapd/deliver

Quote
The solution refers to this post:
http://forums.contribs.org/index.php?topic=23628.0

It says that this sticky bit is used to allow a called process to inherit/assume the user credentials of the calling process.

Changing permissions so that 'preline' or 'sendmail' always runs with 'root' privilege is probably unwise.

You really should analyse and understand the problem before trying to fix it. Why was "access denied"?

Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on May 21, 2008, 09:33:25 PM
I made the adjustments and there is no error anymore:

I restored permissions to 0755
#     chmod 0755 /var/qmail/bin/preline
#     chmod 0755 /var/qmail/bin/sendmail

/usr/lib/cyrus-imapd/deliver is owned by cyrus:mail (4754)
/var/qmail/bin/preline is owned by root:qmail (0755)

I applied Charlie's comment
chmod o+x /usr/lib/cyrus-imapd/deliver

and the cyrus-imap is processing mails ok.

Thanks Charlie!
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on May 21, 2008, 09:43:14 PM
The updated install script goes like this:

Code: [Select]
#!/bin/sh

#
# =========================================================================
# Prepare files to use a different password
# =========================================================================
cyrus_password=<PASSWORD_REQUIRED_HERE>
# =========================================================================


mv -f sherwood70 sherwood70.old
mv -f user-create-unix user-create-unix.old
mv -f user-delete-unix user-delete-unix.old
mv -f user-create-cyrus user-create-cyrus.old
mv -f user-delete-cyrus user-delete-cyrus.old
mv -f create-accounts create-accounts.old


sed "s/%imapmail%/$cyrus_password/" sherwood70.old > sherwood70
sed "s/%imapmail%/$cyrus_password/" create-accounts.old > create-accounts
sed "s/%imapmail%/$cyrus_password/" user-create-unix.old > user-create-unix
sed "s/%imapmail%/$cyrus_password/" user-delete-unix.old > user-delete-unix
sed "s/%imapmail%/$cyrus_password/" user-create-cyrus.old > user-create-cyrus
sed "s/%imapmail%/$cyrus_password/" user-delete-cyrus.old > user-delete-cyrus

 =========================================================================
# PHASE # 1
# =========================================================================

# Save current files
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

#Stopping existing services (if running):

/etc/rc.d/init.d/saslauthd stop
/etc/rc.d/init.d/xinetd stop
service imap stop
service imaps stop

#Disabling existing IMAP & POP services:

/sbin/e-smith/config setprop imap status disabled
/sbin/e-smith/config setprop imaps status disabled
/sbin/e-smith/config setprop pop3 status disabled
/sbin/e-smith/config setprop pop3s status disabled

#Activating new services :

/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

# Initialisation des fichiers de configuration grace aux patrons
# Donne Acces au service cyrus imap qui ne demarre pas avec Xinetd

#Installing custom-templates:

mkdir -p /etc/e-smith/templates-custom/etc/hosts.deny/
cp ./00startup /etc/e-smith/templates-custom/etc/hosts.deny/

 
 
# =========================================================================
# PHASE # 2
# =========================================================================

#Installation des RPMs

yum -y install \
cyrus-imapd \
cyrus-imapd \
cyrus-imapd-devel \
cyrus-imapd-murder \
cyrus-imapd-nntp \
cyrus-imapd-utils \
cyrus-sasl-devel \
cyrus-sasl-gssapi \
cyrus-sasl-ntlm \
cyrus-sasl-plain \
perl-Cyrus \
cyrus-sasl \
cyrus-sasl-md5


# =========================================================================
# PHASE # 3
# =========================================================================

# Configure Custom Templates

#Configuration de Cyrus

mkdir -p /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/
cp ./template-end /etc/e-smith/templates-custom/etc/cyrus.conf/

mkdir -p /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/
cp ./template-end /etc/e-smith/templates-custom/etc/imapd.conf/

# On ajoute un script Perl pour gerer les connexions Telnet
# dont nous avons besoin pour ajouter/supprimer des comptes IMAP

mkdir /usr/lib/perl5/site_perl/5.8.5/Net
cp ./Telnet.pm /usr/lib/perl5/site_perl/5.8.5/Net/
cp ./user-create-cyrus /etc/e-smith/events/actions/
cp ./user-delete-cyrus /etc/e-smith/events/actions/

chmod 554 /etc/e-smith/events/actions/user-create-cyrus
chmod 554 /etc/e-smith/events/actions/user-delete-cyrus

ln -s /etc/e-smith/events/actions/user-create-cyrus /etc/e-smith/events/user-create/S95user-create-cyrus
ln -s /etc/e-smith/events/actions/user-delete-cyrus /etc/e-smith/events/user-delete/S05user-delete-cyrus

# Create symlinks for starting & stopping services

#Configuring start up services

ln -s /etc/rc.d/init.d/e-smith-service /etc/rc.d/rc7.d/S71cyrus-imapd
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/saslauthd /etc/rc.d/rc0.d/K71saslauthd

# Configuring Qmail
# The original script changes permissions like this:
#     chmod 4755 /var/qmail/bin/preline
#     chmod 4755 /var/qmail/bin/sendmail
# ... but the standard permissions are already set to 0755 for files that exist.
# ... so why change? 
# this sticky bit is used to allow a called process
# to inherit/assume the user credentials of the calling process.

chmod o+x /usr/lib/cyrus-imapd/deliver

# /usr/lib/cyrus-imapd/deliver is owned by cyrus:mail (4754)
# /var/qmail/bin/preline is owned by root:qmail (0755)

mkdir /etc/e-smith/templates-user-custom/.qmail/
cp ./90local /etc/e-smith/templates-user-custom/.qmail/

mkdir -p /etc/e-smith/templates-custom/etc/services
cp ./30cyrus-imap /etc/e-smith/templates-custom/etc/services/

# On remet a jour les fichiers de configuration a partir des templates.

#Expanding Templates

/sbin/e-smith/expand-template /etc/hosts.deny
/sbin/e-smith/expand-template /etc/xinetd.conf
/sbin/e-smith/expand-template /etc/cyrus.conf
/sbin/e-smith/expand-template /etc/imapd.conf
/sbin/e-smith/expand-template /etc/services

#Restarting services

/etc/rc.d/init.d/xinetd start
/etc/rc.d/init.d/saslauthd start
/etc/rc.d/init.d/cyrus-imapd start

#Configuring Server Manager

cp ./sherwood70 /etc/e-smith/web/functions/sherwood
chown root:admin /etc/e-smith/web/functions/sherwood
chmod 4750 /etc/e-smith/web/functions/sherwood

ln -s /etc/e-smith/web/functions/sherwood /etc/e-smith/web/panels/manager/cgi-bin/sherwood

#Setting IMAP administration password
# The cyrus user was created by rpm (?)
# Change password for cyrus using the variable set at the beginning
echo $cyrus_password | `passwd cyrus --stdin >/dev/null 2>&1`

# create cyrus-imap individual account based on user names

chmod 750 create-accounts
./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
#/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
#/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

# Apply changes

signal-event email-update

See this page for other files:
http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/index.html
Title: Re: Cyrus Imap for sme7 and sme8
Post by: cactus on May 22, 2008, 07:54:37 AM
The updated install script goes like this
The proper place for this is the wiki, please post it there (now/the next time), and add a link to the forums.

Putting it in the wiki makes it easier to maintain and update, by you or others.
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on May 22, 2008, 04:02:28 PM
Could you direct me to the right entry point to get access to the wiki. I have an account on bugzilla but I don't know where to go from here...
Title: Re: Cyrus Imap for sme7 and sme8
Post by: mercyh on May 22, 2008, 04:06:03 PM
http://wiki.contribs.org/Help:Contents

second line request access
Title: Re: Cyrus Imap for sme7 and sme8
Post by: mudtoe on August 26, 2008, 04:47:58 AM
Hi folks:

I'm having some trouble getting this script to work.  It's probably because I'm basically a Windows person and I'm missing something, but here goes.  First, do I need to have this script in a specific folder to get it to work correctly?  Second, it looks like the script is really several scripts (the phases), and I'm wondering if I need to split them up somehow. 
 
The problem I'm having is that I'm seeing lots of directory and file not found errors, and when finished, even after I do a reboot and reconfiguration I don't see the Cyrus stuff on the main menu.  It does look like the YUM install of Cyrus worked though and the Cyrus IMAP service looks like it replaced the default IMAP service. 

I'm going to attach a Putty log of the session that did the install.  It's kind of long, but it does have the all the information in it.

Suggestions welcome.

mudtoe

Code: [Select]
=~=~=~=~=~=~=~=~=~=~=~= PuTTY log 2008.08.25 22:26:20 =~=~=~=~=~=~=~=~=~=~=~=
login as: root
root@172.26.199.152's password:
Last login: Fri Jul 11 16:48:21 2008 from pc-51159.srwnet.dyndns.org

[root@smeserver73 ~]# cd /usr
[root@smeserver73 usr]# mkdir cyrusinst
[root@smeserver73 usr]# cd cyrusinst
[root@smeserver73 cyrusinst]# ftp
ftp> open 172.26.188.254
Connected to 172.26.188.254 (172.26.188.254).
220 Please enter your login name now.
Name (172.26.188.254:root): srwrmt
331 Password required for srwrmt .
Password:
230 User srwrmt logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ascii
200 Type set to ASCII.
ftp> lcd /usr/cyrusint
local: /usr/cyrusint: No such file or directory
ftp> cd /wutemp
250 "/wutemp" is current directory.
ftp> get cyrusinstall
local: cyrusinstall remote: cyrusinstall
227 Entering Passive Mode (172,26,188,254,76,195)
150 Sending /wutemp/cyrusinstall (6922 bytes). Mode STREAM Type ASCII
226 Transfer finished successfully. Data connection closed.
6922 bytes received in 0.0115 secs (5.9e+02 Kbytes/sec)
ftp> quit
221 Goodbye.
[root@smeserver73 cyrusinst]# dir
cyrusinstall
[root@smeserver73 cyrusinst]# chmod 777 cyrusinstall
[root@smeserver73 cyrusinst]# ./cyrusinstall
mv: cannot stat `sherwood70': No such file or directory
mv: cannot stat `user-create-unix': No such file or directory
mv: cannot stat `user-delete-unix': No such file or directory
mv: cannot stat `user-create-cyrus': No such file or directory
mv: cannot stat `user-delete-cyrus': No such file or directory
mv: cannot stat `create-accounts': No such file or directory
sed: can't read sherwood70.old: No such file or directory
sed: can't read create-accounts.old: No such file or directory
sed: can't read user-create-unix.old: No such file or directory
sed: can't read user-delete-unix.old: No such file or directory
sed: can't read user-create-cyrus.old: No such file or directory
sed: can't read user-delete-cyrus.old: No such file or directory
./cyrusinstall: line 26: =========================================================================: command not found
cp: cannot create regular file `uninstall/user-create-unix-b4cyrus': No such file or directory
cp: cannot create regular file `uninstall/user-delete-unix-b4cyrus': No such file or directory
Stopping saslauthd: [FAILED]

./cyrusinstall: line 37: /etc/rc.d/init.d/xinetd: No such file or directory
Stopping imap:[  OK  ]

Stopping imaps:[  OK  ]

cp: cannot stat `./00startup': No such file or directory
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "installonlyn" plugin
Loading "smeserver" plugin
Loading "fastestmirror" plugin
Setting up Install Process
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - updates
Finished
Excluding Packages from CentOS - os
Finished
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for cyrus-imapd to pack into transaction set.

cyrus-imapd-2.2.12-8.1.RH 100% |=========================|  42 kB    00:00     
---> Package cyrus-imapd.i386 0:2.2.12-8.1.RHEL4 set to be updated
---> Downloading header for cyrus-imapd-devel to pack into transaction set.

cyrus-imapd-devel-2.2.12- 100% |=========================|  21 kB    00:00     
---> Package cyrus-imapd-devel.i386 0:2.2.12-8.1.RHEL4 set to be updated
---> Downloading header for cyrus-imapd-murder to pack into transaction set.

cyrus-imapd-murder-2.2.12 100% |=========================|  18 kB    00:00     
---> Package cyrus-imapd-murder.i386 0:2.2.12-8.1.RHEL4 set to be updated
---> Downloading header for cyrus-sasl-ntlm to pack into transaction set.

cyrus-sasl-ntlm-2.1.19-14 100% |=========================|  13 kB    00:00     
---> Package cyrus-sasl-ntlm.i386 0:2.1.19-14 set to be updated
---> Downloading header for cyrus-sasl-plain to pack into transaction set.

cyrus-sasl-plain-2.1.19-1 100% |=========================|  14 kB    00:00     
---> Package cyrus-sasl-plain.i386 0:2.1.19-14 set to be updated
---> Downloading header for perl-Cyrus to pack into transaction set.
ftp://mirror.atlantic.net/pub/centos/4.6/os/i386/CentOS/RPMS/perl-Cyrus-2.2.12-8.1.RHEL4.i386.rpm: [Errno 4] IOError: [Errno ftp error] 421 There are too many connections from your internet address.
Trying other mirror.

perl-Cyrus-2.2.12-8.1.RHE 100% |=========================|  21 kB    00:00     
---> Package perl-Cyrus.i386 0:2.2.12-8.1.RHEL4 set to be updated
---> Downloading header for cyrus-sasl-gssapi to pack into transaction set.

cyrus-sasl-gssapi-2.1.19- 100% |=========================|  13 kB    00:00     
---> Package cyrus-sasl-gssapi.i386 0:2.1.19-14 set to be updated
---> Downloading header for cyrus-imapd-utils to pack into transaction set.

cyrus-imapd-utils-2.2.12- 100% |=========================|  21 kB    00:00     
---> Package cyrus-imapd-utils.i386 0:2.2.12-8.1.RHEL4 set to be updated
---> Downloading header for cyrus-sasl-devel to pack into transaction set.

cyrus-sasl-devel-2.1.19-1 100% |=========================|  24 kB    00:00     
---> Package cyrus-sasl-devel.i386 0:2.1.19-14 set to be updated
---> Downloading header for cyrus-imapd-nntp to pack into transaction set.

cyrus-imapd-nntp-2.2.12-8 100% |=========================|  18 kB    00:00     
---> Package cyrus-imapd-nntp.i386 0:2.2.12-8.1.RHEL4 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Installing:
 cyrus-imapd             i386       2.2.12-8.1.RHEL4  base              6.2 M
 cyrus-imapd-devel       i386       2.2.12-8.1.RHEL4  base              263 k
 cyrus-imapd-murder      i386       2.2.12-8.1.RHEL4  base              808 k
 cyrus-imapd-nntp        i386       2.2.12-8.1.RHEL4  base              572 k
 cyrus-imapd-utils       i386       2.2.12-8.1.RHEL4  base              159 k
 cyrus-sasl-devel        i386       2.1.19-14        base              1.3 M
 cyrus-sasl-gssapi       i386       2.1.19-14        base               30 k
 cyrus-sasl-ntlm         i386       2.1.19-14        base               28 k
 cyrus-sasl-plain        i386       2.1.19-14        base               28 k
 perl-Cyrus              i386       2.2.12-8.1.RHEL4  base              184 k

Transaction Summary
=============================================================================
Install     10 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         
Total download size: 9.5 M
Downloading Packages:


(1/10): cyrus-imapd-2.2.1 100% |=========================| 6.2 MB    00:11     
 
(2/10): cyrus-imapd-devel 100% |=========================| 263 kB    00:00     


(3/10): cyrus-imapd-murde 100% |=========================| 808 kB    00:02     

(4/10): cyrus-sasl-ntlm-2 100% |=========================|  28 kB    00:00     

(5/10): cyrus-sasl-plain- 100% |=========================|  28 kB    00:00     

(6/10): perl-Cyrus-2.2.12 100% |=========================| 184 kB    00:00     

(7/10): cyrus-sasl-gssapi 100% |=========================|  30 kB    00:00     


(8/10): cyrus-imapd-utils 100% |=========================| 159 kB    00:00     


(9/10): cyrus-sasl-devel- 100% |=========================| 1.3 MB    00:03     


(10/10): cyrus-imapd-nntp 100% |=========================| 572 kB    00:01     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
smeserver trap pre-install: cyrus-imapd
smeserver trap pre-install: cyrus-imapd-devel
smeserver trap pre-install: cyrus-imapd-murder
smeserver trap pre-install: cyrus-sasl-ntlm
smeserver trap pre-install: cyrus-sasl-plain
smeserver trap pre-install: perl-Cyrus
smeserver trap pre-install: cyrus-sasl-gssapi
smeserver trap pre-install: cyrus-imapd-utils
smeserver trap pre-install: cyrus-sasl-devel
smeserver trap pre-install: cyrus-imapd-nntp

 
  Installing: cyrus-imapd                  ####################### [ 1/10]

 
  Installing: perl-Cyrus                   ####################### [ 2/10]

 
  Installing: cyrus-imapd-devel            ####################### [ 3/10]

 
  Installing: cyrus-imapd-murder           ####################### [ 4/10]

 
  Installing: cyrus-sasl-ntlm              ####################### [ 5/10]

 
  Installing: cyrus-sasl-plain             ####################### [ 6/10]

 
  Installing: cyrus-sasl-gssapi            ####################### [ 7/10]

 
  Installing: cyrus-imapd-utils            ####################### [ 8/10]

 
  Installing: cyrus-sasl-devel             ####################### [ 9/10]

 
  Installing: cyrus-imapd-nntp             ####################### [10/10]
Migrating existing database networks
Migrating existing database yum_installed
Migrating existing database spamassassin
Migrating existing database configuration
Migrating existing database hosts
Migrating existing database domains
Migrating existing database accounts
Migrating existing database yum_updates
Migrating existing database mailpatterns
Migrating existing database yum_repositories
Migrating existing database yum_available
Migrating existing database backups
smeserver trap post-install: cyrus-imapd
smeserver trap post-install: cyrus-imapd-devel
smeserver trap post-install: cyrus-imapd-murder
smeserver trap post-install: cyrus-sasl-ntlm
smeserver trap post-install: cyrus-sasl-plain
smeserver trap post-install: perl-Cyrus
smeserver trap post-install: cyrus-sasl-gssapi
smeserver trap post-install: cyrus-imapd-utils
smeserver trap post-install: cyrus-sasl-devel
smeserver trap post-install: cyrus-imapd-nntp

Installed: cyrus-imapd.i386 0:2.2.12-8.1.RHEL4 cyrus-imapd-devel.i386 0:2.2.12-8.1.RHEL4 cyrus-imapd-murder.i386 0:2.2.12-8.1.RHEL4 cyrus-imapd-nntp.i386 0:2.2.12-8.1.RHEL4 cyrus-imapd-utils.i386 0:2.2.12-8.1.RHEL4 cyrus-sasl-devel.i386 0:2.1.19-14 cyrus-sasl-gssapi.i386 0:2.1.19-14 cyrus-sasl-ntlm.i386 0:2.1.19-14 cyrus-sasl-plain.i386 0:2.1.19-14 perl-Cyrus.i386 0:2.2.12-8.1.RHEL4
Complete!
==============================================================
WARNING: You now need to run BOTH of the following commands
to ensure consistent system state:

signal-event post-upgrade; signal-event reboot

You should run these commands unless you are certain that
yum made no changes to your system.
==============================================================
cp: cannot stat `./cyrus': No such file or directory
cp: cannot stat `./template-begin': No such file or directory
cp: cannot stat `./template-end': No such file or directory
cp: cannot stat `./imapd': No such file or directory
cp: cannot stat `./template-begin': No such file or directory
cp: cannot stat `./template-end': No such file or directory
mkdir: cannot create directory `/usr/lib/perl5/site_perl/5.8.5/Net': File exists
cp: cannot stat `./Telnet.pm': No such file or directory
cp: cannot stat `./90local': No such file or directory
cp: cannot stat `./30cyrus-imap': No such file or directory
ERROR: No templates were found for /etc/cyrus.conf.
 at /sbin/e-smith/expand-template line 45
ERROR: No templates were found for /etc/imapd.conf.
 at /sbin/e-smith/expand-template line 45
./cyrusinstall: line 158: /etc/rc.d/init.d/xinetd: No such file or directory
Starting saslauthd: [  OK  ]

Starting cyrus-imapd: preparing databases... done. [  OK  ]

[root@smeserver73 cyrusinst]# logout     
[root@smeserver73 cyrusinst]# signal-event post-upgrade; signal-event reboot


Broadcast message from root (pts/0) (Mon Aug 25 22:32:54 2008):




The system is going down for reboot NOW!

[root@smeserver73 cyrusinst]# logout
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 26, 2008, 06:39:36 PM
Hi,

You should start by getting the files at
http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/smeserver-cyrus.tgz

Then untar in a folder like /root/cyrus

This will provide the files needed.

The install scripts are executed as root, so no need for ftp and all... Return to my howto and refresh the page
http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/index.html

Copy the installation script to a file in the same folder (like /root/cyrus) and name it install.
Give execute permission to it:
Code: [Select]
chmod u+x install
Alternatively, you could also do this:
Code: [Select]
mkdir /root/cyrus
cd  /root/cyrus
wget http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/smeserver-cyrus.tgz
tar -xz --directory="." -f smeserver-cyrus.tgz
cd smeserver-cyrus
wget http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/install-cyrus.sh
chmod u+x install-cyrus.sh

The updated (2008-08-26) script will as you for a password to set for user cyrus.

I recommend running the scripts "line by line" or "block by block" to follow what is going on. But you could run the whole script in a single shot (blindly). Since the cyrus-imap is not supported by the dev team, it might be advisable to run the installation and follow what is happening so you can know what you are doing. IMO.

After the last lines of the installation scripts
Code: [Select]
# Apply changes
signal-event email-update
a reboot is required:
Code: [Select]
signal-event post-upgrade && signal-event reboot
If you are new to putty, remember that you just need to use the clipboard by selecting the script lines, "copy to clipboard", then in the putty's window just do a right-click. This will automaticly paste it...

Phases are shown to help understand what is going on. Nothing else.

I have edited the script and made a file for it just now. So give it an other shot!

Hoping that will help you...
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 26, 2008, 11:20:38 PM
I finalized the howto in the Wiki:
http://wiki.contribs.org/Cyrus-imap
Title: Re: Cyrus Imap for sme7 and sme8
Post by: mudtoe on August 26, 2008, 11:48:28 PM
Thanks much.  That worked perfectly, at least as far as I can tell so far.  I pasted your sequence of commands into putty that downloaded the script from your site.

Just out of curiosity where exactly did I go wrong?  Were there some ancillary files that I needed that I failed to download? 

I originally tried just copying the script from your web site and as you said pasting it into putty.  When I did that I got errors immediately on the first few comment lines (the ones with ######'s in them) saying invalid command.  I figured that there was some problem between the clipboard and putty, like line wrap, continuation characters, 80 column limits, or some such; so I just saved the clipboard file as an ASCII text file.  That's where the ftp thing came in, because I had to get around all the issues about end of line character differences between windows and linux text files, which I did by doing an ASCII ftp file transfer from an internal ftp server to the SMEServer system.  That allowed me to get further and the results where what I posted. 

The other thing you mentioned is running the script line by line.  Is there a way to tell linux to run a script line by line requiring you to confirm each command, like some sort of system variable, or were you suggesting that i just paste them in one line at a time?  I did save the putty log, so I can go back and review what it did.  Fortunately, I'm running SMEServer in a VM, so it's easy to go back to a snapshot point and try over and over; otherwise it would have been a real pain to set it up over and over again.

Your help is much appreciated.   :)


mudtoe
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 27, 2008, 02:53:58 AM
I'm happy to see it worked fine!

Concerning the "invalid command" errors, as far as I can tell it's when we switch from notepad (win) and unix format, or from html to unix(?).

The files I made you download from smeserver-cyrus.tgz are the parts and fragments needed to wrap the server installation. I think you did not get this when you first tried. I think so because of lines like "mv: cannot stat `sherwood70': No such file or directory"... This is part of smeserver-cyrus.tgz

Do you intend to use Toltec ?
Title: Re: Cyrus Imap for sme7 and sme8
Post by: mudtoe on August 27, 2008, 06:41:45 AM
Yes, I'm going to use Toltec.  I've got an SME 7.1 installation that I wanted to upgrade, but for whatever reason the upgrade always fails, so I'm going to have to start with a fresh 7.3 installation and then move my Toltec clients to the new installation. 

Fortunately, this particular Toltec installation is for just my personal use and I have 3 computers with the calendar, tasks, contacts and notes synched with Toltec (I'm using some other method to synch the other users).  I don't synch the emails themselves with Toltec; I just let IMAP do the emails.  I know that this is going to involve some issues; so my thought was that I'd take just one of the three computers first, switch it to the new SME server, which should cause the data from that copy of Outlook to be uploaded to the new Toltec.  Then I was going to completely erase all the Outlook data from the other two computers and then let them synch to the new SMEServer which should cause the data to be downloaded without causing duplicates.  Both the SMEServer and the first computer I'm going to test with are running as VMs, so I can make snapshots before I try this and if I screw it up I can just revert to the snapshot and try again. 

Do you have a better idea of how to go about this?  I know if I had lots of machines to do my method would probably be too labor intensive, but for just three machines I figured it was probably the most straightforward way.
 
mudtoe
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 27, 2008, 03:26:34 PM
First, it is important to keep in mind that Toltec syncs using the UUID of an account. In order to transfer shared stuff, we have to start by disconnecting from Toltec (detach store). The shared items are kept in each local "personal folder". Be carefull not to flush workstation content if they hold items shared to others!

What I do is detach all workstation, then transfer all imap content to the new server with imapcopy. Finally I re-attach to Toltec (you may have to use cyradm to reconstruct mbox after the copy).

On re-attaching, Toltec will resync to the new server with the new UUID. All items in personal folder shared to others will be publish. You will find folders marked as "UNSHARED" corresponding to content received from Toltec before the switch.

Once, I did not detach and got myself with all items twice!


other sync methods?

Out of curiosity, you mentioned "(I'm using some other method to synch the other users)"...
could you tell what you use for that?

Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 27, 2008, 03:33:25 PM
just a note to readers...

cyrus-imap is often associated with proprietary software like Toltec (as in this thread).

Some will discard cyrus-imap too quickly in my view. It is an excellent solution, works fine with egroupware and thunderbird.

No need to use any proprietary software to make use of it. proprietary software is needed to link Outlook clients one to the other (calendar, notes, etc..)
Title: Re: Cyrus Imap for sme7 and sme8
Post by: mudtoe on August 28, 2008, 02:01:07 AM
How do you prevent duplicates when you reconnect the other clients if you don't clear their outlook pst files first?   Based on what you posted it looks to me like your approach is to copy the Toltec data from one Cyrus installation to another, and then let the clients reconnect, whereas I was planning to just keep one client with all it's data and let it repopulate the Cyrus database on the new machine, and then reconnect the other clients after having cleared their pst files.  Also, what is imapcopy?  I haven't heard of it.

With regard to the other synch program, some of my users are using 4team sync2 and keeping the central store on one of the windows machine.  Some of them do it for all their stuff and just do their emails as POP3, and a few others are connected to an SMEServer for IMAP email, and just use sync2 to synchronize the non-email stuff, much as I'm doing with Toltec.  I got into this project after some users were already using sync2, and I started using Toltec for myself to verify that it worked before deploying it to others.  Sync2 is more expensive per seat, which was the chief complaint about it, and is why I started playing with Toltec in the first place, but because of the fact I can't get SMEServer to upgrade from 7.1 to 7.3 without a reinstall it's become a bit more of a maintenance drag than the sync2 product.  The other thing better about Toltec is that the data is backed up with the email server backup whereas a special procedure has to be used to backup the sync2 store off of one of the client windows machines.  If you haven't heard of sync2 here's the link to it:

http://www.sync2.com/ (http://www.sync2.com/)

mudtoe
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 28, 2008, 02:19:14 AM
Imapcopy is explained here:
http://sonoracomm.com/support/19-inet-support/60-imapcopy

It's a very interesting and effective tool to transfer imap accounts to an other server.

Concerning Toltec, you have a look to their manual and email them. They answer in a couple of days.

The last 2 migrations I did were using Affa. So I didn't have to worry about nothing at all.

I don't think it is necessary to clear any Outlook content. Just detach from server1, and attach to server2. If all clients are using POP, they will keep their content. If they share items, they will be published on the new server.

The problem arise when there are IMAP contents to transfer.

When a client detaches from a server, its contents are kept localy.
Title: Re: Cyrus Imap for sme7 and sme8
Post by: mudtoe on August 28, 2008, 02:36:28 AM
So, if I use imapcopy to transfer the data from the 7.1 SME Cyrus to the 7.3 SME Cyrus I can just detach each client from the 7.1 Toltec and reattach it to the 7.3 Toltec and I won't create duplicates, even though the outlook clients still have a copy of the information in their local PST file?  When you reattach Toltec is smart enough to look at the items in the local PST file, compare them to the stuff already copied into SME 7.3, and not create duplicates in the SMEServer Cyrus IMAP database?  Remember that I'm only using Toltec for the PIM stuff (e.g. calendar, tasks, contacts, etc.) and I'm leaving all the regular email data as generic IMAP.
 
mudtoe
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on August 28, 2008, 02:42:32 AM
Toltec staff will confirm to you the correct procedure.
It is best to valideate with them...
Title: Re: Cyrus Imap for sme7 and sme8
Post by: _alex on September 05, 2011, 03:27:13 PM
Hello,

I am very interressed in this solution and have been trying to reach
http://www.logiciel-libre.org/downloads/cyrus-imap-sme-howto/
for few days with no luck (http timeout).

Any chance to get the host back up, or maybe just the needed files?

Cheers,
--
alex
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on September 05, 2011, 03:55:51 PM
Hi,

My pages are being reorganized. See http://www.logiciel-libre.org/Howto-Cyrus. Use 'search' with 'cyrus'...

I don't use cyrus anymore but there is enough info there for you to get going.

Please note that I stopped using cyrus since mobility and synching became more important in my setups. This cyrus implementation allows for lan access, not wan.

It worked fine for quite some time on my side. With the Toltec Outlook Connector, it is super!

I should add that for a non-dev, it was somewhat more stressfull to use since I was on my own with no other support that what's on the web (and a kind watchfull eye from Charlie once in a while)...

It is worth the experience. It's a completly new world!!!

Good luck,

Sophie
Title: Re: Cyrus Imap for sme7 and sme8
Post by: _alex on September 05, 2011, 04:29:46 PM
Hello Sophie,

My intention is to use cyrus with SOGo (dovecot version shipped with SME doesn't support shared folders).
Well, it looks like your host www.logiciel-libre.org is still down...

Code: [Select]
$ ping -c5 www.logiciel-libre.org
PING www.logiciel-libre.org (209.62.36.4) 56(84) bytes of data.

--- www.logiciel-libre.org ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms

Merci encore,
--
Alex
Title: Re: Cyrus Imap for sme7 and sme8
Post by: soprom on September 05, 2011, 04:41:01 PM
Ok I see. Wait until www resolves to 184.154.228.4
DNS has been just fixed (hosting changed)...
Title: Re: Cyrus Imap for sme7 and sme8
Post by: _alex on September 05, 2011, 04:57:37 PM
Thanks a lot Sophie, it works now.

--
Alex