Lesson 3 | Configuring procmail |
Objective | Configure procmail. |
How to configure procmail
A user does not directly run the procmail
program. Rather, you configure Linux
to run procmail
automatically whenever new mail arrives. Linux sends all new incoming email to procmail
, relying on procmail
to filter and deliver the email appropriately.
Red Hat Linux automatically sends email through procmail, so you do not have to instruct your Mail Delivery Agents (MDA)Mail Delivery Agent (MDA) to use procmail to filter. Instead, all you need to do is place your recipes in either the global or personal procmail configuration files.
Procmail configuration files
When procmail
starts, it looks for personal and global configuration files. First, it reads personal configuration files, which are named .procmailrc
in each user's home directory and affect only the user's email. Next, it reads the global configuration file, which is named /etc/procmailrc
and affects all users' email.
Because Red Hat's default sendmail
configuration filters all incoming email through procmail
, it is important that you fully understand and test your procmail
configuration before activating it. This warning is especially true for the global configuration file, because it affects all users email.
Both configuration files contain variable definitions and recipes, or rules, for filtering email. Variable definitions allow you to assign a value to a variable and use the variable throughout your configuration file. If you ever need to change the value, you only need to change your configuration file in one place.
The next lesson discusses procmail
recipes.
Alternative email utilities for "proc mail" in Red Hat Linux
There are several email utilities available in modern Red Hat Linux that can be used to replace procmail, depending on the specific requirements of the user or organization. Some of the most popular options are:
- Postfix: Postfix is a popular mail transfer agent (MTA) that can be used to send and receive email messages. It supports a range of email protocols, including SMTP, POP, and IMAP, and provides a flexible and customizable configuration system that can be used to implement advanced email processing workflows.
- Dovecot: Dovecot is an open-source IMAP and POP3 server that can be used to provide email access to clients. It supports a range of authentication mechanisms, including SSL/TLS encryption and LDAP integration, and provides a fast and reliable email delivery system.
- Exim: Exim is another popular MTA that can be used to send and receive email messages. It supports a range of email protocols, including SMTP, POP, and IMAP, and provides a flexible and customizable configuration system that can be used to implement advanced email processing workflows.
- Sendmail: Sendmail is a classic MTA that has been used for many years in Linux and Unix systems. It supports a range of email protocols, including SMTP, POP, and IMAP, and provides a powerful and customizable email processing system.
- Qmail: Qmail is another classic MTA that provides a fast and secure email delivery system. It supports a range of email protocols, including SMTP, POP, and IMAP, and provides a simple and reliable email processing system.
Each of these email utilities has its own strengths and weaknesses, and the choice of which one to use will depend on the specific requirements of the user or organization. However, all of these options provide powerful and flexible email processing capabilities that can be used to replace procmail and implement advanced email workflows in Red Hat Linux.