{
    "mode": "man",
    "parameter": "procmailrc",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/procmailrc/5/json",
    "generated": "2026-06-12T20:21:03Z",
    "synopsis": "",
    "sections": {
        "NAME": {
            "content": "procmailrc - procmail rcfile\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "",
            "subsections": [
                {
                    "name": "$HOME/.procmailrc",
                    "content": ""
                }
            ]
        },
        "DESCRIPTION": {
            "content": "For a quick start, see NOTES at the end of the procmail(1) man page.\n\nThe rcfile can contain a mixture of environment variable assignments (some of which have spe‐\ncial meanings to procmail), and recipes.  In their most simple appearance,  the  recipes  are\nsimply one line regular expressions that are searched for in the header of the arriving mail.\nThe first recipe that matches is used to determine where the mail has to go (usually a file).\nIf processing falls off the end of the rcfile, procmail will deliver the mail to $DEFAULT.\n\nThere  are  two  kinds  of  recipes:  delivering and non-delivering recipes.  If a delivering\nrecipe is found to match, procmail considers the mail (you guessed  it)  delivered  and  will\ncease processing the rcfile after having successfully executed the action line of the recipe.\nIf a non-delivering recipe is found to match, processing of the rcfile  will  continue  after\nthe action line of this recipe has been executed.\n\nDelivering  recipes are those that cause header and/or body of the mail to be: written into a\nfile, absorbed by a program or forwarded to a mailaddress.\n\nNon-delivering recipes are: those that cause the output of a program or filter to be captured\nback by procmail or those that start a nesting block.\n\nYou  can  tell procmail to treat a delivering recipe as if it were a non-delivering recipe by\nspecifying the `c' flag on such a recipe.  This will make procmail generate a carbon copy  of\nthe mail by delivering it to this recipe, yet continue processing the rcfile.\n\nBy  using any number of recipes you can presort your mail extremely straightforward into sev‐\neral mailfolders.  Bear in mind though that the mail can arrive concurrently in  these  mail‐\nfolders  (if  several procmail programs happen to run at the same time, not unlikely if a lot\nof mail arrives).  To make sure this does not result in a mess, proper use  of  lockfiles  is\nhighly recommended.\n\nThe  environment  variable assignments and recipes can be freely intermixed in the rcfile. If\nany environment variable has a special meaning to procmail, it will be used appropriately the\nmoment it is parsed (i.e., you can change the current directory whenever you want by specify‐\ning a new MAILDIR, switch lockfiles by specifying a new LOCKFILE, change  the  umask  at  any\ntime, etc., the possibilities are endless :-).\n\nThe  assignments and substitutions of these environment variables are handled exactly like in\nsh(1) (that includes all possible quotes and escapes),  with  the  added  bonus  that  blanks\naround the '=' sign are ignored and that, if an environment variable appears without a trail‐\ning '=', it will be removed from the environment.  Any program in backquotes started by proc‐\nmail will have the entire mail at its stdin.\n",
            "subsections": [
                {
                    "name": "Comments",
                    "content": "A  word  beginning with # and all the following characters up to a NEWLINE are ignored.  This\ndoes not apply to condition lines, which cannot be commented.\n"
                },
                {
                    "name": "Recipes",
                    "content": "A line starting with ':' marks the beginning of a recipe.  It has the following format:\n\n:0 [flags] [ : [locallockfile] ]\n<zero or more conditions (one per line)>\n<exactly one action line>\n\nConditions start with a leading `*', everything after that character is passed on to the  in‐\nternal  egrep  literally,  except for leading and trailing whitespace.  These regular expres‐\nsions are completely compatible to the normal egrep(1)  extended  regular  expressions.   See\nalso Extended regular expressions.\n\nConditions are anded; if there are no conditions the result will be true by default.\n\nFlags can be any of the following:\n\nH    Egrep the header (default).\n\nB    Egrep the body.\n\nD    Tell the internal egrep to distinguish between upper and lower case (contrary to the de‐\nfault which is to ignore case).\n\nA    This recipe will not be executed unless the conditions on the last preceding recipe  (on\nthe  current block-nesting level) without the `A' or `a' flag matched as well.  This al‐\nlows you to chain actions that depend on a common condition.\n\na    Has the same meaning as the `A' flag, with the additional condition that the immediately\npreceding recipe must have been successfully completed before this recipe is executed.\n\nE    This  recipe only executes if the immediately preceding recipe was not executed.  Execu‐\ntion of this recipe also disables any immediately following recipes with the  'E'  flag.\nThis allows you to specify `else if' actions.\n\ne    This  recipe  only executes if the immediately preceding recipe failed (i.e., the action\nline was attempted, but resulted in an error).\n\nh    Feed the header to the pipe, file or mail destination (default).\n\nb    Feed the body to the pipe, file or mail destination (default).\n\nf    Consider the pipe as a filter.\n\nc    Generate a carbon copy of this mail.  This only makes sense on delivering recipes.   The\nonly non-delivering recipe this flag has an effect on is on a nesting block, in order to\ngenerate a carbon copy this will clone the running procmail process (lockfiles will  not\nbe  inherited),  whereby the clone will proceed as usual and the parent will jump across\nthe block.\n\nw    Wait for the filter or program to finish and check its exitcode (normally  ignored);  if\nthe filter is unsuccessful, then the text will not have been filtered.\n\nW    Has the same meaning as the `w' flag, but will suppress any `Program failure' message.\n\ni    Ignore any write errors on this recipe (i.e., usually due to an early closed pipe).\n\nr    Raw mode, do not try to ensure the mail ends with an empty line, write it out as is.\n\nThere  are some special conditions you can use that are not straight regular expressions.  To\nselect them, the condition must start with:\n\n!    Invert the condition.\n\n$    Evaluate the remainder of this condition according to sh(1)  substitution  rules  inside\ndouble quotes, skip leading whitespace, then reparse it.\n\n?    Use the exitcode of the specified program.\n\n<    Check  if the total length of the mail is shorter than the specified (in decimal) number\nof bytes.\n\n>    Analogous to '<'.\n\nvariablename ??\nMatch the remainder of this condition against the value  of  this  environment  variable\n(which cannot be a pseudo variable).  A special case is if variablename is equal to `B',\n`H', `HB' or `BH'; this merely overrides the default header/body search area defined  by\nthe initial flags on this recipe.\n\n\\    To quote any of the above at the start of the line.\n"
                },
                {
                    "name": "Local lockfile",
                    "content": "If  you put a second (trailing) ':' on the first recipe line, then procmail will use a local‐\nlockfile (for this recipe only).  You can optionally specify the locallockfile to use; if you\ndon't  however,  procmail  will  use  the destination filename (or the filename following the\nfirst '>>') and will append $LOCKEXT to it.\n"
                },
                {
                    "name": "Recipe action line",
                    "content": "The action line can start with the following characters:\n\n!      Forwards to all the specified mail addresses.\n\n|      Starts the specified program, possibly in $SHELL if any of the characters  $SHELLMETAS\nare  spotted.   You can optionally prepend this pipe symbol with variable=, which will\ncause stdout of the program to be captured in the environment variable (procmail  will\nnot  terminate  processing  the  rcfile at this point).  If you specify just this pipe\nsymbol, without any program, then procmail will pipe the mail to stdout.\n\n{      Followed by at least one space, tab or newline will mark the start of a nesting block.\nEverything  up till the next closing brace will depend on the conditions specified for\nthis recipe.  Unlimited nesting is permitted.  The closing brace exists merely to  de‐\nlimit  the block, it will not cause procmail to terminate in any way.  If the end of a\nblock is reached processing will continue as usual after  the  block.   On  a  nesting\nblock,  the  flags `H' and `B' only affect the conditions leading up to the block, the\nflags `h' and `b' have no effect whatsoever.\n\nAnything else will be taken as a mailbox name (either a filename or a directory, absolute  or\nrelative  to  the  current  directory  (see MAILDIR)).  If it is a (possibly yet nonexistent)\nfilename, the mail will be appended to it.\n\nIf it is a directory, the mail will be delivered to a newly created, guaranteed to be  unique\nfile  named  $MSGPREFIX*  in the specified directory.  If the mailbox name ends in \"/.\", then\nthis directory is presumed to be an MH folder; i.e., procmail will use  the  next  number  it\nfinds  available.   If  the mailbox name ends in \"/\", then this directory is presumed to be a\nmaildir folder; i.e., procmail will deliver the message to a file  in  a  subdirectory  named\n\"tmp\"  and rename it to be inside a subdirectory named \"new\".  If the mailbox is specified to\nbe an MH folder or maildir folder, procmail will create the  necessary  directories  if  they\ndon't  exist, rather than treat the mailbox as a non-existent filename.  When procmail is de‐\nlivering to directories, you can specify multiple directories to deliver to (procmail will do\nso utilising hardlinks).\n"
                },
                {
                    "name": "Environment variable defaults",
                    "content": ""
                },
                {
                    "name": "LOGNAME, HOME and SHELL",
                    "content": "Your (the recipient's) defaults\n\nPATH                  $HOME/bin:/usr/local/bin:/usr/bin:/bin (Except during the processing of\nan /etc/procmailrc file, when it will be set to `/usr/local/bin\n:/usr/bin:/bin'.)\n\nSHELLMETAS            &|<>~;?*[\n\nSHELLFLAGS            -c\n\nORGMAIL               /var/mail/$LOGNAME\n(Unless -m has been specified, in which case it is unset)\n\nMAILDIR               $HOME\n(Unless  the  name  of the first successfully opened rcfile starts with\n`./' or if -m has been specified, in which case it defaults to `.')\n\nDEFAULT               $ORGMAIL\n\nMSGPREFIX             msg.\n\nSENDMAIL              /usr/sbin/sendmail\n\nSENDMAILFLAGS         -oi\n\nHOST                  The current hostname\n\nCOMSAT                no\n(If an rcfile is specified on the command line)\n\nPROCMAILVERSION      3.23pre\n\nLOCKEXT               .lock\n\nOther cleared or preset environment variables are IFS, ENV and PWD.\n\nFor security reasons, upon startup procmail will wipe out all environment variables that  are\nsuspected of modifying the behavior of the runtime linker.\n"
                },
                {
                    "name": "Environment",
                    "content": "Before  you get lost in the multitude of environment variables, keep in mind that all of them\nhave reasonable defaults.\n\nMAILDIR     Current directory while procmail is executing (that means that all paths are rel‐\native to $MAILDIR).\n\nDEFAULT     Default  mailbox  file  (if  not  told otherwise, procmail will dump mail in this\nmailbox).  Procmail will automatically use $DEFAULT$LOCKEXT as lockfile prior  to\nwriting  to this mailbox.  You do not need to set this variable, since it already\npoints to the standard system mailbox.\n\nLOGFILE     This file will also contain any error or diagnostic messages from procmail  (nor‐\nmally  none  :-)  or any other programs started by procmail.  If this file is not\nspecified, any diagnostics or error messages will be mailed back to  the  sender.\nSee also LOGABSTRACT.\n\nVERBOSE     You  can  turn on extended diagnostics by setting this variable to `yes' or `on',\nto turn it off again set it to `no' or `off'.\n\nLOGABSTRACT Just before procmail exits it logs an abstract of the delivered message in  $LOG‐\nFILE  showing the `From ' and `Subject:' fields of the header, what folder it fi‐\nnally went to and how long (in bytes) the message was.  By setting this  variable\nto  `no',  generation  of  this  abstract is suppressed.  If you set it to `all',\nprocmail will log an abstract for every  successful  delivering  recipe  it  pro‐\ncesses.\n\nLOG         Anything assigned to this variable will be appended to $LOGFILE.\n\nORGMAIL     Usually the system mailbox (ORiGinal MAILbox).  If, for some obscure reason (like\n`filesystem full') the mail could not be delivered, then this mailbox will be the\nlast resort.  If procmail fails to save the mail in here (deep, deep trouble :-),\nthen the mail will bounce back to the sender.\n\nLOCKFILE    Global semaphore file.  If this file already exists, procmail will wait until  it\nhas gone before proceeding, and will create it itself (cleaning it up when ready,\nof course).  If more than one lockfile are specified, then the previous one  will\nbe  removed before trying to create the new one.  The use of a global lockfile is\ndiscouraged, whenever possible use locallockfiles (on a  per  recipe  basis)  in‐\nstead.\n\nLOCKEXT     Default  extension that is appended to a destination file to determine what local\nlockfile to use (only if turned on, on a per-recipe basis).\n\nLOCKSLEEP   Number of seconds procmail will sleep before retrying on a lockfile  (if  it  al‐\nready existed); if not specified, it defaults to 8 seconds.\n\nLOCKTIMEOUT Number  of  seconds  that  have  to  have  passed since a lockfile was last modi‐\nfied/created before procmail decides that this must be  an  erroneously  leftover\nlockfile that can be removed by force now.  If zero, then no timeout will be used\nand procmail will wait forever until the lockfile is removed; if  not  specified,\nit  defaults  to  1024  seconds.   This  variable is useful to prevent indefinite\nhangups of sendmail/procmail.  Procmail is immune to clock skew across machines.\n\nTIMEOUT     Number of seconds that have to have passed  before  procmail  decides  that  some\nchild it started must be hanging.  The offending program will receive a TERMINATE\nsignal from procmail, and processing of the rcfile will continue.  If zero,  then\nno timeout will be used and procmail will wait forever until the child has termi‐\nnated; if not specified, it defaults to 960 seconds.\n\nMSGPREFIX   Filename prefix that is used when delivering to a directory (not used when deliv‐\nering to a maildir or an MH directory).\n\nHOST        If this is not the hostname of the machine, processing of the current rcfile will\nimmediately cease. If other rcfiles were specified on the command line,  process‐\ning  will  continue with the next one.  If all rcfiles are exhausted, the program\nwill terminate, but will not generate an error (i.e., to the mailer it will  seem\nthat the mail has been delivered).\n\nUMASK       The  name  says  it all (if it doesn't, then forget about this one :-).  Anything\nassigned to UMASK is taken as an octal number.  If not specified, the  umask  de‐\nfaults  to 077.  If the umask permits o+x, all the mailboxes procmail delivers to\ndirectly will receive an o+x mode change.  This can be used to check if new  mail\narrived.\n\nSHELLMETAS  If any of the characters in SHELLMETAS appears in the line specifying a filter or\nprogram, the line will be fed to $SHELL instead of being executed directly.\n\nSHELLFLAGS  Any invocation of $SHELL will be like:\n\"$SHELL\" \"$SHELLFLAGS\" \"$*\";\n\nSENDMAIL    If you're not using the forwarding facility don't worry about this one.  It spec‐\nifies the program being called to forward any mail.\nIt gets invoked as: \"$SENDMAIL\" $SENDMAILFLAGS \"$@\";\n\nNORESRETRY  Number  of  retries  that are to be made if any `process table full', `file table\nfull', `out of memory' or `out of swap space' error should occur.  If this number\nis negative, then procmail will retry indefinitely; if not specified, it defaults\nto 4 times.  The retries occur with a $SUSPEND second interval.  The idea  behind\nthis  is that if, e.g., the swap space has been exhausted or the process table is\nfull, usually several other programs will either detect this as well and abort or\ncrash 8-), thereby freeing valuable resources for procmail.\n\nSUSPEND     Number  of  seconds that procmail will pause if it has to wait for something that\nis currently unavailable (memory, fork, etc.); if not specified, it will  default\nto 16 seconds.  See also: LOCKSLEEP.\n\nLINEBUF     Length  of  the internal line buffers, cannot be set smaller than 128.  All lines\nread from the rcfile should not exceed $LINEBUF characters before and  after  ex‐\npansion.  If not specified, it defaults to 2048.  This limit, of course, does not\napply to the mail itself, which can have arbitrary line lengths, or  could  be  a\nbinary file for that matter.  See also PROCMAILOVERFLOW.\n\nDELIVERED   If  set  to `yes' procmail will pretend (to the mail agent) the mail has been de‐\nlivered.  If mail cannot be delivered after having met this  assignment  (set  to\n`yes'), the mail will be lost (i.e., it will not bounce).\n\nTRAP        When  procmail terminates of its own accord and not because it received a signal,\nit will execute the contents of this variable.  A copy of the mail  can  be  read\nfrom  stdin.   Any  output produced by this command will be appended to $LOGFILE.\nPossible uses for TRAP are: removal of temporary files,  logging  customised  ab‐\nstracts, etc.  See also EXITCODE and LOGABSTRACT.\n\nEXITCODE    By default, procmail returns an exitcode of zero (success) if it successfully de‐\nlivered the message or if the HOST variable was misset and there were no more rc‐\nfiles  on the command line; otherwise it returns failure.  Before doing so, proc‐\nmail examines the value of this variable.  If it is set  to  a  positive  numeric\nvalue, procmail will instead use that value as its exitcode.  If this variable is\nset but empty and TRAP is set, procmail will set the  exitcode  to  whatever  the\nTRAP  program returns.  If this variable is not set, procmail will set it shortly\nbefore calling up the TRAP program.\n\nLASTFOLDER  This variable is assigned to by procmail whenever it is delivering to a folder or\nprogram.   It always contains the name of the last file (or program) procmail de‐\nlivered to.  If the last delivery was to several directory folders together  then\n$LASTFOLDER will contain the hardlinked filenames as a space separated list.\n\nMATCH       This variable is assigned to by procmail whenever it is told to extract text from\na matching regular expression.  It will contain all text matching the regular ex‐\npression past the `\\/' token.\n\nSHIFT       Assigning  a  positive  value to this variable has the same effect as the `shift'\ncommand in sh(1).  This command is most useful to extract extra arguments  passed\nto procmail when acting as a generic mailfilter.\n\nINCLUDERC   Names  an  rcfile (relative to the current directory) which will be included here\nas if it were part of the current rcfile.  Nesting is permitted and only  limited\nby  systems  resources  (memory and file descriptors).  As no checking is done on\nthe permissions or ownership of the rcfile, users of INCLUDERC should  make  sure\nthat only trusted users have write access to the included rcfile or the directory\nit is in.  Command line assignments to INCLUDERC have no effect.\n\nSWITCHRC    Names an rcfile (relative to the current directory) to which processing  will  be\nswitched.  If the named rcfile doesn't exist or is not a normal file or /dev/null\nthen an error will be logged and processing will continue in the current  rcfile.\nOtherwise,  processing of the current rcfile will be aborted and the named rcfile\nstarted.  Unsetting SWITCHRC aborts processing of the current rcfile as if it had\nended  at  the assignment.  As with INCLUDERC, no checking is done on the permis‐\nsions or ownership of the rcfile and command line assignments have no effect.\n\nPROCMAILVERSION\nThe version number of the running procmail binary.\n\nPROCMAILOVERFLOW\nThis variable will be set to a non-empty value if procmail detects a buffer over‐\nflow.   See  the  BUGS section below for other details of operation when overflow\noccurs.\n\nCOMSAT      Comsat(8)/biff(1) notification is on by default, it can be turned off by  setting\nthis  variable to `no'.  Alternatively the biff-service can be customised by set‐\nting it to either `service@', `@hostname', or `service@hostname'.  When not spec‐\nified it defaults to biff@localhost.\n\nDROPPRIVS   If  set  to  `yes'  procmail  will drop all privileges it might have had (suid or\nsgid).  This is only useful if you want to guarantee that the bottom half of  the\n/etc/procmailrc file is executed on behalf of the recipient.\n"
                },
                {
                    "name": "Extended regular expressions",
                    "content": "The  following tokens are known to both the procmail internal egrep and the standard egrep(1)\n(beware that some egrep implementations include other non-standard extensions; in particular,\nthe repetition operator { is not supported by procmail's egrep):\n\n^         Start of a line.\n\n$         End of a line.\n\n.         Any character except a newline.\n\na*        Any sequence of zero or more a's.\n\na+        Any sequence of one or more a's.\n\na?        Either zero or one a.\n\n[^-a-d]   Any character which is not either a dash, a, b, c, d or newline.\n\nde|abc    Either the sequence `de' or `abc'.\n\n(abc)*    Zero or more times the sequence `abc'.\n\n\\.        Matches  a  single  dot;  use  \\ to quote any of the magic characters to get rid of\ntheir special meaning.  See also $\\ variable substitution.\n\nThese were only samples, of course, any more complex combination is valid as well.\n\nThe following token meanings are special procmail extensions:\n\n^ or $    Match a newline (for multiline matches).\n\n^^        Anchor the expression at the very start of the search area, or  if  encountered  at\nthe end of the expression, anchor it at the very end of the search area.\n\n\\< or \\>  Match  the character before or after a word.  They are merely a shorthand for `[^a-\nzA-Z0-9]', but can also match newlines.  Since they match actual characters,  they\nare only suitable to delimit words, not to delimit inter-word space.\n\n\\/        Splits the expression in two parts.  Everything matching the right part will be as‐\nsigned to the MATCH environment variable.\n"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Look in the procmailex(5) man page.\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "Continued lines in an action line that specifies a program always have to end in a backslash,\neven  if  the underlying shell would not need or want the backslash to indicate continuation.\nThis is due to the two pass parsing process needed (first procmail, then the shell  (or  not,\ndepending on SHELLMETAS)).\n\nDon't put comments on the regular expression condition lines in a recipe, these lines are fed\nto the internal egrep literally (except for continuation backslashes at the end of a line).\n\nLeading whitespace on continued regular expression condition lines  is  usually  ignored  (so\nthat they can be indented), but not on continued condition lines that are evaluated according\nto the sh(1) substitution rules inside double quotes.\n\nWatch out for deadlocks when doing unhealthy things like forwarding mail to your own account.\nDeadlocks can be broken by proper use of LOCKTIMEOUT.\n\nAny  default values that procmail has for some environment variables will always override the\nones that were already defined.  If you really want to override the defaults, you either have\nto put them in the rcfile or on the command line as arguments.\n\nThe  /etc/procmailrc file cannot change the PATH setting seen by user rcfiles as the value is\nreset when procmail finishes the /etc/procmailrc file.  While  future  enhancements  are  ex‐\npected  in  this area, recompiling procmail with the desired value is currently the only cor‐\nrect solution.\n\nEnvironment variables set inside the shell-interpreted-`|' action part of a recipe  will  not\nretain  their  value  after the recipe has finished since they are set in a subshell of proc‐\nmail.  To make sure the value of an environment variable is retained you have to put the  as‐\nsignment to the variable before the leading `|' of a recipe, so that it can capture stdout of\nthe program.\n\nIf you specify only a `h' or a `b' flag on a delivering recipe, and the recipe matches, then,\nunless  the `c' flag is present as well, the body respectively the header of the mail will be\nsilently lost.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "procmail(1), procmailsc(5), procmailex(5), sh(1), csh(1), mail(1), mailx(1), uucp(1),\naliases(5), sendmail(8), egrep(1), regexp(5), grep(1), biff(1), comsat(8), lockfile(1),\nformail(1)\n",
            "subsections": []
        },
        "BUGS": {
            "content": "The only substitutions of environment variables that can be handled by procmail itself are of\nthe  type  $name,  ${name}, ${name:-text}, ${name:+text}, ${name-text}, ${name+text}, $\\name,\n$#, $n, $$, $?, $, $- and $=; whereby $\\name will be substituted by  the  all-magic-regular-\nexpression-characters-disarmed  equivalent of $name, $ by the name of the current rcfile, $-\nby $LASTFOLDER and $= will contain the score of the last recipe.  Furthermore, the result  of\n$\\name  substitution  will never be split on whitespace.  When the -a or -m options are used,\n$# will expand to the number of arguments so specified and \"$@\"  (the  quotes  are  required)\nwill expand to the specified arguments.  However, \"$@\" will only be expanded when used in the\nargument list to a program, and then only one such occurrence will be expanded.\n\nUnquoted variable expansions performed by procmail are always split on space, tab,  and  new‐\nline characters; the IFS variable is not used internally.\n\nProcmail does not support the expansion of `~'.\n\nA  line  buffer  of  length  $LINEBUF is used when processing the rcfile, any expansions that\ndon't fit within this limit will be truncated and PROCMAILOVERFLOW  will  be  set.   If  the\noverflowing  line  is  a  condition  or an action line, then it will be considered failed and\nprocmail will continue processing.  If it is a variable assignment or recipe start line  then\nprocmail will abort the entire rcfile.\n\nIf the global lockfile has a relative path, and the current directory is not the same as when\nthe global lockfile was created, then the global lockfile will not be removed if procmail ex‐\nits at that point (remedy: use absolute paths to specify global lockfiles).\n\nIf an rcfile has a relative path and when the rcfile is first opened MAILDIR contains a rela‐\ntive path, and if at one point procmail is instructed to clone itself and the current  direc‐\ntory  has changed since the rcfile was opened, then procmail will not be able to clone itself\n(remedy: use an absolute path to reference the rcfile or make sure MAILDIR contains an  abso‐\nlute path as the rcfile is opened).\n\nA  locallockfile  on  the  recipe that marks the start of a non-forking nested block does not\nwork as expected.\n\nWhen capturing stdout from a recipe into an environment variable, exactly one  trailing  new‐\nline will be stripped.\n\nSome  non-optimal and non-obvious regexps set MATCH to an incorrect value.  The regexp can be\nmade to work by removing one or more unneeded '*', '+', or '?' operator on the left-hand side\nof the \\/ token.\n",
            "subsections": []
        },
        "MISCELLANEOUS": {
            "content": "If the regular expression contains `^TO' it will be substituted by\n`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^-a-zA-\nZ0-9.])?)', which should catch all destination specifications containing a specific address.\n\nIf the regular expression contains `^TO' it will be substituted by\n`(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)',\nwhich should catch all destination specifications containing a specific word.\n\nIf the regular expression contains `^FROMDAEMON' it will be substituted by `(^(Mailing-List:\n|Precedence:.*(junk|bulk|list)|To: Multiple recipients of |(((Resent-)?(From|Sender)|X-\nEnvelope-From):|>?From )([^>]*[^(.%@a-z0-9])?(Post(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?",
            "subsections": [
                {
                    "name": "|daemon|m(mdf|ajordomo)|n?uucp|LIST(SERV|proc)|NETSERV|o(wner|ps)|r(e(quest|sponse)|oot)",
                    "content": ""
                },
                {
                    "name": "|b(ounce|bs\\.smtp)|echo|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR",
                    "content": "|utoanswer))(([^).!:a-z0-9][-a-z0-9]*)?[%@>\\t ][^<)]*(\\(.*\\).*)?)?$([^>]|$)))', which should\ncatch mails coming from most daemons (how's that for a regular expression :-).\n\nIf the regular expression contains `^FROMMAILER' it will be substituted by\n`(^(((Resent-)?(From|Sender)|X-Envelope-From):|>?From )([^>]*[^(.%@a-z0-9])?(Post(ma(st(er)?"
                },
                {
                    "name": "|n)|office)|(send)?Mail(er)?|daemon|mmdf|n?uucp|ops|r(esponse|oot)|(bbs\\.)?smtp(error)?",
                    "content": "|s(erv(ices?|er)|ystem)|A(dmin(istrator)?|MMGR))(([^).!:a-z0-9][-a-z0-9]*)?[%@>\\t\n][^<)]*(\\(.*\\).*)?)?$([^>]|$))' (a stripped down version of `^FROMDAEMON'), which should\ncatch mails coming from most mailer-daemons.\n\nWhen assigning boolean values to variables like VERBOSE, DELIVERED or  COMSAT,  procmail  ac‐\ncepts  as true every string starting with: a non-zero value, `on', `y', `t' or `e'.  False is\nevery string starting with: a zero value, `off', `n', `f' or `d'.\n\nIf the action line of a recipe specifies a program, a sole backslash-newline pair in it on an\notherwise empty line will be converted into a newline.\n\nThe regular expression engine built into procmail does not support named character classes.\n"
                }
            ]
        },
        "NOTES": {
            "content": "Since  unquoted  leading  whitespace is generally ignored in the rcfile you can indent every‐\nthing to taste.\n\nThe leading `|' on the action line to specify a program or filter is stripped before checking\nfor $SHELLMETAS.\n\nFiles  included with the INCLUDERC directive containing only environment variable assignments\ncan be shared with sh.\n\nThe current behavior of assignments on the command line to  INCLUDERC  and  SWITCHRC  is  not\nguaranteed,  has been changed once already, and may be changed again or removed in future re‐\nleases.\n\nFor really complicated processing you can even consider calling procmail recursively.\n\nIn the old days, the `:0' that marks the beginning of a recipe, had to be  changed  to  `:n',\nwhereby `n' denotes the number of conditions that follow.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Stephen R. van den Berg\n<srb@cuci.nl>\nPhilip A. Guenther\n<guenther@sendmail.com>\n\n\n\nBuGless                                      2001/08/04                                PROCMAILRC(5)",
            "subsections": []
        }
    },
    "summary": "procmailrc - procmail rcfile",
    "flags": [],
    "examples": [
        "Look in the procmailex(5) man page."
    ],
    "see_also": [
        {
            "name": "procmail",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/procmail/1/json"
        },
        {
            "name": "procmailsc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/procmailsc/5/json"
        },
        {
            "name": "procmailex",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/procmailex/5/json"
        },
        {
            "name": "sh",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sh/1/json"
        },
        {
            "name": "csh",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/csh/1/json"
        },
        {
            "name": "mail",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mail/1/json"
        },
        {
            "name": "mailx",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mailx/1/json"
        },
        {
            "name": "uucp",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/uucp/1/json"
        },
        {
            "name": "aliases",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/aliases/5/json"
        },
        {
            "name": "sendmail",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sendmail/8/json"
        },
        {
            "name": "egrep",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/egrep/1/json"
        },
        {
            "name": "regexp",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/regexp/5/json"
        },
        {
            "name": "grep",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/grep/1/json"
        },
        {
            "name": "biff",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/biff/1/json"
        },
        {
            "name": "comsat",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/comsat/8/json"
        },
        {
            "name": "lockfile",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/lockfile/1/json"
        },
        {
            "name": "formail",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/formail/1/json"
        }
    ]
}