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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
|
--- cf/feature/ckuser_cyrus.m4.orig 2021-03-23 05:32:02 UTC
+++ cf/feature/ckuser_cyrus.m4
@@ -0,0 +1,34 @@
+divert(-1)
+# Written by Mike Boev <mike@tric.ru>, 2004.
+# Homepage: http://tric.ru/users/mike/ckuser_cyrus/
+# Inspired by: mrs_cyrus.m4 by Andrzej Adam Filip
+#
+# 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.
+#
+divert(0)
+VERSIONID(`Id: ckuser_cyrus.m4,v 1.4 2004/09/21 19:02:17 m Exp ')
+divert(-1)
+define(`CYRUS_SMMAPD_SOCKET',
+ ifelse(len(X`'_ARG_), `1', `local:/var/imap/socket/smmap', _ARG_))
+
+MODIFY_MAILER_FLAGS(`CYRUSV2',`+5')
+
+LOCAL_CONFIG
+# Cyrus smmapd(8)'s map for verifying mailboxes of local recipients
+Kcyrus socket -a<OK> -T<TMPF> CYRUS_SMMAPD_SOCKET
+
+LOCAL_RULESETS
+SLocal_localaddr
+R$+ $: $> "ckuser_cyrus" $1
+
+Sckuser_cyrus
+#Query smmapd(8)
+R$+ $: <!> $1 $| $(cyrus $1 $: $)
+#Cyrus OK, skip
+R<!> $* $| $* <OK> $@ $1
+#Over quota or lookup failure
+R<!> $* $| $* <TMPF> $# error $@ 4.3.0 $: "451 TEMPFAIL."
+#Mailbox doesn't exist or its ACL forbids posting
+R<!> $* $| $* $# error $@ 5.1.1 $: "550 Mailbox is not available."
--- cf/feature/mrs_cyrus.m4.orig 2021-03-23 05:32:02 UTC
+++ cf/feature/mrs_cyrus.m4
@@ -0,0 +1,80 @@
+divert(-1)
+dnl
+dnl Updates: http://anfi.homeunix.net/sendmail/rtcyrus2.html
+dnl
+dnl By using this file, you agree to the terms and conditions set
+dnl forth in the LICENSE file which can be found at the top level of
+dnl the sendmail distribution (sendmail-8.12).
+dnl
+dnl Contributed by Andrzej Filip
+dnl
+dnl Log: mrs_cyrus.m4,v
+dnl Revision 8.9 2005/01/24 19:44:53 anfi
+dnl Fixed handling of empty relay
+dnl
+dnl Revision 8.8 2004/08/11 18:20:05 anfi
+dnl "stipdom" replaced by "dummy"
+dnl
+dnl Revision 8.7 2004/04/01 14:29:50 anfi
+dnl Added "stripdom" handling in mrs_cyrus_user.
+dnl Fully defined error mailer details.
+dnl
+dnl Revision 8.6 2004/03/18 23:17:57 anfi
+dnl Fundamental rewrite.
+dnl
+ifdef(`_MRS_RELAY_',`',
+ `errprint(`*** ERROR: FEATURE(mrs_cyrus) requires FEATURE(mrs)
+')')
+ifdef(`_MRS_CYRUS_',
+ `errprint(`*** ERROR: There can be only one FEATURE(mrs_cyrus*)
+')')
+define(`_MRS_CYRUS_',`')
+
+divert(0)
+VERSIONID(`Id: mrs_cyrus.m4,v 8.9 2005/01/24 19:44:53 anfi Exp ')
+divert(-1)
+define(`CYRUS_SMMAPD_SOCKET',
+ ifelse(len(X`'_ARG_), `1', `/var/imap/socket/smmap', _ARG_))
+define(`CYRUS_SMMAPD_SOCKET_TYPE',
+ ifelse(len(X`'_ARG2_), `1', `local', _ARG2_))
+LOCAL_CONFIG
+# Add 3 mrs_cyrus rule sets to list of valid mrs rule sets
+C{MRS}mrs_cyrus_user mrs_cyrus_mailertable mrs_cyrus_stickyhub
+# map for checking cyrus imap mailbox existence
+Kcyrus socket -a<OK> -T<TMPF> CYRUS_SMMAPD_SOCKET_TYPE:CYRUS_SMMAPD_SOCKET
+
+LOCAL_RULESETS
+######################################################################
+### feature mrs_cyrus rulesets to be used by feature mrs
+######################################################################
+
+Smrs_cyrus_user
+R<$*> $+ <@$+.> $: <$1> $2 <@ $3 >
+R<$*> $+ <@$*> $: <$1> $2 <@$3> $| $(cyrus $2 $: $)
+R<$*> $+ <@$*> $| $* <TMPF> $# error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
+R<$*> $+ <@$*> $| $* <OK> $# cyrusv2 $@ dummy $: $4
+R<$*> $+ <@$*> $| $* $: <$1> $2 <@$3>
+R<dummy> $+ <@dummy> $@ $1
+R< > $* $# error $@ 5.1.1 $: "550 User unknown"
+R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3
+R< $+ > $* $>MailerToTriple < $1 > $2
+
+Smrs_cyrus_mailertable
+R<$*> $+ <@$+.> $: <$1> $2 <@ $3 >
+R<$*> $+ <@$+> $: <$1> $2 <@$3> $| $(cyrus $2@$3 $: $)
+R<$*> $+ <@$+> $| $* <TMPF> $# error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
+R<$*> $+ <@$+> $| $* <OK> $# cyrusv2d $@ dummy $: $2 <@$3>
+R<$*> $+ <@$*> $| $* $: <$1> $2 <@$3>
+R< > $* $# error $@ 5.1.1 $: "550 User unknown"
+R< $~[ : $* > $* $>MailerToTriple < $1 : $2 > $3
+R< $+ > $* $>MailerToTriple < $1 > $2
+
+Smrs_cyrus_stickyhub
+R<dummy> $+ <@$+.> $: <dummy> $1 <@ $2 >
+R<dummy> $* <@dummy> $@ $1
+R<dummy> $+ <@$={VirtCyrus}> $: <dummy> $1 <@$2> $| $(cyrus $1@$2 $: $)
+R<dummy> $+ <@$={VirtCyrus}> $| $* <TMPF> $# error $@ 4.3.0 $: "451 Temporary system failure. Please try again later."
+R<dummy> $+ <@$={VirtCyrus}> $| $* <OK> $# cyrusv2d $@ dummy $: $1 <@$2>
+R<dummy> $+ <@$={VirtCyrus}> $| $* $# error $@ 5.1.1 $: "550 User unknown"
+R<dummy> $=L <@$*> $# ifdef(`confLOCAL_MAILER',confLOCAL_MAILER,`local') $: @$1
+R<dummy> $* <@$*> $# ifdef(`confLOCAL_MAILER',confLOCAL_MAILER,`local') $: $1
--- cf/feature/mrs.m4.orig 2021-03-23 05:32:02 UTC
+++ cf/feature/mrs.m4
@@ -0,0 +1,25 @@
+divert(-1)
+dnl
+dnl Updates: http://anfi.webhop.net/sendmail/mrs.html
+dnl
+dnl By using this file, you agree to the terms and conditions set
+dnl forth in the LICENSE file which can be found at the top level of
+dnl the sendmail distribution (sendmail-8.12).
+dnl
+dnl Contributed by Andrzej Filip
+dnl
+dnl THE FEATURE REQUIRES PATCHING cf/m4/proto.m4
+dnl SEE THE LINK AFTER "Updates:"
+dnl
+dnl Log: mrs.m4,v
+dnl Revision 8.3 2004/03/18 21:39:22 anfi
+dnl Changed comments prefixes to dnl to avoid m4 expansions
+dnl
+dnl Revision 8.2 2004/03/15 09:14:28 anfi
+dnl Added "Updates:" web link.
+dnl
+divert(0)
+VERSIONID(`Id: mrs.m4,v 8.3 2004/03/18 21:39:22 anfi Exp ')
+divert(-1)
+
+define(`_MRS_RELAY_', `')
--- cf/m4/proto.m4.orig 2020-07-02 16:45:12 UTC
+++ cf/m4/proto.m4
@@ -1373,6 +1373,9 @@ R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $:
R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2
R< error : $+ > $* $#error $: $1
R< local : $* > $* $>CanonLocal < $1 > $2
+ifdef(`_MRS_RELAY_',`dnl
+R< $={MRS} : $* > $* $@ $> $1 < $2 > $3
+dnl')
dnl it is $~[ instead of $- to avoid matches on IPv6 addresses
R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
--- cf/mailer/cyrusv2.m4.orig 2020-05-19 19:54:31 UTC
+++ cf/mailer/cyrusv2.m4
@@ -1,18 +1,30 @@
PUSHDIVERT(-1)
-#
-# Copyright (c) 2002 Proofpoint, 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.
-#
+dnl
+dnl Updates: http://anfi.webhop.org/sendmail/cyrusv2.html
+dnl
+dnl By using this file, you agree to the terms and conditions set
+dnl forth in the LICENSE file which can be found at the top level of
+dnl the sendmail distribution (sendmail-8.12).
+dnl
+dnl Original version contributed by Kenneth Murchison.
+dnl Version with cyrusv2d mailer added contributed by Andrzej Filip
+dnl
+dnl $Log: cyrusv2.m4,v $
+dnl Revision 8.3 2004/03/18 21:38:27 anfi
+dnl Changed comments prefixes to dnl to avoid m4 expansions
+dnl
+dnl Revision 8.2 2004/03/15 09:14:28 anfi
+dnl Added "Updates:" web link.
+dnl
-_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')')
+_DEFIFNOT(`CYRUS_LMTP_SOCKET',`/var/imap/socket/lmtp')
+_DEFIFNOT(`_DEF_CYRUSV2_MAILER_FLAGS', `lsDFMnqXz1')
+_DEFIFNOT(`_DEF_CYRUSV2D_MAILER_FLAGS', _DEF_CYRUSV2_MAILER_FLAGS)
+_DEFIFNOT(`CYRUSV2_MAILER_FLAGS', `mA@/:|')
+_DEFIFNOT(`CYRUSV2D_MAILER_FLAGS', `m')
+dnl
+ifdef(`CYRUSV2_MAILER_ARGS',, `define(`CYRUSV2_MAILER_ARGS', `FILE 'CYRUS_LMTP_SOCKET)')
+ifdef(`CYRUSV2D_MAILER_ARGS',, `define(`CYRUSV2D_MAILER_ARGS', _CYRUS_V2_MAILER_ARGS)')
define(`_CYRUSV2_QGRP', `ifelse(defn(`CYRUSV2_MAILER_QGRP'),`',`', ` Q=CYRUSV2_MAILER_QGRP,')')dnl
POPDIVERT
@@ -21,9 +33,13 @@ POPDIVERT
### Cyrus V2 Mailer specification ###
#########################################
-VERSIONID(`$Id: cyrusv2.m4,v 1.2 2013-11-22 20:51:14 ca Exp $')
+VERSIONID(`$Id: cyrusv2.m4,v 8.3 2004/03/18 21:38:27 anfi 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
+Mcyrusv2d, P=[IPC], F=_MODMF_(CONCAT(_DEF_CYRUSV2D_MAILER_FLAGS, CYRUSV2D_MAILER_FLAGS), `CYRUSV2D'),
+ S=EnvFromSMTP/HdrFromL, R=ifdef(`_ALL_MASQUERADE_', `EnvToSMTP/HdrFromSMTP', `EnvToSMTP'), 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
|