Using Procmail   «Prev  Next»

Lesson 7Recipe actions
ObjectiveDescribe recipe actions.

Maildrop Action Lines

Question: Are there any action lines in maildrop to process the email?
Yes, in maildrop, there are "action lines" that can be used to process incoming email messages. These lines specify what should be done with the message, such as delivering it to a particular folder or mailbox, filtering out spam or unwanted messages, or forwarding it to another address.
Here are a few examples of action lines in maildrop:
  1. To deliver a message to a specific folder: to $HOME/Maildir/foldername
  2. To filter out messages from a particular sender:
    if (/^From:.* { 
    # Filter out annoying sender exit 
  3. To forward a message to another email address:

These are just a few examples, but there are many more actions that can be performed using maildrop. The specific actions and syntax used may depend on the email system and configuration being used.

Recipe Actions for procmail

Action lines, which are the last lines in a recipe, tell procmail how to process the email. procmail can manipulate an email in several ways, illustrated in the following slide show.
If you use mh as your Mail User Agent (MUA), then append /. onto the end of the mailbox's name. Doing so will instruct procmail to save the message in mh-specific format.
Mail User Agents (MUA): Programs responsible for displaying and composing email.
Consult the procmailrc man page for more examples and advanced actions. In the next lesson, you'll learn how to invoke procmail.

maildrop is compatible with the latest version of Red Hat Linux

Question: Can maildrop be used with the latest version of Red Hat Linux?
Yes, maildrop can be used with the latest version of Red Hat Linux, as well as with many other Linux distributions. Maildrop is a popular mail delivery agent that can be used with a variety of email systems and servers. It is typically installed on the mail server itself and is responsible for delivering incoming email messages to the appropriate mailboxes or folders.
To use maildrop with Red Hat Linux, you will need to install the maildrop package, which is available through the Red Hat Package Manager (RPM). Once installed, you can configure maildrop to work with your email system and specify the appropriate actions to be taken for incoming messages. The specific steps for installing and configuring maildrop may vary depending on your specific setup and email system, but there are many resources and tutorials available online to help guide you through the process.

Recipe Actions - Exercise

Before you move to the next lesson, click the Exercise link below to test your understanding of recipe flags, conditions and actions.
Recipe Actions - Exercise