Previous Page | Next Page

  1. Introduction
  2. About Linux
  3. Installation and getting started
  4. Logging in and out
  5. Basic Linux Commands
  6. Linux Files and File Permissions
  7. Linux Directory Structure
  8. Finding Files
  9. Linux Help
  10. Setting Time
  11. Devices
  12. Tips
  13. Accessing Other Filesystems
  14. Accessing Removable Media
  15. Making and Managing Filesystems
  16. Emergency Filesystems and Procedures
  17. LILO and Runlevels
  18. Init
  19. Environment, Shell Selection, and Startu
  20. Linux Kernel
  21. Package Installation and Printing
  22. Configuration, Logging and CRON
  23. Keys and Terminal Configuration
  24. Sound Configuration
  25. Managing Users
  26. Passwords
  27. Process Control
  28. Configuration and Diagnostic Tools
  29. Overall Configuration
  30. Using PAM
  31. Basic Network Setup
  32. Tools and Terms
  33. Novell and Printing
  34. Inetd Services
  35. Xinetd Services
  36. Other Network Services
  37. FTP and Telnet
  38. Samba
  39. Identd (auth)
  40. X Configuration
  41. X Use
  42. Using X Remotely
  43. X Documentation
  44. DNS
  45. DHCP and BOOTP
  46. Apache
  47. NFS
  48. PPP
  49. Mail
  50. Routing
  51. IP Masquerading
  52. Proxy Servers and ipchains
  53. UUCP
  54. News
  55. NIS
  56. Network Security
  57. Secure Shell
  58. Text Processing
  59. Shell Programming
  60. Emacs
  61. VI
  62. Recommended Reading
  63. Credits

Linux Mail

This page is not complete yet!

Linux Sendmail

Sendmail is the most used mail daemon with Linux and is probably already installed on your system. Its configuration file is "/etc/". Also /etc/sendmail.hf, /etc/aliases, /etc/aliases.db are useful files with sendmail. Sendmail provides full SMTP support. Many server systems may use sendmail, however clients normally use POP or IMAP protocols and the supporting software to get mail from the mailbox server.

Compiling Sendmail

The sendmail program can be found at and the current version is 8.10.1.

  1. Download the sendmail_8_10_1.tar.gz file into the /usr/local directory.
  2. Unpack it with the command "tar xvzf sendmail_8_10_1.tar.gz".
  3. Change directories to sendmail-8.10.1
  4. Read the INSTALL file for further installation instructions which are something like.
    1. Type "sh Build"
    2. Type "cd cf/cf".
    3. cp
    4. cd ..
    5. less README
    6. cd cf
    7. emacs
    8. sh Build
    9. Back up your /etc/ file and current sendmail binary file.
    10. Install as /etc/mail/ and copy the sendmail binary to /usr/sbin. The compiled binary is in obj.Linux2.2.14.i686/sendmail/.

Sendmail configuration files

  1. /etc/aliases
  2. /etc/ or /etc/mail/

The aliases file

This is where mail aliases are defined. There are two mandatory aliases that must be present listed below:

	MAILER-DAEMON:		postmaster
	postmaster:			root

There are 5 optional types:

  • conversion of mail name to unix user name. EX: "george_jones: george"
  • expand a name into a list of names EX: "friendlybunch: tom, george, fred, mike". EX: "staff: melissa, tom, george, mark"
  • mailing list, Sendmail will read a file and use the names in the file as a list of addressees. EX: "filebunch: :include: /usr/local/manyonteam"
  • Alias a name to a file. EX: "nobody" /dev/null"
  • replace a name by a program Ex "myhelp: |/usr/local/bin/helpme"

Here is a typical alias file from Redhat 6.1:

	#	@(#)aliases	8.2 (Berkeley) 3/5/94
	#  Aliases in this file will NOT be expanded in the header from
	#  Mail, but WILL be visible over networks or from /bin/mail.
	#	**********	The program "newaliases" must be run after
	#	** NOTE **	this file is updated for any changes to
	#	**********	show through to sendmail.

	# Basic system aliases -- these MUST be present.
	MAILER-DAEMON:	postmaster
	postmaster:	root

	# General redirections for pseudo accounts.
	bin:		root
	daemon:		root
	games:		root
	ingres:		root
	nobody:		root
	system:		root
	toor:		root
	uucp:		root

	# Well-known aliases.
	manager:	root
	dumper:		root
	operator:	root

	# trap decode to catch security attacks
	decode:		root

	# Person who should get root's mail
	root:		mark

	#User aliases
	mark.zehner:    mark
	george.jones:	george

After modifying the alias file you can rebuild it with the command



sendmail -bi

The /etc/ configuration file

Seven sections of this file:

  1. Local information - Configuration for the local host.
  2. Options - Sendmail environment options
  3. Message Precedence - Specifies
  4. Trusted Users - Specifies which users are allowed to change the sender addresses when sending mail.
  5. Header Format - Specifies the headers that are inserted into the mail.
  6. Rule Rewriting - The commands that re-write e-mail addresses into a form that can be read by the program that delivers the mail.
  7. Mailer Definitions - Specifies the programs that deliver the mail.