From owner-freebsd-questions Wed May 27 16:46:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA05873 for freebsd-questions-outgoing; Wed, 27 May 1998 16:46:39 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail-ftp.nordicdms.com ([207.21.168.100]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA05503 for ; Wed, 27 May 1998 16:45:24 -0700 (PDT) (envelope-from walton@nordicdms.com) Received: from mail-ftp (mail.nordicdms.com [207.21.168.101]) by mail-ftp.nordicdms.com (Post.Office MTA v3.1 release PO205e ID# 0-0U10L2S100) with SMTP id AAA201; Wed, 27 May 1998 16:44:13 -0700 From: walton@nordicdms.com (Dave Walton) Organization: Nordic Entertainment Worldwide To: chas , freebsd-questions@FreeBSD.ORG Date: Wed, 27 May 1998 16:44:12 -800 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: Cyrus IMAPd and Qmail working together anyone ? Reply-to: techsupport@nordicdms.com In-reply-to: <3.0.32.19980527113520.0092f940@peace.com.my> Message-ID: <19980527234413097.AAA201@mail.nordicdms.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 27 May 98 at 11:13, chas wrote: > 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