Solved

Cyrus-Imap mkimap failure

Posted on 2003-11-18
4
933 Views
Last Modified: 2013-12-15
Hi All.

Using cyrus-imapd-2.1.15 and db-4.1.25. on an x86 running Slackware-9.1.
The problem arises when I execute ./mkimap. Here are the particulars:

___________________________________________________________
Berkeley DB-4.1.25 installation

cd /usr/local/src/db-4.1.25/build_unix

../dist/configure && make && make install

echo /usr/local/BerkeleyDB.4.1/lib >> /etc/ld.so.conf && ldconfig

ln -s /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so /usr/lib
___________________________________________________________
cyrus-imapd-2.1.15 installation

cd /usr/local/src/cyrus-imapd-2.1.15/makedepend
./configure && make
cp -v ./makedepend /usr/local/bin/makedepend

mkdir /usr/sieve  /var/imap /var/spool/imap "
cd /usr/local/src/cyrus-imapd-2.1.15 "

./configure
--prefix=/usr
--with-auth=unix
--with-sasl=/usr/local/lib
--with-openssl=/usr/local/ssl
--with-dbdir=/usr/local/BerkeleyDB.4.1
--with-bdb-libdir=/usr/local/BerkeleyDB.4.1/lib
--with-bdb-incdir=/usr/local/BerkeleyDB.4.1/include

useradd -g mail cyrus
make depend
make all CFLAGS=-O
make install "
rm -f /etc/services syslog.conf "
cp services syslog.conf imapd.conf /etc
cp -v /usr/local/src/cyrus-imapd-2.1.15/master/conf/normal.conf
/etc/cyrus.conf
touch /var/log/imapd.log /var/log/auth.log "

cd /var && chown cyrus imap && chgrp mail imap && chmod 750 imap "
cd /usr && chown cyrus sieve && chgrp mail sieve && chmod 750 sieve "
chown cyrus /var/spool/imap && chgrp mail /var/spool/imap "
cd /usr/local/src/cyrus-imapd-2.1.15/tools "
su cyrus
./mkimap
___________________________________________________________________
my imapd.conf

configdirectory: /var/imap
partition-default: /var/spool/imap
admins: cyrus
sasl_pwcheck_method: saslauthd
allowanonymouslogin: no
allowplaintext: yes
___________________________________________________________________
Here is the output from mkimap:

cyrus@ilumina:/usr/local/src/cyrus-imapd-2.1.15/tools$ ./mkimap

. will configure directory /var/imap
. saw partition /var/spool/imap
done
...ating /var/imap
 at (eval 1) line 91.ar/imap
____________________________________________________________________
I ran strace on mkimap. Found a couple of things:

cyrus@ilumina:/usr/local/src/cyrus-imapd-2.1.15/tools$strace ./mkimap

------------------------snip------------------------------------------------


reading configure file...open("/etc/imapd.conf", O_RDONLY|O_LARGEFILE) = 4
ioctl(4, SNDCTL_TMR_TIMEBASE, 0xbffff600) = -1 ENOTTY (Inappropriate ioctl
for device)
_llseek(4, 0, [0], SEEK_CUR)            = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=155, ...}) = 0
fcntl64(4, F_SETFD, FD_CLOEXEC)         = 0
brk(0)                                  = 0x814d000
brk(0x814e000)                          = 0x814e000
write(1, "reading configure file...\n", 26reading configure file...
) = 26
brk(0)                                  = 0x814e000
brk(0x814f000)                          = 0x814f000
read(4, "configdirectory: /var/imap\r\npart"..., 4096) = 155
.rite(1, "i will configure directory /var/"..., 39i will configure directory
/var/imap
) = 39
.rite(1, "i saw partition /var/spool/imap\r"..., 34i saw partition
/var/spool/imap
) = 34
read(4, "", 4096)                       = 0
write(1, "done\n", 5done
)                   = 5
close(4)                                = 0
...te(1, "creating /var/imap\r...\n", 23creating /var/imap
) = 23
", 0755)               = -1 EACCES (Permission denied)
")                     = -1 ENOENT (No such file or directory)
 at (eval 1) line 91.hange to /var/imap\r at"..., 51couldn't change to
/var/imap
) = 51
close(3)                                = 0
exit_group(2)                           = ?
___________________________________________________________________________

Here's some other relavent info:

root@ilumina:/usr/local/src/cyrus-imapd-2.1.15# ldd /usr/cyrus/bin/ctl_cyrusdb


   libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x40017000)
   ibresolv.so.2 => /lib/libresolv.so.2 (0x40032000)
   libdb-4.1.so => /usr/local/BerkeleyDB.4.1/lib/libdb-4.1.so(0x40044000)
   libssl.so.0.9.7 => /usr/local/ssl/lib/libssl.so.0.9.7 (0x400ed000)
   libcrypto.so.0.9.7 => /usr/local/ssl/lib/libcrypto.so.0.9.7(0x4011b000)
   libc.so.6 => /lib/libc.so.6 (0x4020a000)
   libdl.so.2 => /lib/libdl.so.2 (0x40340000)
   /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
___________________________________________________________________________

Not sure if the line (Inappropriate ioctl for device) is relavant, but
(permission denied) sure is. I don't understand why permissions would
be denied. The user "cyrus" has all required perms.I can create/delete
directories within /var/spool and /var/spool/imap from the command line
as "cyrus". I have tried installing prior versions of berkeleydb and imapd
along with different installation directories. The result was the same.
Any help interpreting the above would be extremly welcome.

TIA

-Frank
0
Comment
Question by:frankjpi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 24

Expert Comment

by:shivsa
ID: 9783840
it is failing in creating directory /var/imap.
could u create dir /var/imap as user cyrus.
0
 
LVL 24

Accepted Solution

by:
shivsa earned 500 total points
ID: 9783849
in first few lines
u are creating all these 3 dir
mkdir /usr/sieve  /var/imap /var/spool/imap

and then u su to cyrus and run
./mkimap

------
does cyrus and u are having same and all kind of permission.
check permission and ownership of all these 3 dirs.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Nagios 4.0.8 ack_no_sticky=1 not working 7 19
linux - yum package installation issue 2 168
CentOS Backup Options 3 67
Logrotate Every Saturday 5 44
Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question