]> git.sur5r.net Git - openldap/blob - doc/man/man8/mail500.8
Move default slurpd directory to $(LOCALSTATEDIR)/openldap-slurp.
[openldap] / doc / man / man8 / mail500.8
1 .TH MAIL500 8C "22 September 1998" "OpenLDAP LDVERSION"
2 .\" $OpenLDAP$
3 .\" Copyright 1998-2000 The OpenLDAP Foundation All Rights Reserved.
4 .\" Copying restrictions apply.  See COPYRIGHT/LICENSE.
5 .SH NAME
6 mail500 \- X.500 capable mailer
7 .LP
8 fax500 \- X.500 capable fax delivery agent
9 .SH SYNOPSIS
10 .B LIBEXECDIR/mail500 [\-d level] [\-f mailfrom]
11 .B [\-h hostname] [\-l ldaphost]
12 .B [\-m address] [\-v vacationhost]
13 .LP
14 .B LIBEXECDIR/fax500 [\-d level] [\-f mailfrom]
15 .B [\-h hostname] [\-l ldaphost]
16 .B [\-m address]
17 .SH DESCRIPTION
18 .B mail500
19 is an LDAP/X.500-capable mailer, suitable to be invoked from a
20 mail delivery agent such as
21 .BR sendmail (8).
22 It supports mail to both individuals and groups.
23 .B fax500
24 is an LDAP/X.500-capable facsimile delivery agent.  It utilizes the
25 Internet remote-printing experiment (tpc.int).  For more
26 information on tpc.int, look in
27 .B /mrose/tpc
28 on
29 .BR ftp.ics.uci.edu ,
30 or send mail to
31 .BR tpc-faq@town.hall.org .
32 .SH OPTIONS
33 .RB \- d level
34 Turn on debugging as defined by
35 .I level.
36 This option directs
37 .B mail500/fax500
38 to produce various debugging output via the
39 .BR syslog (8)
40 facility at the LOG_ALERT level.
41 .TP
42 .BI \-f " mailfrom"
43 This option tells
44 .B mail500/fax500
45 what to set the envelop from address to when (re)invoking sendmail
46 to deliver mail.
47 .I mailfrom
48 should be a valid email address.  Normally, this option is passed
49 to
50 .B mail500/fax500
51 via the sendmail.cf(5) mailer definition, and is set
52 to something like the $f macro.
53 .TP
54 .BI \-l " ldaphost"
55 Specify an alternate host on which the LDAP server is running.
56 .TP
57 .BI \-m " address"
58 If
59 .I mail500/fax500
60 produces a rejection message, this is the
61 .I address
62 from which it will com.  Normally, this option is passed to
63 .I mail500/fax500
64 via the sendmail.cf(5) mailer definition, and is set to something
65 like $n@$w (typically, mailer-daemon@hostname).
66 .TP
67 .BI \-v " vacationhost"
68 If the vacation facility is operative, this option specifies the
69 host to which the mail of users who are on vacation should be sent.
70 .SH HOW MAIL500 AND FAX500 WORK
71 When mail500/fax500 gets invoked with one or more names to which to
72 deliver mail, it searches for each name in X.500.  Where it searches,
73 and what kind(s) of search(es) it does are compile-time configurable
74 by changing the
75 .B base
76 array in
77 .BR main.c .
78 For example, the configuration we use at U-M is like this:
79 .LP
80 .nf
81 Base    base[] =
82         { "ou=People, o=University of Michigan, c=US", 0
83                 "uid=%s", "cn=%s", NULL,
84           "ou=System Groups, ou=Groups, o=University of Michigan, c=US", 1
85                 "(&(cn=%s)(associatedDomain=%h))", NULL, NULL,
86           "ou=User Groups, ou=Groups, o=University of Michigan, c=US", 1
87                 "(&(cn=%s)(associatedDomain=%h))", NULL, NULL,
88           NULL
89         };
90 .fi
91 .LP
92 which means that in delivering mail to "name@umich.edu"
93 .B mail500/fax500would do the
94 the following searches, stopping if it finds a match at any step:
95 .LP
96 .nf
97 subtree search of "ou=People, o=University of Michigan, c=US"
98         for (uid=name)
99 subtree search of "ou=People, o=University of Michigan, c=US"
100         for (cn=name)
101 subtree search of "ou=System Groups, ou=Groups, o=University of Michigan, c=US"
102         for (&(cn=name)(associatedDomain=umich.edu))
103 subtree search of "ou=User Groups, ou=Groups, o=University of Michigan, c=US"
104         for (&(cn=name)(associatedDomain=umich.edu))
105 .fi
106 .LP
107 Notice that when specifying a filter %s is replaced by the name,
108 or user portion of the address while %h is replaced by whatever is
109 passed in to
110 .B mail500/fax500
111 via the
112 .RB \- h
113 option (typically the host portion of the address).
114 .LP
115 You can also specify whether you want search results that matched
116 because the entry's RDN matched the search to be given preference
117 or not.  At U-M, we only give such preference in the mail group
118 portion of the searches.  Beware with this option:  the algorithm
119 used to decide whether an entry's RDN matched the search is very
120 simple-minded, and may not always be correct.
121 .LP
122 There is currently no limit on the number of areas searched (the base
123 array can be as large as you want), and an arbitrary limit of 2 filters
124 for each base.  If you want more than that, simply changing the 3 in
125 the typedef for Base should do the trick.
126 .SH X.500 SUPPORT
127 In X.500, there are several new attribute types and one new object
128 class defined that
129 .B mail500/fax500
130 uses.  At its most basic, for normal
131 entries
132 .B mail500
133 will deliver to the value(s) listed in the
134 .B mail
135 attribute of the entry, and
136 .B fax500
137 will attempt to deliver a fax to the telephone number listed in the
138 .B facsimileTelephoneNumber
139 attribute.  For example, at U-M my entry has the attribute
140 .LP
141 .nf
142         mail= tim@terminator.rs.itd.umich.edu
143 .fi
144 .LP
145 So mail sent to tim@umich.edu will be delivered via
146 .B mail500
147 to that
148 address (assuming the
149 .BR sendmail.cf (5)
150 file is set up to call
151 .B mail500
152 for mail to somebody@umich.edu - see below).  If there were multiple
153 values for the mail attribute, multiple copies of the mail would be sent.
154 .LP
155 In the case of
156 .BR fax500 , if my entry has the attribute
157 .LP
158 .nf
159         facsimileTelephoneNumber= +1 313 764 5140
160 .fi
161 .LP
162 A message sent to tim@fax.umich.edu (assuming the sendmail.cf file
163 is set up to pass mail @fax.umich.edu to
164 .BR fax500 \-
165 see below)
166 will generate a message to
167 remote-printer.Timothy_A_Howes@0.4.1.5.4.6.7.3.1.3.1.tpc.int.
168 .LP
169 A new object class, rfc822MailGroup, and several new attributes have
170 been defined to handle email groups/mailing lists.  To use this, you
171 will need to add this to your local
172 .BR oidtable.oc :
173 .LP
174 .nf
175         # object class for representing rfc 822 mailgroups
176         rfc822MailGroup:        umichObjectClass.2 : \\
177                 top : \\
178                 cn : \\
179                 rfc822Mailbox, member, memberOfGroup, owner, \\
180                 errorsTo, rfc822ErrorsTo, requestsTo, rfc822RequestsTo, \\
181                 joinable, associatedDomain, \\
182                 description, multiLineDescription, \\
183                 userPassword, krbName, \\
184                 telecommunicationAttributeSet, postalAttributeSet
185 .fi
186 .LP
187 And you will need to add these to your local oidtable.at:
188 .LP
189 .nf
190         # attrs for rfc822mailgroups
191         multiLineDescription:   umichAttributeType.2    : CaseIgnoreList
192         rfc822ErrorsTo:         umichAttributeType.26   : CaseIgnoreIA5String
193         rfc822RequestsTo:       umichAttributeType.27   : CaseIgnoreIA5String
194         joinable:               umichAttributeType.28   : Boolean
195         memberOfGroup:          umichAttributeType.29   : DN
196         errorsTo:               umichAttributeType.30   : DN
197         requestsTo:             umichAttributeType.31   : DN
198 .fi
199 .LP
200 The idea was to define a kind of hybrid mail group that could handle
201 people who were in X.500 or not.  So, for example, members of a group
202 can be specified via the member attribute (for X.500 members) or the
203 rfc822MailBox attribute (for non-X.500 members).  Similarly for the
204 errorsTo and rfc822ErrorsTo, and the requestsTo and rfc822RequestsTo
205 attributes.
206 .LP
207 To create a real mailing list, with a list maintainer, all you have to
208 do is create an rfc822MailGroup and fill in the errorsTo or
209 rfc822ErrorsTo attributes (or both).  That will cause any errors
210 encountered when delivering mail to the group to go to the addresses
211 listed (or X.500 entry via it's mail attribute).
212 .LP
213 If you fill in the requestsTo or rfc822RequestsTo (or both) attributes,
214 mail sent to groupname-request will be sent to the addresses listed
215 there.  If you fill in the owner attribute, mail sent to
216 groupname-owner will be sent to the addresses listed there.  mail500
217 does this automatically, so you don't have to explicitly add the
218 groupname-request or groupname-owner aliases to your group.
219 .LP
220 To allow users to join a group, there is the joinable flag.  If TRUE,
221 mail500 will search for entries that have a memberOfGroup attribute
222 equal to the DN of the group, using the same algorithm it used to find
223 the group in the first place (i.e. the DNs and filters listed in the
224 base array).  This allows people to join (or subscribe to) a group
225 without having to modify the group entry directly.  If joinable is
226 FALSE, the search is not done.
227 .SH SENDMAIL CONFIGURATION
228 The idea is that you might have a rule like this in your sendmail.cf
229 file somewhere in rule set 0:
230 .LP
231 .nf
232         R$*<@umich.edu>$*       $#mail500$@umich.edu$:<$1>
233         R$*<@fax.umich.edu>$*   $#fax500$@fax.umich.edu$:<$1>
234 .fi
235 .LP
236 These rules say that any address that ends in @umich.edu will cause
237 the mail500 mailer to be called to deliver the mail, and any address
238 that ends in @fax.umich.edu will cause the fax500 mailer to
239 be called.  You probably
240 also want to do something to prevent addresses like terminator!tim@umich.edu
241 or tim%terminator.rs.itd.umich.edu@umich.edu from being passed to mail500.
242 At U-M, we do this by adding rules like this to rule set 9 where we
243 strip off our local names:
244 .LP
245 .nf
246         R<@umich.edu>$*:$*                 $>10<@>$1:$2
247         R$+%$+<@umich.edu>                 $>10$1%$2<@>
248         R$+!$+<@umich.edu>                 $>10$1!$2<@>
249 .fi
250 .LP
251 Of course, you would substitute your domain name for umich.edu in the
252 above examples.  See the sample sendmail.cf file in the ldap source
253 directory clients/mail500/ for more details.
254 .LP
255 The mail500 and fax500 mailers should be defined similar to this in the
256 sendmail.cf file:
257 .LP
258 .nf
259 Mmail500, P=LIBEXECDIR/mail500, F=DFMSmnXuh, A=mail500 -f $f -h $h -m $n@$w $u
260 Mfax500, P=LIBEXECDIR/fax500, F=DFMSmnXuh, A=fax500 -f $f -h $h -m $n@$w $u
261 .fi
262 .LP
263 This defines how mail500/fax500 will be treated by sendmail and what
264 arguments it will have when it's called.  The various flags specified
265 by the F=... parameter are explained in your local sendmail book (with
266 any luck).  The arguments to mail500/fax500 are as defined under OPTIONS
267 above.  The final argument $u is used to stand for the addresses to which
268 to deliver the mail.
269 .SH NOTES
270 The default values for several #defines that control how mail500 
271 and fax500 works are configured at compile time in the 
272 include/ldapconfig.h.edit include file.  You should edit this 
273 file to suit your site.
274 .SH BUGS
275 mail500/fax500 should use the ldap_getfilter(3) facility, instead of 
276 compiling in the search filters to use.  This is shameful.
277 .LP
278 The support for joinable groups (searching to find members who have
279 set something in their own entry) is really a hack because we did not
280 have good enough access control to allow people to add and delete
281 themselves from the group itself.
282 .LP
283 At one point, mail500 and fax500 were exactly the same binary, and
284 would behave appropriately based on how they were invoked.  Unfortunately,
285 several new features (e.g. vacation support) were added to mail500
286 but not to fax500.
287 .SH "SEE ALSO"
288 .BR ldap(3),
289 .BR sendmail.cf(5),
290 .BR sendmail(8),
291 .SH ACKNOWLEDGEMENTS
292 .B      OpenLDAP
293 is developed and maintained by The OpenLDAP Project (http://www.openldap.org/).
294 .B      OpenLDAP
295 is derived from University of Michigan LDAP 3.3 Release.