Cyrus and sendmail
David Brown strato
dbrown at b-e-s-t-group.com
Thu Feb 12 10:24:51 EST 2004
FROM MIKE O'ROURKE:
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
***************************************
Mike,
Trying not burden this group with my newbie questions. I'm new to
Linux and do not have a programming background. I'm using the right source
now, but my failed results are below.
It must be something in the source configuration, which I copied from the
cyrusv2.m4 file and tried to customiye in a files I've called myfile.mc.
Please help!
David S. Brown
***** Creating myfile.mc *****
[root at ServerCharlie cf]# cp /usr/share/sendmail-cf/mailer/cyrusv2.m4
myfile.mc
cp: A>myfile.mcA< A?berschreiben? j
[root at ServerCharlie cf]# ./Build myfile.cf
Using M4=/usr/bin/m4
rm -f myfile.cf
/usr/bin/m4 ../m4/cf.m4 myfile.mc > myfile.cf || ( rm -f myfile.cf &&
exit 1 )
chmod 444 myfile.cf
***** myfile.mc contents *****
PUSHDIVERT(-1)
#
# Copyright (c) 2002 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
# Contributed by Kenneth Murchison.
#
_DEFIFNOT(`_DEF_CYRUSV2_MAILER_FLAGS', `lsDFMnqXz')
_DEFIFNOT(`CYRUSV2_MAILER_FLAGS', `A@/:|m')
ifdef(`CYRUSV2_MAILER_ARGS',, `define(`CYRUSV2_MAILER_ARGS', `FILE
/var/imap/socket/lmtp')')
define(`_CYRUSV2_QGRP', `ifelse(defn(`CYRUSV2_MAILER_QGRP'),`',`', `
Q=CYRUSV2_MAILER_QGRP,')')dnl
POPDIVERT
#########################################
### Cyrus V2 Mailer specification ###
#########################################
VERSIONID(`$Id: cyrusv2.m4,v 1.1 2002/06/01 21:14:57 ca Exp $')
Mcyrusv2, P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS,
CYRUSV2_MAILER_FLAGS), `CYRUSV2'),
S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, E=\r\n,
_OPTINS(`CYRUSV2_MAILER_MAXMSGS', `m=', `,
')_OPTINS(`CYRUSV2_MAILER_MAXRCPTS', `r=', `,
')_OPTINS(`CYRUSV2_MAILER_CHARSET',
`C=', `, ')T=DNS/RFC822/SMTP,_CYRUSV2_QGRP
A=CYRUSV2_MAILER_ARGS
***** Copy to sendmail.cf and restart as is *****
[root at ServerCharlie cf]# cp myfile.cf /etc/mail/sendmail.cf
cp: A>/etc/mail/sendmail.cfA< A?berschreiben? j
[root at ServerCharlie cf]# /etc/init.d/sendmail stop;
/etc/init.d/sendmail start
sendmail herunterfahren: [ OK ]
sm-client herunterfahren:
[FEHLGESCHLAGEN]
sendmail starten: 554 5.0.0 /etc/mail/sendmail.cf: line 2: unknown
configuration line "PUSHDIVERT(-1)"
554 5.0.0 /etc/mail/sendmail.cf: line 14: unknown configuration line
"_DEFIFNOT(_DEF_CYRUSV2_MAILER_FLAGS, lsDFMnqXz)"
554 5.0.0 /etc/mail/sendmail.cf: line 15: unknown configuration line
"_DEFIFNOT(CYRUSV2_MAILER_FLAGS, A@/:|m)"
554 5.0.0 /etc/mail/sendmail.cf: line 18: unknown configuration line
"POPDIVERT"
554 5.0.0 /etc/mail/sendmail.cf: line 24: invalid argument to V line:
"ERSIONID(#Id: cyrusv"
554 5.0.0 /etc/mail/sendmail.cf: line 29: mailer cyrusv2: `=' expected
554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
[FEHLGESCHLAGEN]
sm-client starten: [ OK ]
***** Changed instances of # " A? " to " ' " *****
example:
from: _DEFIFNOT(`CYRUSV2_MAILER_FLAGS', `A@/:|m')
to: _DEFIFNOT('CYRUSV2_MAILER_FLAGS', 'A@/:|m')
RESULTS: PROBLEM WITH BUILD
[root at ServerCharlie cf]# ./Build myfile.cf
Using M4=/usr/bin/m4
rm -f myfile.cf
/usr/bin/m4 ../m4/cf.m4 myfile.mc > myfile.cf || ( rm -f myfile.cf &&
exit 1 )
myfile.mc:16: /usr/bin/m4: Warning: Excess arguments to built-in
`ifelse' ignored
chmod 444 myfile.cf
***** Further changes *****
from:
define('_CYRUSV2_QGRP', 'ifelse(defn('CYRUSV2_MAILER_QGRP'),'','', '
Q=CYRUSV2_MAILER_QGRP,')')dnl
to:
define('_CYRUSV2_QGRP', 'ifelse(defn('CYRUSV2_MAILER_QGRP'),'','', '
Q=CYRUSV2_MAILER_QGRP')')dnl
(removed comma near end of line)
RESULTS: BUILD OK
ERRORS REMAIN
[root at ServerCharlie cf]# ./Build myfile.cf
Using M4=/usr/bin/m4
rm -f myfile.cf
/usr/bin/m4 ../m4/cf.m4 myfile.mc > myfile.cf || ( rm -f myfile.cf &&
exit 1 )
chmod 444 myfile.cf
[root at ServerCharlie cf]# cp myfile.cf /etc/mail/sendmail.cf
cp: A>/etc/mail/sendmail.cfA< A?berschreiben? j
[root at ServerCharlie cf]# /etc/init.d/sendmail stop;
/etc/init.d/sendmail start
sendmail herunterfahren: [ OK ]
sm-client herunterfahren:
[FEHLGESCHLAGEN]
sendmail starten: 554 5.0.0 /etc/mail/sendmail.cf: line 2: unknown
configuration line "PUSHDIVERT(-1)"
554 5.0.0 /etc/mail/sendmail.cf: line 14: unknown configuration line
"_DEFIFNOT('_DEF_CYRUSV2_MAILER_FLAGS', 'lsDFMnqXz')"
554 5.0.0 /etc/mail/sendmail.cf: line 15: unknown configuration line
"_DEFIFNOT('CYRUSV2_MAILER_FLAGS', 'A@/:|m')"
554 5.0.0 /etc/mail/sendmail.cf: line 18: unknown configuration line
"POPDIVERT"
554 5.0.0 /etc/mail/sendmail.cf: line 24: invalid argument to V line:
"ERSIONID('#Id: cyrus"
554 5.0.0 /etc/mail/sendmail.cf: line 29: mailer cyrusv2: `=' expected
554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
[FEHLGESCHLAGEN]
sm-client starten: [ OK ]
***** Further changes *****
removed:
PUSHDIVERT(-1)
POPDIVERT
RESULTS: SAME ERRORS
***** Further changes *****
Added:
OSTYPE(linux)
RESULTS: SAME ERRORS
***** Further changes *****
Added to top:
divert(-1)
RESULTS: ERRORS REDUCED BUT RESULTS IN EMPTY FILE
[root at ServerCharlie cf]# /etc/init.d/sendmail stop;
/etc/init.d/sendmail start
sendmail herunterfahren: [ OK ]
sm-client herunterfahren:
[FEHLGESCHLAGEN]
sendmail starten: 554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
[FEHLGESCHLAGEN]
sm-client starten: [ OK ]
[root at ServerCharlie cf]# cat myfile.cf
[root at ServerCharlie cf]#
root at ServerCharlie mail]# cat sendmail.cf
root at ServerCharlie mail]#
***** Further changes *****
Added following to myfile.mc after text info:
divert(0)
RESULTS: SAME ERRORS AS BEFORE
[root at ServerCharlie cf]# ./Build myfile.cf
Using M4=/usr/bin/m4
rm -f myfile.cf
/usr/bin/m4 ../m4/cf.m4 myfile.mc > myfile.cf || ( rm -f myfile.cf &&
exit 1 )
chmod 444 myfile.cf
[root at ServerCharlie cf]# cp myfile.cf /etc/mail/sendmail.cf
cp: A>/etc/mail/sendmail.cfA< A?berschreiben? j
[root at ServerCharlie cf]# /etc/init.d/sendmail stop;
/etc/init.d/sendmail start
sendmail herunterfahren: [ OK ]
sm-client herunterfahren:
[FEHLGESCHLAGEN]
sendmail starten: 554 5.0.0 /etc/mail/sendmail.cf: line 6: unknown
configuration line "_DEFIFNOT('_DEF_CYRUSV2_MAILER_FLAGS', 'lsDFMnqXz')"
554 5.0.0 /etc/mail/sendmail.cf: line 7: unknown configuration line
"_DEFIFNOT('CYRUSV2_MAILER_FLAGS', 'A@/:|m')"
554 5.0.0 /etc/mail/sendmail.cf: line 16: invalid argument to V line:
"ERSIONID('#Id: cyrus"
554 5.0.0 /etc/mail/sendmail.cf: line 21: mailer cyrusv2: `=' expected
554 5.0.0 No local mailer defined
554 5.0.0 QueueDirectory (Q) option must be set
***** Further changes *****
changed to:
OSTYPE('linux')
RESULTS: SAME ERRORS
***** Further changes *****
changed divert commands to popdivert.
RESULTS: SAME ERRORS
changed back to divert.
***** Further changes *****
changed:
from: OSTYPE('linux')
to: _OSTYPE('linux')
RESULTS: SAME ERRORS
changed it back.
At a loss, need help......
********************************************************
******************** config files **********************
********************************************************
***** Current source file myfile.mc (after changes) *****
divert(-1)
#
# Copyright (c) 2002 Sendmail, Inc. and its suppliers.
# All rights reserved.
#
# By using this file, you agree to the terms and conditions set
# forth in the LICENSE file which can be found at the top level of
# the sendmail distribution.
#
# Contributed by Kenneth Murchison.
#
divert(0)
OSTYPE('linux')
_DEFIFNOT('_DEF_CYRUSV2_MAILER_FLAGS', 'lsDFMnqXz')
_DEFIFNOT('CYRUSV2_MAILER_FLAGS', 'A@/:|m')
ifdef('CYRUSV2_MAILER_ARGS',, 'define('CYRUSV2_MAILER_ARGS', 'FILE
/var/imap/socket/lmtp')')
define('_CYRUSV2_QGRP', 'ifelse(defn('CYRUSV2_MAILER_QGRP'),'','', '
Q=CYRUSV2_MAILER_QGRP')')dnl
#########################################
### Cyrus V2 Mailer specification ###
#########################################
VERSIONID('$Id: cyrusv2.m4,v 1.1 2002/06/01 21:14:57 ca Exp $')
Mcyrusv2, P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS,
CYRUSV2_MAILER_FLAGS), 'CYRUSV2'),
S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, E=\r\n,
_OPTINS('CYRUSV2_MAILER_MAXMSGS', 'm=', ',
')_OPTINS(`CYRUSV2_MAILER_MAXRCPTS', 'r=', ',
')_OPTINS('CYRUSV2_MAILER_CHARSET',
'C=', ', ')T=DNS/RFC822/SMTP,_CYRUSV2_QGRP
A=CYRUSV2_MAILER_ARGS
***** imapd.conf *****
configdirectory: /var/lib/imap
partition-default: /var/spool/imap
admins: cyrus root
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
***** cyrus.conf *****
# standard standalone server implementation
START {
# do not delete this entry!
recover cmd="ctl_cyrusdb -r"
# this is only necessary if using idled for IMAP IDLE
# idled cmd="idled"
}
# UNIX sockets start with a slash and are put into
/var/lib/imap/sockets
SERVICES {
# add or remove based on preferences
imap cmd="imapd" listen="imap" prefork=5
imaps cmd="imapd -s" listen="imaps" prefork=1
pop3 cmd="pop3d" listen="pop3" prefork=3
pop3s cmd="pop3d -s" listen="pop3s" prefork=1
sieve cmd="timsieved" listen="sieve" prefork=0
# at least one LMTP is required for delivery
lmtp cmd="lmtpd" listen="lmtp" prefork=0
lmtpunix cmd="lmtpd" listen="/var/lib/imap/socket/lmtp"
prefork=1
# this is only necessary if using notifications
# notify cmd="notifyd" listen="/var/lib/imap/socket/notify"
proto="udp" prefork=1
}
EVENTS {
# this is required
checkpoint cmd="ctl_cyrusdb -c" period=30
# this is only necessary if using duplicate delivery suppression
delprune cmd="ctl_deliver -E 3" at=0400
***** sendmail.cf *****
["OSTYPE" has first two letters highlighted like they are not
recognized]
OSTYPE('linux')
_DEFIFNOT('_DEF_CYRUSV2_MAILER_FLAGS', 'lsDFMnqXz')
_DEFIFNOT('CYRUSV2_MAILER_FLAGS', 'A@/:|m')
#########################################
### Cyrus V2 Mailer specification ###
#########################################
VERSIONID('$Id: cyrusv2.m4,v 1.1 2002/06/01 21:14:57 ca Exp $')
Mcyrusv2, P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS,
CYRUSV2_MAILER_FLAGS), 'CYRUSV2'),
S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, E=\r\n,
_OPTINS('CYRUSV2_MAILER_MAXMSGS', 'm=', ',
')_OPTINS(CYRUSV2_MAILER_MAXRCPTS, 'r=', ',
')_OPTINS('CYRUSV2_MAILER_CHARSET',
'C=', ', ')T=DNS/RFC822/SMTP,_CYRUSV2_QGRP
A=CYRUSV2_MAILER_ARGS
~
~
---
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