Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 1998 13:16:59 +0800 (SGT)
From:      chas <panda@peace.com.my>
To:        techsupport@nordicdms.com, freebsd-questions@FreeBSD.ORG
Subject:   Re: Cyrus IMAPd and Qmail working together anyone ?
Message-ID:  <3.0.32.19980528133904.00956e80@peace.com.my>

next in thread | raw e-mail | index | archive | help
Just want to say a huge thank you Dave.

I got exactly the same advice from someone on the qmail list too.
(looks like the same guy judging by the script). I had no
problem with Qmail and Cyrus separately but having messed
around with my config files prior to getting the two to 
work together, it took a lot of trial and error to get this
working. In fact, I still have a slightly different set up
from the one below.

Anyway, for anyone else who has to do this, best advice is
to follow the pointers laid out below on a clean install of
Cyrus and Qmail, and it should work OK. 

>By the way...  Do you know how to make cyrus use something other than 
>/etc/passwd for authentication?  I've got it on a machine that 
>doesn't allow user logins, and I don't really want to fill up 
>/etc/passwd with a bunch of usernames and passwords that will only be 
>used by cyrus.

I've been looking at exactly this b/c there is little need for
cyrus IMAP users to have login accounts. Since I'm finishing a
web-email application, this would be highly desirable.

Things I'm considering :
1) recompiling pwcheck with a modified version of pwd.h 
   to use a separate password file. This means that it won't
   work for login accounts on the box, whose passwords
   are in /etc/master.passwd
2) use a dbm file (someone's passing me the script later,
   but I'm not sure if it will be fast enough). 
3) another hack to cause pwcheck to use the current
   /etc/master.passwd first, and then check a second file
   if the user ID is not in the system spdb.

if you wanna take this offline, just email me direct...
I'll post a summarised results to the list anyway since
many people seem to be looking for this.

chas

>> I'm now having a total nightmare trying to get Qmail to feed
>> mail to Cyrus IMAP on a third server. Has anyone got this to
>> work ? If so, may I ask a desperate 'how' ? 
>
>
>Chas,
>
>I just did this, and it went very smoothly.  Of course, I did get 
>some good pointers from someone on the qmail list before I started, 
>so I guess it's my turn to pass it along.
>
>I assume you can handle installing cyrus and qmail.  Do that, except 
>you can ignore the sendmail-specific portions of the cyrus install, 
>since you won't be using sendmail.
>
>You'll need to give the cyrus account a home directory to put its 
>.qmail files in, and make it owned by cyrus.  (We'll assume you use 
>/home/cyrus, but it could be anywhere.)
>
>Create /home/cyrus/.qmail-default containing:
>|/home/cyrus/qmail-deliver
>
>Create /home/cyrus/qmail-deliver containing the script attached 
>below, and make it executable by the cyrus account.  This script 
>feeds the email to cyrus and translates the return codes for qmail.
>
>Now all you need to do to put mail into username's cyrus box is 
>forward it to cyrus-username from any .qmail file.  cyrus-username is 
>handled by ~cyrus/.qmail-default while qmail strips off the "cyrus-" 
>and puts "username" in $EXT.  The cyrus deliver program reads $EXT 
>from its command line, and puts the mail in the user.username box.
>
>That help any?
>
>By the way...  Do you know how to make cyrus use something other than 
>/etc/passwd for authentication?  I've got it on a machine that 
>doesn't allow user logins, and I don't really want to fill up 
>/etc/passwd with a bunch of usernames and passwords that will only be 
>used by cyrus.
>
>Dave
>
>
>
>qmail-deliver:
>------------------------------------------------------------
>#!/bin/sh
>#
># This script should be called from a .qmail-default file.
># It delivers mail to Cyrus' deliver, and returns the proper
># error code for qmail.
>#
>/usr/local/cyrus/bin/deliver $EXT
>case $? in
>  64|65|66|67|68|76|77|78)
>    exit 100
>    ;;
>  0)
>    exit 0
>    ;;
>  *)
>    exit 111
>    ;;
>esac
># man qmail-command:
>#         command's exit codes are interpreted as follows:  0 means
>#         that the delivery was successful; 99 means that the delivery
>#         was successful, but that qmail-local should ignore all
>#         further delivery instructions; 100 means that the delivery
>#         failed permanently (hard error); 111 means that the delivery
>#         failed but should be tried again in a little while (soft
>#         error)
>
># cyrus deliver uses the /usr/include/sysexits.h codes:
>#
># define EX_USAGE       64   /* command line usage error */
># define EX_DATAERR     65   /* data format error */
># define EX_NOINPUT     66   /* cannot open input */
># define EX_NOUSER      67   /* addressee unknown */
># define EX_NOHOST      68   /* host name unknown */
># define EX_UNAVAILABLE 69   /* service unavailable */
># define EX_SOFTWARE    70   /* internal software error */
># define EX_OSERR       71   /* system error (e.g., can't fork) */
># define EX_OSFILE      72   /* critical OS file missing */ 
># define EX_CANTCREAT   73   /* can't create (user) output file */ 
># define EX_IOERR       74   /* input/output error */ 
># define EX_TEMPFAIL    75   /* temp failure; user is invited to retry */ 
># define EX_PROTOCOL    76   /* remote error in protocol */ 
># define EX_NOPERM      77   /* permission denied */ 
># define EX_CONFIG      78   /* configuration error */
>------------------------------------------------------------
>
>----------------------------------------------------------------------
>Dave Walton                                                           
>Tech Support                            Nordic Entertainment Worldwide
>techsupport@nordicdms.com                     http://www.nordicdms.com
>----------------------------------------------------------------------
>
>

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.19980528133904.00956e80>