1Please read the README file in this directory first. 2.ex 3.Id $Id: procmail.man,v 1.91 2001/08/27 08:44:04 guenther Exp $ 4.TH PROCMAIL 1 \*(Dt BuGless 5.na 6.SH NAME 7procmail \- autonomous mail processor 8.SH SYNOPSIS 9.B procmail 10.RB [ \-@PRESERVOPT@@TEMPFAILOPT@@OVERRIDEOPT@@BERKELEYOPT@ ] 11.RB [ "\-@FROMWHOPT@ \fIfromwhom\fP" ] 12.if n .ti +0.5i 13.RI [ "parameter\fB=\fPvalue " | " rcfile" ] 14\&.\|.\|. 15.br 16.B procmail 17.RB [ \-@TEMPFAILOPT@@OVERRIDEOPT@@BERKELEYOPT@ ] 18.RB [ "\-@FROMWHOPT@ \fIfromwhom\fP" ] 19.RB [ "\-@ARGUMENTOPT@ \fIargument\fP" ] 20\&.\|.\|. 21.if n .ti +0.5i 22.B \-@DELIVEROPT@ 23.I recipient 24\&.\|.\|. 25.br 26.B procmail 27.RB [ \-@PRESERVOPT@@TEMPFAILOPT@@BERKELEYOPT@ ] 28.B \-@MAILFILTOPT@ 29.RI [ "parameter\fB=\fPvalue" ] 30\&.\|.\|. 31.I rcfile 32.if n .ti +0.5i 33.RI [ argument ] 34\&.\|.\|.@LMTPusage@.br 35.B procmail 36.B \-@VERSIONOPT@ 37.ad 38.SH DESCRIPTION 39For a quick start, see 40.B NOTES 41at the end. 42.PP 43.B Procmail 44should be invoked automatically over the 45.B @DOT_FORWARD@ 46file mechanism as soon as mail arrives. Alternatively, when installed by 47a system administrator, it can be invoked from within the mailer immediately. 48When invoked, it first sets some environment variables to default values, 49reads the mail message from stdin until an EOF, separates the body from the 50header, and then, if no command line arguments are present, it starts to look 51for a file named 52.BR @PROCMAILRC@ . 53According to the processing recipes in this file, 54the mail message that just arrived gets distributed into the right folder 55(and more). If no rcfile is found, or processing of the rcfile falls off 56the end, procmail will store the mail in the default system 57mailbox.@ETCRC_desc@ 58.PP 59If running suid root or with root privileges, procmail will be able to 60perform as a functionally enhanced, backwards compatible mail delivery agent. 61.PP 62Procmail can also be used as a general purpose mail filter, i.e., provisions 63have been made to enable procmail to be invoked in a special sendmail rule. 64.PP 65The rcfile format is described in detail in the 66.BR procmailrc (5) 67man page. 68.PP 69The weighted scoring technique is described in detail in the 70.BR procmailsc (5) 71man page. 72.PP 73Examples for rcfile recipes can be looked up in the 74.BR procmailex (5) 75man page. 76.SS Signals 77.TP 1.2i 78.B TERMINATE 79Terminate prematurely and requeue the mail. 80.TP 81.B HANGUP 82Terminate prematurely and bounce the mail. 83.TP 84.B INTERRUPT 85Terminate prematurely and bounce the mail. 86.TP 87.B QUIT 88Terminate prematurely and silently lose the mail. 89.TP 90.B ALARM 91Force a timeout (see 92.BR TIMEOUT). 93.TP 94.B USR1 95Equivalent to a 96.BR VERBOSE =off. 97.TP 98.B USR2 99Equivalent to a 100.BR VERBOSE =on. 101.SH OPTIONS 102.TP 0.5i 103.B \-@VERSIONOPT@ 104Procmail will print its version number, display its compile time 105configuration and exit. 106.TP 107.B \-@PRESERVOPT@ 108Preserve any old environment. Normally procmail clears the environment 109upon startup@KEEPENV@. However, in any case: any default values will override 110any preexisting environment variables, i.e., procmail will not pay any attention 111to any predefined environment variables, it will happily overwrite them 112with its own defaults. For the list of environment variables that procmail 113will preset see the 114.BR procmailrc (5) 115man page. If both \-@PRESERVOPT@ and \-@MAILFILTOPT@ are specified, the 116list of preset environment variables shrinks to just: LOGNAME, HOME, SHELL, 117ORGMAIL and MAILDIR. 118.TP 119.B \-@TEMPFAILOPT@ 120Make procmail fail softly, i.e., if procmail cannot deliver the mail to 121any of the destinations you gave, the mail will not bounce, but will return 122to the mailqueue. Another delivery-attempt will be made at some time in 123the future. 124.TP 125.I "\fB\-@FROMWHOPT@\fP fromwhom" 126Causes procmail to regenerate the leading `@FROM@' line with 127.I fromwhom 128as the sender (instead of \-@FROMWHOPT@ one could use the alternate and 129obsolete \-@ALTFROMWHOPT@). If 130.I fromwhom 131consists merely of a single `@REFRESH_TIME@', then procmail will only 132update the timestamp on the `@FROM@' line (if present, if not, it will 133generate a new one). 134.TP 135.B \-@OVERRIDEOPT@ 136Instead of allowing anyone to generate `@FROM@' lines, simply override 137the fakes. 138.TP 139.B \-@BERKELEYOPT@ 140Assume traditional Berkeley mailbox format, ignore any 141.B Content-Length: 142fields. 143.TP 144.I "\fB\-@ARGUMENTOPT@\fP argument" 145This will set $1 to be equal to 146.IR argument . 147Each succeeding 148.I "\fB\-@ARGUMENTOPT@\fP argument" 149will set the next number variable ($2, $3, etc). It can be used 150to pass meta information along to procmail. This is typically done 151by passing along the $@x information from the sendmail mailer rule. 152.TP 153.I "\fB\-@DELIVEROPT@\fP recipient .\|.\|." 154This turns on explicit delivery mode, delivery will be to the local user 155.IR recipient . 156This, of course, only is possible if procmail has root 157privileges@SETRUID@. 158Procmail will setuid to the intended recipients and delivers the mail as 159if it were invoked by the recipient with no arguments (i.e., if no rcfile 160is found, delivery is like ordinary mail). This option is incompatible with 161.BR \-@PRESERVOPT@ . 162.TP 163.B \-@MAILFILTOPT@ 164Turns procmail into a general purpose mail filter. In this mode one rcfile 165must be specified on the command line. After the rcfile, procmail will 166accept an unlimited number of arguments.@ETCRCS_desc@ 167For some advanced usage of this option you should look in the 168.B EXAMPLES 169section below.@LMTPOPTdesc@.SH ARGUMENTS 170Any arguments containing an '=' are considered to be environment variable 171assignments, they will 172.I all 173be evaluated after the default values have been 174assigned and before the first rcfile is opened. 175.PP 176Any other arguments are presumed to be rcfile paths (either absolute, 177or if they start with `@chCURDIR@@MCDIRSEP@' relative to the current 178directory; 179.B any other relative 180path is relative to $HOME, unless the 181.B \-@MAILFILTOPT@ 182option has been given, in which case all relative paths are relative to the 183current directory); procmail will start with the first one it finds on the 184command line. The following ones will only be parsed if the preceding ones 185have a not matching HOST-directive entry, or in case they should not exist. 186.PP 187If no rcfiles are specified, it looks for 188.BR @PROCMAILRC@ . 189If not even that can be found, processing will continue according to 190the default settings of the environment variables and the ones specified 191on the command line. 192.SH EXAMPLES 193Examples for rcfile recipes can be looked up in the 194.BR procmailex (5) 195man page. 196A small sample rcfile can be found in the 197.B NOTES 198section below. 199.PP 200Skip the rest of this EXAMPLES section unless you are a system administrator 201who is vaguely familiar with sendmail.cf syntax. 202.PP 203The 204.B \-@MAILFILTOPT@ 205option is typically used when procmail is called from within a rule in the 206sendmail.cf file. In order to be able to do this it is convenient to create 207an extra `procmail' mailer in your sendmail.cf file (in addition to the perhaps 208already present `local' mailer that starts up procmail). To create such a 209`procmail' mailer I'd suggest something like: 210.Sx 2 211Mprocmail, P=@BINDIR@/procmail, F=mSDFMhun, S=11, R=21, 212 A=procmail \-@MAILFILTOPT@ $h $g $u 213.Ex 214This enables you to use rules like the following (most likely in ruleset 0) 215to filter mail through the procmail mailer (please note the leading tab 216to continue the rule, and the tab to separate the comments): 217.Sx 4 218R$*<@some.where>$* 219 $#procmail $@/etc/procmailrcs/some.rc $:$1@some.where.procmail$2 220R$*<@$*.procmail>$* 221 $1<@$2>$3 Already filtered, map back 222.Ex 223And /etc/procmailrcs/some.rc could be as simple as: 224.Sx 9 225SENDER = "<$1>" # fix for empty sender addresses 226SHIFT = 1 # remove it from $@ 227 228:0 # sink all junk mail 229* ^Subject:.*junk 230/dev/null 231 232:0 w # pass along all other mail 233! \-oi \-f "$SENDER" "$@" 234.Ex 235Do watch out when sending mail from within the /etc/procmailrcs/some.rc file, 236if you send mail to addresses which match the first rule again, you could 237be creating an endless mail loop. 238.SH FILES 239.TP 2.3i 240.B /etc/passwd 241to set the recipient's LOGNAME, HOME and SHELL variable defaults 242.TP 243.B @MAILSPOOLDIR@$LOGNAME 244system mailbox; both the system mailbox and the immediate directory 245it is in will be created every time procmail starts and either one is 246not present@ETCRC_files@@ETCRCS_files@ 247.TP 248.B @PROCMAILRC@ 249default rcfile 250.TP 251.B @MAILSPOOLDIR@$LOGNAME@DEFlockext@ 252lockfile for the system mailbox (not automatically used by procmail, unless 253$DEFAULT equals @MAILSPOOLDIR@$LOGNAME and procmail is delivering to $DEFAULT) 254.TP 255.B @DEFsendmail@ 256default mail forwarder 257.TP 258.B @UNIQ_PREFIX@????`hostname` 259temporary `unique' zero-length files created by procmail 260.SH "SEE ALSO" 261.na 262.nh 263.BR procmailrc (5), 264.BR procmailsc (5), 265.BR procmailex (5), 266.BR sh (1), 267.BR csh (1), 268.BR mail (1), 269.BR mailx (1), 270.BR binmail (1), 271.BR uucp (1), 272.BR aliases (5), 273.BR sendmail (8), 274.BR egrep (1), 275.BR grep (1), 276.BR biff (1), 277.BR comsat (8), 278.BR lockfile (1), 279.BR formail (1), 280.BR cron (1) 281.hy 282.ad 283.SH DIAGNOSTICS 284.TP 2.3i 285Autoforwarding mailbox found 286The system mailbox had its suid or sgid bit set, procmail terminates with 287EX_NOUSER assuming that this mailbox must not be delivered to. 288.TP 289Bad substitution of "x" 290Not a valid environment variable name specified. 291.TP 292Closing brace unexpected 293There was no corresponding opening brace (nesting block). 294.TP 295Conflicting options 296Not all option combinations are useful 297.TP 298Conflicting x suppressed 299Flag x is not compatible with some other flag on this recipe. 300.TP 301Couldn't create "x" 302The system mailbox was missing and could not/will not be created. 303.TP 304Couldn't create maildir part "x" 305The maildir folder "x" is missing one or more required subdirectories and 306procmail could not create them. 307.TP 308Couldn't create or rename temp file "x" 309An error occurred in the mechanics of delivering to the directory folder "x". 310.TP 311Couldn't determine implicit lockfile from "x" 312There were no `>>' redirectors to be found, using simply `$LOCKEXT' as 313locallockfile. 314.TP 315Couldn't read "x" 316Procmail was unable to open an rcfile or it was not a regular file, or 317procmail couldn't open an MH directory to find the highest numbered file. 318.TP 319Couldn't unlock "x" 320Lockfile was already gone, or write permission to the directory where the 321lockfile is has been denied. 322.TP 323Deadlock attempted on "x" 324The locallockfile specified on this recipe is equal to a still active 325$LOCKFILE.@ETCRCS_error@ 326.TP 327Descriptor "x" was not open 328As procmail was started, stdin, stdout or stderr was not connected (possibly 329an attempt to subvert security) 330.TP 331Enforcing stricter permissions on "x" 332The system mailbox of the recipient was found to be unsecured, procmail 333secured it. 334.TP 335Error while writing to "x" 336Nonexistent subdirectory, no write permission, pipe died or disk full. 337.TP 338Exceeded LINEBUF 339Buffer overflow detected, LINEBUF was too small, PROCMAIL_OVERFLOW has 340been set. 341.TP 342MAILDIR is not an absolute path 343.TP 344MAILDIR path too long 345.TP 346ORGMAIL is not an absolute path 347.TP 348ORGMAIL path too long 349.TP 350default rcfile is not an absolute path 351.TP 352default rcfile path too long 353The specified item's full path, when expanded, was longer than LINEBUF 354or didn't start with a file separator. 355.TP 356Excessive output quenched from "x" 357The program or filter "x" tried to produce too much output for the current 358LINEBUF, the rest was discarded and PROCMAIL_OVERFLOW has been set. 359.TP 360Extraneous x ignored 361The action line or other flags on this recipe makes flag x meaningless. 362.TP 363Failed forking "x" 364Process table is full (and NORESRETRY has been exhausted). 365.TP 366Failed to execute "x" 367Program not in path, or not executable. 368.TP 369Forced unlock denied on "x" 370No write permission in the directory where 371.B lockfile 372"x" resides, or more than one procmail trying to force a lock at exactly the 373same time. 374.TP 375Forcing lock on "x" 376.B Lockfile 377"x" is going to be removed by force because of a timeout (see also: 378.BR LOCKTIMEOUT ). 379.TP 380Incomplete recipe 381The start of a recipe was found, but it stranded in an EOF. 382.TP 383Insufficient privileges 384Procmail either needs root privileges, or must have the 385right (e)uid 386.B and 387(e)gid to run in delivery mode. The mail will bounce. 388.TP 389Invalid regexp "x" 390The regular expression "x" contains errors (most likely some missing or 391extraneous parens). 392.TP 393Kernel-lock failed 394While trying to use the kernel-supported locking calls, one of them failed 395(usually indicates an OS error), procmail ignores this error and proceeds. 396.TP 397Kernel-unlock failed 398See above. 399.TP 400Lock failure on "x" 401Can only occur if you specify some real weird (and illegal) lockfilenames 402or if the 403.B lockfile 404could not be created because of insufficient permissions or nonexistent 405subdirectories. 406.TP 407Lost "x" 408Procmail tried to clone itself but could not find back rcfile "x" (it either 409got removed or it was a relative path and you changed directory since 410procmail opened it last time). 411.TP 412Missing action 413The current recipe was found to be incomplete. 414.TP 415Missing closing brace 416A nesting block was started, but never finished. 417.TP 418Missing name 419The \-@FROMWHOPT@ option needs an extra argument. 420.TP 421Missing argument 422You specified the \-@ARGUMENTOPT@ option but forgot the argument. 423.TP 424Missing rcfile 425You specified the \-@MAILFILTOPT@ option, procmail expects the name of an 426rcfile as argument. 427.TP 428Missing recipient 429You specified the \-@DELIVEROPT@ option or called procmail under a different 430name, it expects one or more recipients as arguments.@WARN_RESTRICT_EXEC@ 431.TP 432No space left to finish writing "x" 433The filesystem containing "x" does not have enough free space to permit 434delivery of the message to the file. 435.TP 436Out of memory 437The system is out of swap space (and NORESRETRY has been exhausted). 438.TP 439Processing continued 440The unrecognised options on the command line are ignored, proceeding as 441usual. 442.TP 443Program failure (nnn) of "x" 444Program that was started by procmail returned nnn instead of 445EXIT_SUCCESS (=@EX_OK@); 446if nnn is negative, then this is the signal the program died on. 447.TP 448Quota exceeded while writing "x" 449The filesize quota for the recipient on the filesystem containing "x" 450does not permit delivering the message to the file. 451.TP 452Renaming bogus "x" into "x" 453The system mailbox of the recipient was found to be bogus, procmail performed 454evasive actions. 455.TP 456Rescue of unfiltered data succeeded/failed 457A filter returned unsuccessfully, procmail tried to get back the original text. 458.TP 459Skipped: "x" 460Couldn't do anything with "x" in the rcfile (syntax error), ignoring it. 461.TP 462Suspicious rcfile "x" 463The owner of the rcfile was not the recipient or root, the file was 464world writable, or the directory that contained it was world writable, 465or this was the default rcfile (@PROCMAILRC@) and either it was group 466writable or the directory that contained it was group writable (the 467rcfile was not used). 468.TP 469Terminating prematurely whilst waiting for .\|.\|. 470Procmail received a signal while it was waiting for .\|.\|. 471.TP 472Timeout, terminating "x" 473Timeout has occurred on program or filter "x". 474.TP 475Timeout, was waiting for "x" 476Timeout has occurred on program, filter or file "x". If it was a program or 477filter, then it didn't seem to be running anymore. 478.TP 479Truncated file to former size 480The file could not be delivered to successfully, so the file was truncated 481to its former size. 482.TP 483Truncating "x" and retrying lock 484"x" does not seem to be a valid filename or the file is not empty. 485.TP 486Unable to treat as directory "x" 487Either the suffix on "x" would indicate that it should be an MH or 488maildir folder, or it was listed as an second folder into which to link, 489but it already exists and is not a directory. 490.TP 491Unexpected EOL 492Missing closing quote, or trying to escape EOF. 493.TP 494Unknown user "x" 495The specified recipient does not have a corresponding uid. 496.SH "EXTENDED DIAGNOSTICS" 497Extended diagnostics can be turned on and off through setting the 498VERBOSE variable. 499.TP 2.3i 500[pid] time & date 501Procmail's pid and a timestamp. Generated whenever procmail logs a 502diagnostic and at least a second has elapsed since the last timestamp. 503.TP 504Acquiring kernel-lock 505Procmail now tries to kernel-lock the most recently opened file (descriptor). 506.TP 507Assigning "x" 508Environment variable assignment. 509.TP 510Assuming identity of the recipient, VERBOSE=off 511Dropping all privileges (if any), implicitly turns off extended diagnostics. 512.TP 513Bypassed locking "x" 514The mail spool directory was not accessible to procmail, it relied solely 515on kernel locks. 516.TP 517Executing "x" 518Starting program "x". If it is started by procmail directly (without an 519intermediate shell), procmail will show where it separated the arguments 520by inserting commas. 521.TP 522HOST mismatched "x" 523This host was called "x", HOST contained something else. 524.TP 525Locking "x" 526Creating lockfile "x". 527.TP 528Linking to "x" 529Creating a hardlink between directory folders. 530.TP 531Match on "x" 532Condition matched. 533.TP 534Matched "x" 535Assigned "x" to 536.BR @MATCHVAR@ . 537.TP 538No match on "x" 539Condition didn't match, recipe skipped. 540.TP 541Non-zero exitcode (nnn) by "x" 542Program that was started by procmail as a condition or as the action of 543a recipe with the `@WAIT_EXIT_QUIET@' flag returned nnn instead of 544EXIT_SUCCESS (=@EX_OK@); the usage indicates that this is not an 545entirely unexpected condition. 546.TP 547Notified comsat: "$LOGNAME@offset:file" 548Sent comsat/biff a notice that mail arrived for user $LOGNAME at `offset' 549in `file'. 550.TP 551Opening "x" 552Opening file "x" for appending. 553.TP 554Rcfile: "x" 555Rcfile changed to "x". 556.TP 557Reiterating kernel-lock 558While attempting several locking methods, one of these failed. Procmail will 559reiterate until they all succeed in rapid succession. 560.TP 561Score: added newtotal "x" 562This condition scored `added' points, which resulted in a `newtotal' score. 563.TP 564Unlocking "x" 565Removing lockfile "x" again. 566.SH WARNINGS 567You should create a shell script that uses 568.BR lockfile (1) 569before invoking your mail shell on any mailbox file other than the system 570mailbox (unless of course, your mail shell uses the same lockfiles (local 571or global) you specified in your rcfile). 572.PP 573In the unlikely event that you absolutely need to kill procmail before it has 574finished, first try and use the regular kill command (i.e., 575.I not 576kill \-9, see the subsection 577.I Signals 578for suggestions), otherwise some 579.I lockfiles 580might not get removed. 581.PP 582Beware when using the 583.B \-@TEMPFAILOPT@ 584option, if procmail repeatedly is unable to deliver the mail (e.g., due to 585an incorrect rcfile), the system mailqueue could fill up. This could 586aggravate both the local postmaster and other users.@ETCRC_warn@@ETCRCS_warn@ 587.PP 588Procmail is not the proper tool for sharing one mailbox among many 589users, such as when you have one POP account for all mail to your 590domain. It can be done if you manage to configure your MTA to add some 591headers with the envelope recipient data in order to tell Procmail who 592a message is for, but this is usually not the right thing to do. 593Perhaps you want to investigate if your MTA offers `virtual user 594tables', or check out the `multidrop' facility of Fetchmail. 595.SH BUGS 596After removing a lockfile by force, procmail waits $SUSPEND seconds before 597creating a new lockfile so that another process that decides to remove the 598stale lockfile will not remove the newly created lock by mistake. 599.PP 600Procmail uses the regular TERMINATE signal to terminate any runaway filter, 601but it does not check if the filter responds to that signal and it only sends 602it to the filter itself, not to any of the filter's children. 603.PP 604A continued 605.B Content-Length: 606field is not handled correctly. 607.PP 608The embedded newlines in a continued header should be skipped when 609matching instead of being treated as a single space as they are now. 610.SH MISCELLANEOUS 611If there is an existing 612.B Content-Length: 613field in the header of the mail and the 614.B \-@BERKELEYOPT@ 615option is not specified, procmail will trim the field to report the correct 616size. Procmail does not change the fieldwidth. 617.PP 618If there is no 619.B Content-Length: 620field or the 621.B \-@BERKELEYOPT@ 622option has been specified and procmail appends to regular mailfolders, any 623lines in the body of the message that look like postmarks are prepended with 624`@ESCAP@' (disarms bogus mailheaders). The regular expression that is used 625to search for these postmarks is: 626.RS 627`@FROM_EXPR@' 628.RE 629.PP 630If the destination name used in explicit delivery mode is not in /etc/passwd, 631procmail will proceed as if explicit delivery mode was not in effect. 632If not in explicit delivery mode and 633should the uid procmail is running under, have no corresponding /etc/passwd 634entry, then HOME will default to @ROOT_DIR@, LOGNAME will default to #uid, 635SHELL will default to @BinSh@, and ORGMAIL will default to 636@DEAD_LETTER@. 637.PP 638When in explicit delivery mode, procmail will generate a leading `@FROM@' 639line if none is present. If one is already present procmail will leave it 640intact.@TRUSTED_IDS@ 641.PP 642For security reasons procmail will only use an absolute or 643$HOME-relative rcfile if it is owned by the recipient or root, not 644world writable, and the directory it is contained in is not world 645writable. The @PROCMAILRC@ file has the additional constraint of not 646being group-writable or in a group-writable directory.@RESTRICT_EXEC@ 647.PP 648If @MAILSPOOLDIR@$LOGNAME is a bogus mailbox (i.e., does not belong to the 649recipient, is unwritable, is a symbolic link or is a hard link), procmail will 650upon startup try to rename it into a file starting 651with `@BOGUSprefix@$LOGNAME.' and 652ending in an inode-sequence-code. If this turns out to be impossible, 653.B ORGMAIL 654will have 655.I no 656initial value, and hence will inhibit delivery without a proper rcfile. 657.PP 658If @MAILSPOOLDIR@$LOGNAME already is a valid mailbox, but has got too loose 659permissions on it, procmail will correct this. To prevent procmail from doing 660this make sure the u+x bit is set. 661.PP 662When delivering to directories, MH folders, or maildir folders, you 663.B don't 664need to use lockfiles to prevent several concurrently running procmail 665programs from messing up. 666.PP 667Delivering to MH folders is slightly more time consuming than delivering 668to normal directories or mailboxes, because procmail has to search for 669the next available number (instead of having the filename immediately 670available). 671.PP 672On general failure procmail will return EX_CANTCREAT, unless option 673.B \-@TEMPFAILOPT@ 674is specified, in which case it will return EX_TEMPFAIL. 675.PP 676To make `egrepping' of headers more consistent, procmail concatenates all 677continued header fields; but only internally. When delivering the mail, line 678breaks will appear as before. 679.PP 680If procmail is called under a name not starting with `procmail' (e.g., if it 681is linked to another name and invoked as such), it comes up in explicit 682delivery mode, and expects the recipients' names as command line arguments 683(as if \-@DELIVEROPT@ had been specified). 684.PP 685Comsat/biff notifications are done using @COMSATprotocol@. They are sent off 686once when procmail generates the regular logfile entry. The notification 687messages have the following extended format (or as close as you can get when 688final delivery was not to a file): 689.RS 690$LOGNAME@offset_of_message_in_mailbox@COMSATxtrsep@absolute_path_to_mailbox 691.RE 692.PP 693Whenever procmail itself opens a file to deliver to, it 694@KERNEL_LOCKING@. 695.PP 696Procmail is NFS-resistant and eight-bit clean. 697.br 698.ne 11 699.SH NOTES 700Calling up procmail with the \-@HELPOPT1@ or \-@HELPOPT2@ options will cause 701it to display a command-line help and recipe flag quick-reference page. 702.PP 703There exists an excellent newbie FAQ about mailfilters (and procmail 704in particular); it is maintained by Nancy McGough <nancym@ii.com> 705and can be obtained by sending a mail to mail-server@rtfm.mit.edu with 706the following in the body: 707.RS 708send usenet/news.answers/mail/filtering-faq 709.RE 710.PP 711@CF_procmail@ 712In this case your $HOME/@DOT_FORWARD@ (beware, it 713.B has 714to be world readable) file should contain the line below. Be sure to include 715the single and double quotes, and unless you know your site to be running 716smrsh (the SendMail Restricted SHell), it must be an 717.I absolute 718path.@FW_comment@ 719.PP 720.na 721.nf 722@FW_content@ 723.fi 724.ad 725.PP 726Procmail can also be invoked to postprocess an already filled system 727mailbox. This can be useful if you don't want to or can't use a 728$HOME/@DOT_FORWARD@ file (in which case the following script could 729periodically be called from within 730.BR cron (1), 731or whenever you start reading mail): 732.Sx 17 733#!/bin/sh 734 735ORGMAIL=@MAILSPOOLDIR@$LOGNAME 736 737if cd $HOME && 738 test \-s $ORGMAIL && 739 lockfile \-r0 \-l@DEFlocktimeout@ .newmail.lock 2>/dev/null 740then 741 trap "rm \-f .newmail.lock" 1 2 3 13 15 742 umask 077 743 lockfile \-l@DEFlocktimeout@ \-ml 744 cat $ORGMAIL >>.newmail && 745 cat /dev/null >$ORGMAIL 746 lockfile \-mu 747 formail \-@FM_SPLIT@ procmail <.newmail && 748 rm \-f .newmail 749 rm \-f .newmail.lock 750fi 751exit 0 752.Ex 753.ne 14 754.SS "A sample small @PROCMAILRC@:" 755.na 756.nf 757PATH=/bin:/usr/bin:@BINDIR@ 758MAILDIR=$HOME/Mail #you'd better make sure it exists 759DEFAULT=$MAILDIR/mbox #completely optional 760LOGFILE=$MAILDIR/from #recommended 761 762:0: 763* ^From.*berg 764from_me 765 766:0 767* ^Subject:.*Flame 768/dev/null 769.fi 770.ad 771.PP 772Other examples for rcfile recipes can be looked up in the 773.BR procmailex (5) 774man page. 775