Red Hat LINUX 7.2 - OFFICIAL LINUX CUSTOMIZATION GUIDE Guida di Installazione Pagina 216

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 282
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 215
216 Chapter 16. Email
If you would like to ignore "Program failure" messages when deciding whether a filter or action
succeeded, use the W option instead.
Additional flags can be found in the procmailrc man page.
16.5.2.3. Specifying a Local Lockfile
Lockfiles are very useful with Procmail to ensure that more than one process does not try to alter a
certain message at the same time. You can specify a local lockfile by placing a colon (:) after any
flags on a recipe’s first line. This will create a local lockfile based on the destination filename plus
whatever has been set in the LOCKEXT global environment variable.
Alternatively, you can specify the name of the local lockfile to be used with this recipe after the colon.
16.5.2.4. Special Conditions and Actions
Particular characters used before Procmail recipe conditions and actions change the way they are
interpreted.
The following characters may be used after the * character at the beginning of a recipe’s condition
line:
! Inverts the condition, causing a match to occur only if the condition does not match the
message.
— Checks to see if the message is under the specified number of bytes.
— Checks to see if the message is over a particular number of bytes.
The following characters are used to perform special actions:
! — Tells Procmail to forward the message to the specified email addresses
$ — Refers to a variable set earlier in the rc file. This is usually used to set a common mailbox that
will be referred to by various recipes.
| — The pipe character tells Procmail to start a specific program to deal with this message.
{ and } Constructs a nesting block, used to contain additional recipes to apply to matching
messages.
If no special character is used at the beginning of the action line, then Procmail assumes that the action
line is specifying a mailbox where the message should be written.
16.5.2.5. Recipe Examples
Procmail is an extremely flexible program, allowing you to match messages with very specific condi-
tions and then perform detailed actions on them. As a result of this flexibility, however, composing a
Procmail recipe from scratch to achieve a certain goal can be difficult for new users.
The best way to develop the skills to build Procmail recipe conditions stems from a strong understand-
ing of regular expressions combined with looking at many examples built by others. The following
very basic examples exist to serve as a demonstration of the structure of Procmail recipes and can
provide the foundation for more intricate constructions.
The most basic recipes does not even contain conditions, as is demonstrated in Figure 16-10.
Vedere la pagina 215
1 2 ... 211 212 213 214 215 216 217 218 219 220 221 ... 281 282

Commenti su questo manuale

Nessun commento