summaryrefslogtreecommitdiff
path: root/mail/sendmail/files/CYRUS_LOOKUP
blob: ff36ee7ee72c6b6eb5606119efc654b949a8ae76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
       CYRUS MAILBOX LOOKUP FOR SENDMAIL
       ---------------------------------

You have enabled modifications for sendmail for looking up
whether a cyrus (2.2.3+) mailbox exists and is under quota
before accepting any mail to be relayed to cyrus.

They are based on the idea and work by

Andrzej Filip, http://anfi.homeunix.net/sendmail/rtcyrus2.html
and
Mike Boev, http://tric.ru/users/mike/ckuser_cyrus/

Please, use these urls to learn all configuration details
(although a quick recipe is provided below) and may be to give
credits to the authors.
******************************************************************
IMPORTANT:
Now that the mrs_cyrus.m4 has been updated, you may need to adjust
the modifications you made to your .mc file if you used the old one! 
See http://anfi.homeunix.net/sendmail/rtcyrus2.html for current 
installation instructions.
******************************************************************

HOW TO :
---------

0.  Build the `mail/sendmail' sendmail port with
	SENDMAIL_WITH_SOCKETMAP=yes SENDMAIL_WITH_CYRUSLOOKUP=yes
    This is what you've just obviously done, unless you are just browsing the
    ports tree. To stick with these settings, you can place something like 
    the following in your `/etc/make.conf'.
   
PORTSDIR?=	/usr/ports
.if ${.CURDIR} == ${PORTSDIR}/mail/sendmail
SENDMAIL_WITH_CYRUSLOOKUP=	yes
SENDMAIL_WITH_SOCKETMAP=	yes
# possibly other sendmail knobs here too.
.endif

    You should have also installed and configured Cyrus IMAP server, 
    version 2.2.3 or higher. Not the worst idea is to utilize the 
    `mail/cyrus-imapd22' port.

1.  Insert the following lines to the SERVICES sections of `cyrus.conf'. 
    By default, the port installs it to `/usr/local/etc'.
   
    # Sendmail socket map smmapd(8)
    smmap        cmd="smmapd"  listen="/var/imap/socket/smmapd" prefork=0

    A SIGHUP would make the Cyrus master(8) process catch this change 
    on-the-fly. Please, also note, that if sendmail and cyrus run on
    separate machines, you will obviously need to modify this line
    and a couple of others.

2.  As per the `install-configure' from Cyrus IMAP server's documentation,
    in the simplest case, you added:
    
    define(`confLOCAL_MAILER', `cyrusv2')dnl
    MAILER(`cyrusv2')dnl
    
    to your sendmail's .mc file to make local delivery to Cyrus mailboxes.    
    Now, simply add (somewhere near other FEATURES, before MAILER lines):
    
    FEATURE(`ckuser_cyrus')dnl
    
    for sendmail to start rejecting local addresses for nonexisting and 
    full mailboxes. Rebuild your sendmail.cf, restart sendmail, and enjoy!
    
    If your configuration is more complicated than just defining Cyrus
    as your local mailer, read Andrzej's article. It covers more of the 
    other cases.
    
******************************************************************

2004, September 16th
Michael O. Boev,
mike@tric.ru.