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