Cyrus and sendmail

Mike O'Rourke mjoop at curia.op.org
Tue Feb 10 10:24:55 EST 2004


>>> "David Brown strato" <dbrown at b-e-s-t-group.com> 02/10/04 03:29pm
>>>
>>
>> ***** ERROR MESSAGE *****
>>
>> [root at SERVERNAME cyrus-imapd-2.1.16]# /etc/init.d/sendmail start
>> sendmail starten: 554 5.0.0 No local mailer defined
>> 554 5.0.0 QueueDirectory (Q) option must be set
>
>Lack of QueueDirectory usually means that sendmail.cf is an empty file
or
>badly wrong.
>
>How to generate sendmail.cf from *.mc file is described at
>http://www.sendmail.org/m4/intro.html 
>
>Andrzej [en:Andrew] Adam Filip http://anfi.freeshell.org backup:
>anfi at xl.wp.pl 
>
>****************************************************************************
>************
>
>Thanks!  I've worked pretty much everything out (including building
>sendmail.cf and restarting sendmail without errors), except my mail is
still
>not going to cyrus.  Notice the message below does not say "connecting
to
>cyrus".  My mail goes to /var/spool/mail instead.  I put a dummy
message
>into /var/spool/imap/d/user/dbrown and I can see the message in
Outlook on a
>workstation.  Now if I can only get incoming messages to go there!
>
>I'd appreciate it if someone could check my configs and tell me where
I went
>wrong.  It must be something in these configs.  Simon said something
about
>using lmtp, but frankly I haven't a clue.  Please see below: test
message,
>imapd.conf, cyrusv2.mc, steps to create sendmail.cf.
>
>Thanks in advance for any advice from the list! Please reply all.
>
>David S. Brown
>
>****************************************************************************
>***************
>
>***** Attempted Message *****
>
>[testuser at ServerCharlie testuser]$ echo "Subject:
>Testing 1 2 3" | /usr/lib/sendmail -v debug
>debug... Connecting to [127.0.0.1] via relay...
>220 localhost.localdomain ESMTP Sendmail
>8.12.8/8.12.8; Tue, 10 Feb 2004 13:56:54 +0100
>>>> EHLO localhost.localdomain
>250-localhost.localdomain Hello ServerCharlie
>[127.0.0.1], pleased to meet you
>250-ENHANCEDSTATUSCODES
>250-PIPELINING
>250-EXPN
>250-VERB
>250-8BITMIME
>250-SIZE
>250-DSN
>250-ETRN
>250-DELIVERBY
>250 HELP
>>>> MAIL From:<testuser at localhost.localdomain> SIZE=23
>250 2.1.0 <testuser at localhost.localdomain>... Sender
>ok
>>>> RCPT To:<debug at localhost.localdomain>
>>>> DATA
>250 2.1.5 <debug at localhost.localdomain>... Recipient
>ok
>354 Enter mail, end with "." on a line by itself
>>>> .
>250 2.0.0 i1ACusib009128 Message accepted for delivery
>debug... Sent (i1ACusib009128 Message accepted for
>delivery)
>Closing connection to [127.0.0.1]
>>>> QUIT
>221 2.0.0 localhost.localdomain closing connection
>[testuser at ServerCharlie testuser]$
>
>
>***** imapd.conf file *****
>
>[root at ServerCharlie root]# cat /etc/imapd.conf
>configdirectory: /var/lib/imap
>partition-default: /var/spool/imap
>admins: cyrus
>sievedir: /var/lib/imap/sieve
>sendmail: /usr/sbin/sendmail
>hashimapspool: true
>sasl_pwcheck_method: saslauthd
>sasl_mech_list: PLAIN
>tls_cert_file: /usr/share/ssl/certs/cyrus-imapd.pem
>tls_key_file: /usr/share/ssl/certs/cyrus-imapd.pem
>tls_ca_file: /usr/share/ssl/certs/ca-bundle.crt
>[root at ServerCharlie root]#
>
>***** sendmail source config file cyrusv2.mc *****
>
>[root at ServerCharlie cf]# cat cyrusv2.mc
>divert(-1)
>#
>#       (C) Copyright 2000 by Carnegie Mellon
>University
>#
>#       This sample mc file is for a site that uses
>the Cyrus IMAP server
>#       exclusively for local mail. This requires
>Sendmail 8.10 or later.
>#
>
># $Id: cyrusv2.mc,v 1.4 2001/08/23 23:26:56 leg Exp $
>divert(0)dnl
>VERSIONID('cyrus configuration for redhat linux')
>
>OSTYPE(linux)dnl
>define('confBIND_OPTS','-DNSRCH -DEFNAMES')
>define('confTO_IDENT','0')
>
>dnl setting cyrus as the trusted user will make it
>easier to pass
>dnl Sendmail's safefile checks.  however, it means
>that someone with the
>dnl "cyrus" password could easily become root.
>dnl define('confTRUSTED_USER','cyrus')
>
>define('confLOCAL_MAILER', 'cyrus')
>
>dnl if you aren't using Sendmail 8.12, you might need
>to remove
>dnl the following feature.
>FEATURE(preserve_local_plus_detail)
>
>FEATURE(nocanonify)
>FEATURE(always_add_domain)
>
>MAILER(local)
>MAILER(smtp)
>
>MAILER_DEFINITIONS
>Mcyrus,         P=/usr/lib/cyrus-imapd/deliver,
>F=lsDFMnqA@/:|SmXz, E=\r\n,
>                S=EnvFromL, R=EnvToL/HdrToL,
>T=DNS/RFC822/X-Unix, U=cyrus:mail,
>                A=deliver -m $h -- $u
>
>LOCAL_RULE_0
>Rbb + $+ < @ $=w . >    $#cyrus $: + $1
>
>[root at ServerCharlie cf]#
>
>
>***** Steps to build sendmail.cf *****
>
>
>1) Edit cyrusv2.mc
>
>2) m4 it:
>[root at ServerCharlie cf]# m4
>
>/usr/share/sendmail-cf/m4/cf.m4 cyrusv2.mc >
>cyrusv2.cf
>
>3) Copy resulting file to sendmail.cf
>
>[root at ServerCharlie cf]# cp cyrusv2.cf
>/etc/mail/sendmail.cf
>cp: >/etc/mail/sendmail.cf< uberschreiben? j
>
>4) Restart sendmail:
>
>[root at ServerCharlie cf]# /etc/init.d/sendmail stop;
>/etc/init.d/sendmail start
>sendmail herunterfahren:
>    [  OK  ]
>sm-client herunterfahren:
>    [  OK  ]
>sendmail starten:
>    [  OK  ]
>sm-client starten:
>    [  OK  ]
>[root at ServerCharlie cf]#
>

Hi David,

The mailer definition that you are using in your cyrusv2.mc file is for
cyrus version 1. You need to use the mailer definitions from
/path/to/sendmail/source/cf/mailer/cyrusv2.m4; you have those from
/path/to/sendmail/source/cf/mailer/cyrus.m4 instead.

One precaution: you are using the "deliver" program for mail delivery
to cyrus (the default with version 1). The cyrusv2 mailer definition
uses lmtp instead, which, I believe, is the preferred method. You will
need to change this if there is a particular reason that you want to use
"deliver", or check in /etc/cyrus.conf to see if you are starting the
lmtp service there.

HTH, Mike.
---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list