Szczegóły ebooka

Linux Email. Set up, maintain, and secure a small office email server

Linux Email. Set up, maintain, and secure a small office email server

Alistair McDonald, Magnus Back, David Rusenko, Carl Taylor, Patrick Ben Koetter, Ralf Hildebrandt, Ian Haycox

Ebook
Many businesses want to run their email servers on Linux for greater control and flexibility of corporate communications, but getting started can be complicated. The attractiveness of a free-to-use and robust email service running on Linux can be undermined by the apparent technical challenges involved. Some of the complexity arises from the fact that an email server consists of several components that must be installed and configured separately, then integrated together.
This book gives you just what you need to know to set up and maintain an email server. Unlike other approaches that deal with one component at a time, this book delivers a step-by-step approach across all the server components, leaving you with a complete working email server for your small business network.
Starting with a discussion on why you should even consider hosting your own email server, the book covers setting up the mail server. We then move on to look at providing web access, so that users can access their email out of the office. After this we look at the features you'll want to add to improve email productivity: virus protection, spam detection, and automatic email processing. Finally we look at an essential maintenance task: backups.
Written by professional Linux administrators, the book is aimed at technically confident users and new and part-time system administrators. The emphasis is on simple, practical and reliable guidance.
Based entirely on free, Open Source software, this book will show you how to set up and manage your email server easily.
  • Linux E-mail
    • Table of Contents
    • Linux E-mail
    • Credits
    • About the Authors
    • About the Reviewers
    • Preface
      • What this book covers
      • Who this book is for
      • Conventions
      • Reader feedback
      • Customer support
        • Errata
        • Piracy
        • Questions
    • 1. Linux and E-mail Basics
      • Why manage your own e-mail server
      • What you need to host an e-mail server
      • Sizing the hardware of your e-mail server
      • Main e-mail protocols: SMTP, POP, and IMAP
        • Overview
        • POP protocol
        • IMAP protocol
        • The SMTP protocol
      • E-mail and DNS
        • DNS record types used by e-mail applications
      • Backup mail servers
      • Summary
    • 2. Setting up Postfix
      • Introduction to Postfix
        • What is Postfix
        • Postfix architecture: An overview
          • New message arrival
          • Scheduling message deliveries
          • Message delivery
          • Supporting programs
      • Installation and basic configuration
        • Choosing the Postfix version
        • Installing from a package
        • Installing from source code
        • The Postfix configuration
          • main.cf
          • master.cf
          • Lookup tables
        • Getting Postfix up and running
          • Domains and hostnames
          • Indirect mail delivery through your ISP
          • Choosing network interfaces
          • Choosing mailbox format for local deliveries
          • Error reporting
          • Other useful configuration parameters
          • Starting Postfix and sending the first message
      • Stopping spam and other unwanted messages
        • Postfixs anti-spam methods: An overview
        • Understanding SMTP restrictions
          • Access maps
          • Access map examples
          • Implementing new policies
        • Using DNS blacklists
          • Choosing DNS blacklists
        • Stopping messages based on content
          • Configuring header and body checks
          • Header and body checks examples
          • Caveats
      • Virtual alias domains and local aliases
        • Virtual alias domains
          • Many virtual alias domains mapping to one local domain
          • One virtual alias domain mapping to many local domains
          • Group addresses
          • Introducing MySQL lookups
        • Local aliases
          • Command deliveries
        • Common pitfalls
        • Other address rewriting mechanisms
      • Troubleshooting Postfix problems
        • Reading and interpreting the log files
          • Message queue ID
          • SMTP submission and local delivery
          • Local submission and SMTP delivery
          • Connection problems upon SMTP delivery
          • Getting more detailed log messages
        • Troubleshooting lookup tables with Postmap
        • Getting help from the Postfix mailing list
      • Summary
    • 3. Incoming Mail with POP and IMAP
      • Choosing between POP and IMAP
      • Downloading and installing Courier-IMAP
        • Installing Courier-IMAP from a distribution repository
        • Installing Courier-IMAP from RPM
        • Installing Courier-IMAP using the Debian package format
        • Installing Courier-IMAP from source
          • Prerequisites
          • Building the Courier Authentication Library
          • Configuring the Courier Authentication Library
          • Resolving errors
        • Building Courier-IMAP
          • Handling errors
      • Using POP3
        • Configuring Courier-IMAP for POP3
        • Testing the POP3 Service
        • Retrieving E-mail via POP3 with Windows Live Mail
      • Using IMAP
        • Configuring Courier for IMAP
        • Testing the IMAP service
        • Retrieving mail via IMAP with Mozilla Thunderbird
      • Summary
    • 4. Providing Webmail Access
      • The webmail solution
        • The benefits
          • Easy and quick access
          • Easy remote access
          • No need to maintain clients
          • Configuring mail server interface via the user interface
          • Possible security benefits
        • The disadvantages
          • Performance
          • Compatibility with large e-mail volumes
          • Compatibility with e-mail attachments
          • Security issues
      • The SquirrelMail webmail package
      • SquirrelMail installation and configuration
        • Prerequisites to installation
          • Basic requirements
            • Installing Apache2
            • PHP
          • Perl
          • Review configuration
        • Installing SquirrelMail
          • Source installation
        • Configuring SquirrelMail
      • SquirrelMail plugins
        • Installing plugins
        • Example plugin installation
          • Downloading and unpacking the plugin
          • Performing custom installation
          • Enabling the plugin in conf.pl
        • Useful plugins
      • Securing SquirrelMail
      • Summary
    • 5. Securing Your Installation
      • Configuring Postfix network maps
        • SMTP-after-POP
        • Virtual Private Networks
        • SMTP Authentication
        • Static IP ranges
          • Generic relay rules
          • Explicit relay rules
        • Dynamic IP ranges
      • Cyrus SASL
        • SASL layers
          • Authentication interface
          • Mechanism
          • Method
          • Password verification service
        • Installing Cyrus SASL
        • Configuring Cyrus SASL
          • Selecting a password verification service
          • Choosing a log level
          • Choosing valid mechanisms
            • saslauthd
              • Using an IMAP server as authentication backend
              • Using an LDAP server as authentication backend
              • Using the local user accounts
              • Using PAM
            • auxprop
              • Configuring the sasldb plugin
              • Configuring the sql plugin
            • authdaemond
              • Setting the authdaemond password verification service
              • Configuring the authdaemond socket path
      • Testing Cyrus SASL authentication
      • Configuring Postfix SMTP AUTH
        • Preparing the configuration
        • Enabling SMTP AUTH
        • Setting the security policy
        • Including broken clients
      • Testing SMTP AUTH
      • Enabling relaying for authenticated clients
      • Securing plaintext mechanisms
        • Enabling Transport Layer Security
        • Configuring security policy
      • Dictionary attacks
        • Recipient maps
          • Checking local domain recipients
          • Checking relay domain recipients
        • Rate-limiting connections
      • Summary
    • 6. Getting Started with Procmail
      • Introduction to Procmail
        • Who wrote it and when
      • How can a filtering system help me?
        • Potential uses of mail filtering
          • Filtering and sorting mail
          • Forwarding mail
          • Processing the mail in an application
          • Acknowledgements and out of office/vacation replies
        • File locking and integrity
        • What Procmail is not suitable for
      • Downloading and installing Procmail
        • Installing via a package manager
        • Installing from source
        • Installation options/considerations
          • Individual installation
          • System-wide installation
        • Integration with Postfix for system-wide delivery
          • Creating an alias for system accounts
          • Adding Procmail to the Postfix configuration
          • Postfix-provided environment variables
      • Basic operations
        • Configuration file
          • File format
          • Configuration file dissection
      • Analyzing a simple rule
        • The rule structure
          • Variable analysis
          • Rule analysis
      • Creating and testing a rule
        • A "hello world" example
        • Creating rc.testing
        • Performing static testing of the script
        • Configuring Procmail to process rc.testing
        • Testing the setup
      • Configuration debugging
        • Checking for typos in the scripts
        • Looking at the log file for error messages
        • Checking file and directory permissions
        • Turning on Full Logging
        • Taking steps to avoid disasters
      • Understanding e-mail structure
        • Message body
        • E-mail headers
        • Header structure
        • Official definitions for headers
      • Example rule sets
        • From header
        • Return-Path Header
          • Filtering by Return-Path
        • To and Cc headers
          • Filtering by To or Cc
        • Subject header
          • Filtering by subject
      • System-wide rules
        • Removing executables
        • Large e-mails
      • Summary
    • 7. Advanced Procmail
      • Delivering and non-delivering recipes
        • Non-delivering example
      • Formail
      • Advanced recipe analysis
        • Adding comments
        • Assigning variables
          • Performing substitutions
            • Assigning variable with default values
            • Assigning command output to variables
          • Pseudo-variables
            • Mailbox variables
            • Program variables
            • System interaction variables
            • Logging variables
            • Procmail's state variables
            • Message content variables
            • Locking variables
            • Error-handling variables
            • Miscellaneous variables
            • Printing Procmail variables
        • Recipes
          • Colon line
            • Locking
              • Automatic locking
              • Enforced locking
              • No locking
            • Flags
              • Default flags
              • Scope of matching: HB
              • Scope of action: hb
              • Flow control: aAeEc
              • Case sensitivity: D
              • Execution mode: fwWir
          • Conditions
            • Applying a rule unconditionally
            • Tests with regular expressions
            • Testing the size of a message part
            • Testing the exit code of an external program
            • Negation
            • Variable substitution in conditions
          • Action line
            • Forwarding to other addresses
            • Feeding to a shell or command pipeline
            • Saving to a folder
            • Compound recipes
      • Regular expressions
        • Introduction to regular expressions
          • The dot
          • Quantifier operation
          • The asterisk
          • The plus sign
          • Restrictive matches using parentheses
          • Creating a simple spam filter
          • Character classes
          • Start of line
          • End of Line
        • Further reading
        • ^TO and ^TO_
        • ^FROM_MAILER
        • ^FROM_DAEMON
      • Advanced recipes
        • Creating a vacation auto reply
        • Organizing mail by date
        • Informing users about large mail
      • Procmail Module Library
      • Putting it all together
        • Creating a structure to base your own rules upon
          • Rc.system
          • Rc.lists
          • Rc.killspam
          • Rc.vacation
          • Rc.largefiles
          • Rc.viruses
          • Rc.spamfilter
      • Summary
    • 8. Busting Spam with SpamAssassin
      • Why filter e-mail
        • Spam is a moving target
        • Spam filtering options
      • Introduction to SpamAssassin
      • Downloading and installing SpamAssassin
        • Using CPAN
          • Configuring CPAN
        • Installing SpamAssassin using CPAN
        • Using the rpmbuild utility
        • Using pre-built RPMs
        • Testing the installation
          • Modified e-mails
      • Using SpamAssassin
        • Using SpamAssassin with Procmail
          • Global procmailrc file
          • Using SpamAssassin on a per-user basis
        • Using SpamAssassin as a daemon with Postfix
        • Using SpamAssassin with amavisd-new
          • Installing amavisd-new from package
          • Installation prerequisites
          • Installing from source
          • Creating a user account for amavisd-new
          • Configuring amavisd-new
          • Configuring Postfix to run amavisd-new
      • Configuring e-mail clients
        • Microsoft Outlook
        • Microsoft Outlook Express
        • Mozilla Thunderbird
      • Customizing SpamAssassin
        • Reasons to customize
        • Rules and scores
        • Altering rule scores
        • Using other rulesets
        • Whitelists and blacklists
        • Bayesian filtering
      • Other SpamAssassin features
      • Summary
    • 9. Antivirus Protection
      • Introduction to ClamAV
      • Document types supported
      • Downloading and installing ClamAV
        • Adding a new system user and group
        • Installing from a package
        • Installing from source code
          • Requirements
          • Building and installing
          • Quick test
      • Editing the config files
        • clamd
          • Examining the sample config file
        • freshclam
          • Closest mirrors
          • Examining the sample config file
        • File permissions
      • Post installation testing
        • EICAR test virus
        • Testing clamscan
        • Testing clamd
        • Testing freshclam
      • Introduction to ClamSMTP
        • Building and installing
        • Configuring into Postfix
        • Configuring clamSMTP
          • Examining the sample config file
      • Testing e-mail filtering
        • Testing mail-borne virus filtering
        • Thorough e-mail-borne testing
      • Automating update of virus data
        • Setting up auto updating
      • Automating startup and shutdown
        • ClamSMTP
        • ClamAV
      • Monitoring log files
      • Disinfecting files
      • Summary
    • 10. Backing Up Your System
      • Backup options
        • RAID
        • Image backups
        • File system backups
        • Ad hoc backups
      • What to back up
        • System inventory
        • Obtaining a list of installed software
        • System configuration files
        • Authentication data
        • The users' mailboxes
        • Log files
        • The mail queue
      • What not to back up
      • Backing up users' e-mail
        • Mail storage
        • Using dump
          • Full dump
          • Incremental dumps
        • Using restore
          • Interactive restore
          • Non-interactive restore across the network
      • Backing up configurations and logs
        • Transferring configurations and logs to backup media
        • Restoring the configuration
      • Automating backups
        • Backup script
        • Adding crontab entries
      • Verifying restoration procedures
      • Summary
    • Index
  • Tytuł: Linux Email. Set up, maintain, and secure a small office email server
  • Autor: Alistair McDonald, Magnus Back, David Rusenko, Carl Taylor, Patrick Ben Koetter, Ralf Hildebrandt, Ian Haycox
  • Tytuł oryginału: Linux Email. Set up, maintain, and secure a small office email server
  • ISBN: 9781847198655, 9781847198655
  • Data wydania: 2009-11-11
  • Format: Ebook
  • Identyfikator pozycji: e_3cb9
  • Wydawca: Packt Publishing