Book Image

CentOS 7 Server Deployment Cookbook

By : Timothy Boronczyk, IRAKLI NADAREISHVILI
Book Image

CentOS 7 Server Deployment Cookbook

By: Timothy Boronczyk, IRAKLI NADAREISHVILI

Overview of this book

CentOS is derived from Red Hat Enterprise Linux (RHEL) sources and is widely used as a Linux server. This book will help you to better configure and manage Linux servers in varying scenarios and business requirements. Starting with installing CentOS, this book will walk you through the networking aspects of CentOS. You will then learn how to manage users and their permissions, software installs, disks, filesystems, and so on. You’ll then see how to secure connection to remotely access a desktop and work with databases. Toward the end, you will find out how to manage DNS, e-mails, web servers, and more. You will also learn to detect threats by monitoring network intrusion. Finally, the book will cover virtualization techniques that will help you make the most of CentOS.
Table of Contents (18 chapters)
CentOS 7 Server Deployment Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Routing messages with Procmail


Depending on your preferences, tagging messages as spam may not be enough. Maybe you'll want to set up a rule in your e-mail client that moves any unwanted messages from your inbox to a dedicated spam directory. Or maybe you want such routing to happen automatically on the server. We can configure this using Procmail, a mail filtering and delivery agent.

In this recipe, we'll look at how to configure Procmail to route messages. We'll scan incoming mail, looking for a special header that SpamAssassin adds to messages if it thinks they're spam and then deliver them to a separate directory instead of the inbox.

Getting ready

This recipe requires a CentOS system with Postfix configured as described in the previous recipes. Administrative privileges are also required, either by logging in with the root account or through the use of sudo.

How to do it...

Follow these steps to set up Procmail to route messages:

  1. Create the /etc/procmailrc file with the following content...