Using Procmail, Sendmail with Cyrus

gui gui at function.com
Thu Nov 17 16:33:55 EST 2005


Andrzej Adam Filip wrote:

> gui wrote:
>
>> I'm trying to use Procmail on my Sendmail/Cyrus server.
>> I'm using cyrus-imapd-2.2.12 and Sendmail 8.13.3on Freebsd 5.4, and 
>> want to use procmail-3.22_6.
>>
>> I couldn't find much information on the web on how to use procmail. 
>> My main objective is to get bsd vacation working - and this requires 
>> procmail.
>> I need vacation because my webmail Horde needs it (cannot use sieve).
>>
>> The only information I can find is :  
>> http://subwiki.honeypot.net/cgi-bin/view/Freebsd/SendMailAndCyrus?skin=print.pattern 
>>
>> And the O'Rielly IMAP Management book.  But both are not very clear. 
>> Has anybody installed and configured Procmail on a Sendmail/Cyrus 
>> server?
>> Care to share your experience and a How-To?
>>
>> Thank you very much in anticipation.
>
>
> The simplest method is to make sendmail deliver messages via standard 
> local mailer and use ~/.procmailrc to redirect messages to cyrus using 
> "deliver" program from cyrus package.
>
> There are multitude of cyrus&sendmail integration methods.
> A few are described at: http://anfi.homeunix.net/sendmail/#cyrus
>
> e.g. it is possible to select cyrus mailer *after* alias and 
> ~/.forward expansion. It will allow users with OS account to use 
> procmail for processing recived messages. Users without ~/.forward 
> file and existing corresponding cyrus mailobx will get their mail 
> delivered to cyrus mailbox.
>
hi Andrzej and Everybody

Thank you for the reply.

This is what I did.

Installed procmail.

In my server.example.com.mc file, I  added 
FEATURE(local_procmail_lmtp)   
define(`confLOCAL_MAILER', `cyrusv2')
MAILER(`cyrusv2')
define(`CYRUS_MAILER_FLAGS','A5 at W')


In my /usr/share/sendmail/cf/mailer/cyrusv2.m4 file,
I modified ifdef(`CYRUSV2_MAILER_ARGS',, `define(`CYRUSV2_MAILER_ARGS', 
`FILE /var/imap/socket/lmtp')')
to
ifdef(`CYRUSV2_MAILER_ARGS',, `define(`CYRUSV2_MAILER_ARGS', `procmail 
-p /usr/local/etc/procmailrc CYR
USUSER=$u')')

and modified
Mcyrusv2,       P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS, 
CYRUSV2_MAILER_FLAGS), `CYRUSV2'), ...
 to:
 Mcyrusv2,       P=/usr/local/bin/procmail, 
F=_MODMF_(CONCAT(_DEF_CYRUSV2_MAILER_FLAGS, CYRUSV2_MAILER_F
LAGS), `CYRUSV2'), ....

After doing a make, make install in /etc/mail.
my /etc/mail/server.example.com.cf file has this
Mcyrusv2,       P=/usr/local/bin/procmail, F=lsDFMnqXzA@/:|m,
                S=EnvFromSMTP/HdrFromL, R=EnvToL/HdrToL, E=\r\n,
                T=DNS/RFC822/SMTP,
                A=procmail -p /usr/local/etc/procmailrc CYRUSUSER=$u

My /usr/local/etc/procmailrc file reads:
/usr/local/cyrus/bin/deliver -a $CYRUSUSER -m user.$CYRUSUSER


But I cannot send anything to my users.
Got this message in the /var/log/maillog

Nov 17 21:30:21 servername sm-mta[9341]: jAI5UL89009341: 
from=<username at domainname.com>, size=655, class=0, nrcpts=1, 
msgid=<437CF677.2090901 at domainname.com>, proto=ESMTP, daemon=IPv4, 
relay=hidden-user@[192.168.5.1]
Nov 17 21:30:21 servername sm-mta[9343]: NOQUEUE: Warning: mailer 
cyrusv2: LMTP flag (F=z) turned off
Nov 17 21:30:22 servername sm-mta[9343]: jAI5UL89009341: 
to=<username at servername.domainname.com>, delay=00:00:01, 
xdelay=00:00:01, mailer=cyrusv2, pri=30655, dsn=2.0.0, stat=Sent


My Sendmail/Cyrus was working fine before I did all this procmail 
modifications.

Can anybody help?

Thank you very much in anticipation.

Gui









More information about the Info-cyrus mailing list