summaryrefslogtreecommitdiffstats
path: root/upstream/debian-bookworm/man1/maildrop.1
blob: 822dd5970f1e1fbf9ea295bc02124af23b1f5465 (plain)
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
'\" t
.\"<!-- Copyright 1998 - 2009 Double Precision, Inc.  See COPYING for -->
.\"<!-- distribution information. -->
.\"     Title: maildrop
.\"    Author: Sam Varshavchik
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
.\"      Date: 07/24/2017
.\"    Manual: Double Precision, Inc.
.\"    Source: Courier Mail Server
.\"  Language: English
.\"
.TH "MAILDROP" "1" "07/24/2017" "Courier Mail Server" "Double Precision, Inc\&."
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
maildrop \- mail delivery filter/agent
.SH "SYNOPSIS"
.HP \w'\fBmaildrop\fR\ 'u
\fBmaildrop\fR [option...] [\-d\ \fIuser\fR] [\fIarg\fR...]
.HP \w'\fBmaildrop\fR\ 'u
\fBmaildrop\fR [option...] [\fIfilename\fR] [\fIarg\fR...]
.SH "DESCRIPTION"
.PP
\fBmaildrop\fR
is a replacement local mail delivery agent that includes a mail filtering language\&. The system administrator can either replace the existing mail delivery agent with
\fBmaildrop\fR, or users may run
\fBmaildrop\fR
using the \*(Aqforward to program\*(Aq mechanism of the existing mail delivery agent\&.
.PP
\fBmaildrop\fR
first reads the E\-mail message on standard input\&. Trailing carriage return characters are automatically stripped\&. An E\-mail message consists of header lines, followed by a blank line, followed by the contents of the message\&.
.PP
\fBmaildrop\fR
does not accept an mbox\-style
From_
line before the first header line\&.
\fBmaildrop\fR
does not accept leading empty lines before the first non\-blank header line\&. If the message can possibly start with empty lines, and a
From_
line, use
\fBreformail \-f0\fR
to remove any initial empty lines, and replace a
From_
line with a proper
\(lqReturn\-Path:\(rq
header; then pipe it to
\fBmaildrop\fR\&.
.PP
If the file
/etc/maildroprc
exists, mail delivery or mail filtering instructions are read from that file\&.
\fBmaildrop\fR\*(Aqs delivery/filtering instructions may direct
\fBmaildrop\fR
to save the message in specific mailbox, discard it, return it to sender, or forward it to a different E\-mail address\&.
.PP
If
/etc/maildroprc
does not exist, or its mail delivery instructions do not completely dispose of this message,
\fBmaildrop\fR
then reads the mail delivery instructions from
$HOME/\&.mailfilter\&. If it doesn\*(Aqt exist, or its mail delivery instructions do not completely dispose of the message,
\fBmaildrop\fR
then saves the E\-mail message in the default mailbox\&.
.PP
\fBmaildrop\fR
knows how to deliver mail to an standard mailbox files; it also knows how to deliver to maildirs\&. A
maildir
is a directory\-based mail format used by the
\m[blue]\fBCourier\fR\m[]\&\s-2\u[1]\d\s+2
and
\m[blue]\fBQmail\fR\m[]\&\s-2\u[2]\d\s+2
mail servers\&. Many other mail servers also know how to read maildirs\&. When delivering to mailbox files,
\fBmaildrop\fR
will lock the mailbox for the duration of the delivery\&.
.PP
This is the general mail delivery behavior\&. There are minor differences in behavior depending on
\fBmaildrop\fR
delivery mode, which is determined based on how
\fBmaildrop\fR
was started\&.
\fBmaildrop\fR
uses three different primary operating modes:
.PP
Manual mode
.RS 4
A file containing filtering instructions \-
\fIfilename\fR
is specified as an argument to the
\fBmaildrop\fR
command\&.
\fBmaildrop\fR
reads this
\fIfilename\fR
(after
/etc/maildroprc) and follows the instructions in it\&. Unless the message is explicitly forwarded, bounced, deleted, or delivered to a specific mailbox, it will be delivered to the user\*(Aqs system mailbox\&.
.RE
.PP
Delivery mode
.RS 4
\fBmaildrop\fR
is the mail server\*(Aqs mail delivery agent\&.
\fBmaildrop\fR
runs in delivery mode when no
\fIfilename\fR
is specified on the command line\&.
\fBmaildrop\fR
changes the current directory to the user\*(Aqs home directory, then reads
/etc/maildroprc, then
$HOME/\&.mailfilter\&.
.RE
.PP
Embedded mode
.RS 4
\fBmaildrop\fR
functions as a part of another application\&. The embedded mode is used by the
\m[blue]\fBCourier\fR\m[]\&\s-2\u[1]\d\s+2
mail server to integrate mail filtering directly into the process of receiving mail from a remote mail relay, thus rejecting unwanted mail before it is even accepted for local mail delivery\&. Embedded mode is used when either the \-m, or the \-M, option is specified, and is described below\&. See below for a more extensive description of the embedded mode\&.
.RE
.SH "SECURITY"
.PP
It is safe to install
\fBmaildrop\fR
as a root setuid program\&.
\m[blue]\fBThe Courier mail server\fR\m[]\&\s-2\u[1]\d\s+2
installs
\fBmaildrop\fR
as a root setuid program by default, in order to be able to use
\fBmaildrop\fR
in embedded mode\&. If root runs
\fBmaildrop\fR
(or it is setuided to root) the
\fB\-d\fR
option may be used to specify the message\*(Aqs recipient\&.
\fBmaildrop\fR
immediately resets its userid to the one specified by the
\fB\-d\fR
option\&. The user\*(Aqs
$HOME/\&.mailfilter
is read (if it exists), and the message is delivered to the indicated user\&.
.PP
The system administrator can configure
\fBmaildrop\fR
to restrict the
\fB\-d\fR
option for everyone except the mail system itself\&.
.PP
If in delivery mode the user\*(Aqs home directory has the sticky bit set,
\fBmaildrop\fR
immediately terminates with an exit code of
\fBEX_TEMPFAIL\fR, without doing anything\&. Mail servers interpret the
\fBEX_TEMPFAIL\fR
exit code as a request to reschedule the message for another delivery attempt later\&. Setting the sticky bit allows
$HOME/\&.mailfilter
to be edited while temporarily holding all incoming mail\&.
.PP
\fBmaildrop\fR
also terminates with
\fBEX_TEMPFAIL\fR
if the user\*(Aqs home directory has world write permissions\&.
.PP
\fBmaildrop\fR
immediately terminates with
\fBEX_TEMPFAIL\fR
if the
filename
is not owned by the user, or if it has any group or world permissions\&. This includes read permissions\&. The permissions on
$HOME/\&.mailfilter
may only include read and write privileges to the user\&.
.PP
When using the special embedded mode (see below)
\fBmaildrop\fR
immediately terminates with the exit code set to
\fBEX_TEMPFAIL\fR
if
$HOME/\&.mailfilters
is not owned by the user, or if it has any group or world permissions\&.
.SH "TEMPORARY FILES"
.PP
\fBmaildrop\fR
is heavily optimized and tries to use as little resources as possible\&.
\fBmaildrop\fR
reads small messages into memory, then filters and/or delivers the message directly from memory\&. For larger messages,
\fBmaildrop\fR
accesses the message directly from the file\&. If the standard input is not a file,
\fBmaildrop\fR
writes the message to a temporary file, then accesses the message from the temporary file\&. The temporary file is automatically removed when the message is delivered\&.
.SH "OPTIONS"
.PP
\-a
.RS 4
Makes the
Courier
Authentication Library usage mandatory, i\&.e\&. maildrop will throw a temporary error code if the call to the authlib mechanism fails for some reason, such as authdaemon being inaccessible\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
This setting may already be the default, depending on maildrop\*(Aqs configuration\&.
.sp .5v
.RE
.RE
.PP
\-A "\fIHeader: value\fR"
.RS 4
Adds an additional header to the message\&. Specifying
\fI\-A "Foo: Bar"\fR
effectively adds this header to the message being delivered\&.
.sp
The mail transport agent usually adds additional headers when delivering a message to a local mailbox\&. The way it\*(Aqs usually done is by the mail transport agent sending the message using a pipe to the local delivery agent \- such as
\fBmaildrop\fR
\- and adding some additional headers in the process\&. Because
\fBmaildrop\fR
receives the message from a pipe,
\fBmaildrop\fR
must either save the message in memory or write the message into a temporary file\&.
.sp
The
\fB\-A\fR
option enables the file containing the message to be provided to
\fBmaildrop\fR
directly, as standard input, and the additional headers specified on the command line\&. Because the standard input is a file,
\fBmaildrop\fR
will not need a temporary file\&. Multiple
\fB\-A\fR
options may be specified\&.
.RE
.PP
\-d \fIuser\fR
.RS 4
Run
\fBmaildrop\fR
in delivery mode for this user ID\&.
.sp
The system administrator may optionally restrict the
\fB\-d\fR
option to be available to the mail system only, so it may not be available to you\&. In all cases, the
\fB\-d\fR
option is allowed if
\fIuser\fR
is the same user who is running
\fBmaildrop\fR\&. Also, for the
\fB\-d\fR
option to work at all,
\fBmaildrop\fR
must be executed by root, or
\fBmaildrop\fR
must be a root\-owned program with the setuid bit set\&. Absence of a
filename
on
\fBmaildrop\fR\*(Aqs command line implies the
\fB\-d\fR
option for the user running
\fBmaildrop\fR\&.
.sp
If
\fB\-d\fR
is not specified, the first argument following all the options is a name of the file containing filtering instructions\&. The remaining arguments, if any, are assigned to the variables
\fI$1\fR,
\fI$2\fR, and so on (see
\m[blue]\fB"Environment"\fR\m[]\&\s-2\u[3]\d\s+2
and
\m[blue]\fB"Variable substitution"\fR\m[]\&\s-2\u[4]\d\s+2)\&.
.RE
.PP
\-f \fIaddress\fR
.RS 4
Sets the FROM variable (message envelope sender) to
\fIaddress\fR\&. The system administrator may optionally disable the
\fB\-f\fR
option for users, so it may not be available to you\&.
.RE
.PP
\-m
.RS 4
Run
\fBmaildrop\fR
in embedded mode\&. It\*(Aqs possible to use both the
\fB\-m\fR, and the
\fB\-d\fR
options, but it doesn\*(Aqt make much sense to do so\&. Even if you really wanted to run your message through someone else\*(Aqs
\&.mailfilter, that
\&.mailfilter
probably has at least one instruction which is not allowed in the embedded mode\&.
.sp
The
filename
argument to
\fBmaildrop\fR
should be specified\&.
filename
is a file that includes filtering instructions to be processed in embedded mode\&. The
\-m
option is used for debugging filter files which are later placed in
$HOME/\&.mailfilters, and used with the
\fB\-M\fR
option\&.
.RE
.PP
\-M \fIfilterfile\fR
.RS 4
Run
\fBmaildrop\fR
in a special embedded mode\&. The
\fB\-d\fR
option is implied when
\fB\-M\fR
is used, and if absent it defaults to the userid running
\fBmaildrop\fR\&.
.sp
All the requirements for the
\fB\-d\fR
option apply\&.
\fBmaildrop\fR
must either be executed by root, or the
\fBmaildrop\fR
program must be owned by root with the setuid bit set\&.
\fBmaildrop\fR
immediately gives up root privileges by changing its user ID to the one specified by
\fB\-d\fR, then reads
$HOME/\&.mailfilters/\fIfilterfile\fR\&. For security reasons the name of the file may not begin with a slash or include periods\&.
\fBmaildrop\fR
is very paranoid: both
$HOME/\&.mailfilters, and
$HOME/\&.mailfilters/\fIfilterfile\fR
must be owned by the user, and may not have any group or world permissions\&.
.sp
The
\fB\-M\fR
option allows for some friendly cooperation between the user running the application, and the user who provides a filter for the embedded mode\&. The user running the application can use someone else\*(Aqs canned filter and be assured that the filter is not going to run amok and start sending mail or create files all over the place\&. The user who provides the filter can be assured that the environment variables are clean, and that there are no surprises\&.
.sp
\fBmaildrop\fR
supports the concept of "default" filter files\&. If the file specified by the
\fB\-M\fR
option cannot be found in
$HOME/\&.mailfilters,
\fBmaildrop\fR
will try to open
$HOME/\&.mailfilters/\fIfilterfileprefix\fR\-default\&.
\fIfilterfileprefix\fR
is the initial part of
\fIfilterfile\fR
up until the last \*(Aq\-\*(Aq character in
\fIfilterfile\fR\&.
.sp
If
$HOME/\&.mailfilters/\fIfilterfileprefix\fR\-default
does not exist, and there are any other dashes left in
\fIfilterfileprefix\fR, maildrop removes the last dash and everything following it, then tries again\&.
.sp
As a last resort
\fBmaildrop\fR
tries to open
$HOME/\&.mailfilters/default\&.
.sp
For example, if the parameter to the
\fB\-M\fR
option is
\fImailfilter\-lists\-maildrop\fR,
\fBmaildrop\fR
will try to open the following files, in order:
.sp .if n \{\ .RS 4 .\} .nf $HOME/\&.mailfilters/mailfilter\-lists\-maildrop $HOME/\&.mailfilters/mailfilter\-lists\-maildrop\-default $HOME/\&.mailfilters/mailfilter\-lists\-default $HOME/\&.mailfilters/mailfilter\-default $HOME/\&.mailfilters/default .fi .if n \{\ .RE .\}
.sp
Note that
\fBmaildrop\fR
looks for \-default files ONLY if
\fB\-M\fR
is used\&.
.RE
.PP
\-D \fIuuu/ggg\fR
.RS 4
This option is reserved for use by the version of
\fBmaildrop\fR
that comes integrated with the
\m[blue]\fBCourier mail server\fR\m[]\&\s-2\u[1]\d\s+2\&.
.RE
.PP
\-V \fIlevel\fR
.RS 4
Initialize the
\fIVERBOSE\fR
variable to
\fIlevel\fR\&. Because
\fBmaildrop\fR
parses the entire file before running it, this option is used to produce debugging output in the parsing phase\&. Otherwise, if
filename
has syntax errors, then no debugging output is possible because the
\fIVERBOSE\fR
variable is not yet set\&.
.sp
\fB\-V\fR
is ignored when
\fBmaildrop\fR
runs in delivery mode\&.
.RE
.PP
\-w \fIN\fR
.RS 4
The
\fB\-w N\fR
option places a warning message into the maildir if the maildir has a quota setting, and after the message was successfully delivered the maildir was at least
\fIN\fR
percent full\&.
.RE
.PP
\-W \fIfilename\fR
.RS 4
Copy the warning message from
\fIfilename\fR, or from
/etc/quotawarnmsg
if this option is not specified, with the addition of the "Date:" and "Message\-Id:" headers\&. The warning is repeated every 24 hours (at least), until the maildir drops below
\fIN\fR
percent full\&.
.RE
.PP
\-t \fIsocket\fR
.RS 4
This option is available if maildrop is compiled with optional Dovecot authentication support\&.
\fIsocket\fR
specifies the location of Dovecot master authentication socket, for example
/var/run/dovecot/auth\-master\&.
.RE
.SH "DELIVERY MODE"
.PP
If a
filename
is not specified on the command line, or if the
\fB\-d\fR
option is used,
\fBmaildrop\fR
will run in delivery mode\&. In delivery mode,
\fBmaildrop\fR
changes to the home directory of the user specified by the
\fB\-d\fR
option (or the user who is running
\fBmaildrop\fR
if the
\fB\-d\fR
option was not given) and reads
$HOME/\&.mailfilter
for filtering instructions\&.
$HOME/\&.mailfilter
must be owned by the user, and have no group or global permissions (\fBmaildrop\fR
terminates if it does)\&.
.PP
If
$HOME/\&.mailfilter
does not exist,
\fBmaildrop\fR
will simply deliver the message to the user\*(Aqs mailbox\&.
.PP
If the file
/etc/maildroprc
exists,
\fBmaildrop\fR
reads filtering instructions from this file first, before reading
$HOME/\&.mailfilter\&. This allows the system administrator to provide global filtering instructions for all users\&.
.if n \{\
.sp
.\}
.RS 4
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.ps +1
\fBNote\fR
.ps -1
.br
.PP
/etc/maildroprc
is read only in delivery mode\&.
.sp .5v
.RE
.SH "VIRTUAL ACCOUNTS"
.PP
The
\fB\-d\fR
option can also specify a name of a virtual account or mailbox\&. See the
\fBmakeuserdb\fR(1)
manual page in the
Courier
Authentication library\*(Aqs documentation for more information\&.
.SH "EMBEDDED MODE"
.PP
The embedded mode is used when
\fBmaildrop\fR\*(Aqs filtering abilities are desired, but no actual mail delivery is needed\&. In embedded mode
\fBmaildrop\fR
is executed by another application, and
\m[blue]\fBis passed the \(hym or the \(hyM option\&.\fR\m[]\&\s-2\u[5]\d\s+2
\fBmaildrop\fR
reads the message, then runs the filtering rules specified in
filename\&.
.PP
filename
may contain any filtering instructions EXCEPT the following:
.PP
` \&.\&.\&. `
.RS 4
Text strings delimited by back\-tick characters (run shell command) are not allowed\&.
.RE
.PP
\m[blue]\fBcc\fR\m[]\&\s-2\u[6]\d\s+2
.RS 4
The
\fBcc\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBdotlock\fR\m[]\&\s-2\u[7]\d\s+2
.RS 4
The
\fBdotlock\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBflock\fR\m[]\&\s-2\u[8]\d\s+2
.RS 4
The
\fBflock\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBgdbmopen\fR\m[]\&\s-2\u[9]\d\s+2
.RS 4
In embedded mode, GDBM databases may be opened only for reading\&.
.RE
.PP
\m[blue]\fBlog\fR\m[]\&\s-2\u[10]\d\s+2
.RS 4
The
\fBlog\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBlogfile\fR\m[]\&\s-2\u[10]\d\s+2
.RS 4
The
\fBlogfile\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBsystem\fR\m[]\&\s-2\u[11]\d\s+2
.RS 4
The
\fBsystem\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBto\fR\m[]\&\s-2\u[12]\d\s+2
.RS 4
The
\fBto\fR
command is not allowed in embedded mode\&.
.RE
.PP
\m[blue]\fBxfilter\fR\m[]\&\s-2\u[13]\d\s+2
.RS 4
The
\fBxfilter\fR
command is not allowed in embedded mode\&.
.RE
.PP
Normally when the
filename
does not explicitly delivers a message,
\fBmaildrop\fR
will deliver the message to the user\*(Aqs default mailbox\&. This is also disabled in embedded mode\&.
.PP
The
filename
may communicate with the parent application by using the
\m[blue]\fBecho\fR\m[]\&\s-2\u[14]\d\s+2
statement and the
\fIEXITCODE\fR
environment variable\&.
.SS "/etc/maildroprcs"
.PP
If
\fBmaildrop\fR
encounters an
\m[blue]\fBinclude\fR\m[]\&\s-2\u[15]\d\s+2
statement where the filename starts with
/etc/maildroprcs/, the normal restrictions for the embedded mode are suspended while executing the filter file in the
/etc/maildroprcs
directory\&. The restrictions are also suspended for any additional filter files that are included from
/etc/maildroprcs\&. The restrictions resume once
\fBmaildrop\fR
finishes executing the file from
/etc/maildroprcs\&.
.PP
This allows the system administrator to have a controlled environment for running external commands (via the backticks, the
\m[blue]\fBsystem\fR\m[]\&\s-2\u[11]\d\s+2
or the
\m[blue]\fBxfilter\fR\m[]\&\s-2\u[13]\d\s+2
commands)\&.
.PP
The name of the file may not contain any periods (so that a creative individual can\*(Aqt write
\fIinclude "/etc/maildroprcs/\&.\&./\&.\&./home/user/recipe"\fR)\&.
.PP
Before executing the commands in the
/etc/maildroprcs
file,
\fBmaildrop\fR
automatically resets the following variables to their initial values:
\fIDEFAULT\fR,
\fIHOME\fR,
\fILOCKEXT\fR,
\fILOCKSLEEP\fR,
\fILOCKTIMEOUT\fR,
\fILOCKREFRESH\fR,
\fILOGNAME\fR,
\fIPATH\fR,
\fISENDMAIL\fR, and
\fISHELL\fR\&. Please note that the previous values of these variables (if they were changed) will NOT be restored once
\fBmaildrop\fR
finishes executing the commands from
/etc/maildroprcs\&.
.SH "WATCHDOG TIMER"
.PP
\fBmaildrop\fR
has a watchdog timer that attempts to abort runaway filtering\&. If filtering is not complete within a predefined time interval (defined by the system administrator, usually five minutes),
\fBmaildrop\fR
terminates\&.
.SH "FILES"
.PP
/etc/passwd
.RS 4
Sets user\*(Aqs home directory, and related variables\&. If NIS/YP is install, that will be used as well\&.
.RE
.PP
/etc/maildroprc
.RS 4
Global filtering instructions for delivery mode\&.
.RE
.PP
/var/mail
.RS 4
System mailbox (actual directory defined by the system administrator)\&.
.RE
.PP
/usr/sbin/sendmail
.RS 4
Program to forward mail (exact program defined by the system administrator)\&.
.RE
.PP
$HOME/\&.mailfilter
.RS 4
Filtering instructions in delivery mode\&.
.RE
.PP
$HOME/\&.mailfilters
.RS 4
Directory containing files used in special embedded mode\&.
.RE
.SH "SEE ALSO"
.PP
\m[blue]\fB\fBlockmail\fR(1)\fR\m[]\&\s-2\u[16]\d\s+2,
\m[blue]\fB\fBmaildropfilter\fR(7)\fR\m[]\&\s-2\u[17]\d\s+2,
\m[blue]\fB\fBmakedat\fR(1)\fR\m[]\&\s-2\u[18]\d\s+2,
\m[blue]\fB\fBmaildropgdbm\fR(7)\fR\m[]\&\s-2\u[9]\d\s+2,
\m[blue]\fB\fBmaildropex\fR(7)\fR\m[]\&\s-2\u[19]\d\s+2,
\m[blue]\fB\fBreformail\fR(1)\fR\m[]\&\s-2\u[20]\d\s+2,
\m[blue]\fB\fBmakemime\fR(1)\fR\m[]\&\s-2\u[21]\d\s+2,
\m[blue]\fB\fBreformime\fR(1)\fR\m[]\&\s-2\u[22]\d\s+2,
\fBegrep\fR(1),
\fBgrep\fR(1), ,
\m[blue]\fB\fBcourier\fR(8)\fR\m[]\&\s-2\u[23]\d\s+2,
\fBsendmail\fR(8),
\m[blue]\fBhttp://www\&.qmail\&.org\fR\m[]\&.
.SH "AUTHOR"
.PP
\fBSam Varshavchik\fR
.RS 4
Author
.RE
.SH "NOTES"
.IP " 1." 4
Courier
.RS 4
\%http://www.courier-mta.org
.RE
.IP " 2." 4
Qmail
.RS 4
\%http://www.qmail.org
.RE
.IP " 3." 4
"Environment"
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#environment
.RE
.IP " 4." 4
"Variable substitution"
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#varsubst
.RE
.IP " 5." 4
is passed the \(hym or the \(hyM option.
.RS 4
\%http://www.courier-mta.org/maildrop/#options
.RE
.IP " 6." 4
cc
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#cc
.RE
.IP " 7." 4
dotlock
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#dotlock
.RE
.IP " 8." 4
flock
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#flock
.RE
.IP " 9." 4
gdbmopen
.RS 4
\%http://www.courier-mta.org/maildrop/maildropgdbm.html
.RE
.IP "10." 4
log
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#log
.RE
.IP "11." 4
system
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#system
.RE
.IP "12." 4
to
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#to
.RE
.IP "13." 4
xfilter
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#xfilter
.RE
.IP "14." 4
echo
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#echo
.RE
.IP "15." 4
include
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html#include
.RE
.IP "16." 4
\fBlockmail\fR(1)
.RS 4
\%http://www.courier-mta.org/maildrop/lockmail.html
.RE
.IP "17." 4
\fBmaildropfilter\fR(7)
.RS 4
\%http://www.courier-mta.org/maildrop/maildropfilter.html
.RE
.IP "18." 4
\fBmakedat\fR(1)
.RS 4
\%http://www.courier-mta.org/maildrop/makedat.html
.RE
.IP "19." 4
\fBmaildropex\fR(7)
.RS 4
\%http://www.courier-mta.org/maildrop/maildropex.html
.RE
.IP "20." 4
\fBreformail\fR(1)
.RS 4
\%http://www.courier-mta.org/maildrop/reformail.html
.RE
.IP "21." 4
\fBmakemime\fR(1)
.RS 4
\%http://www.courier-mta.org/maildrop/makemime.html
.RE
.IP "22." 4
\fBreformime\fR(1)
.RS 4
\%http://www.courier-mta.org/maildrop/reformime.html
.RE
.IP "23." 4
\fBcourier\fR(8)
.RS 4
\%http://www.courier-mta.org/maildrop/courier.html
.RE