Chap4: General Configuration and Administration Flashcards
What are the 2 important conf parameters to set before starting postfix ?
myhostname
and
aliases
What is the aim of the parameter myhostname ?
This is the parameter used by postfix to know the fully qualified domain name of the computer it is running on.
What is the command to rebuild the indexed aliases file ?
newaliases
What is the command to start postfix ?
postfix start
Which configuration file is the core of postfix configuration
main.cf
How to separate multiple values in of a configuration parameter ?
spaces, commas, tabs, or newlines.
Which commands needs to be run whenever change made into main.cf have to be considered ?
postfix reload
What is the canonical table format ?
The canonical table pecifies an address mapping for local and non-local addresses. The mapping is used by the cleanup(8) daemon, before mail is stored into the queue. The address mapping is recursive.
This mapping therefore happens during the submissions stage of the mail processing.
What does LHS means ?
LeftHand Side of an entry of a lookup table
What does RHS means ?
RightHand Side of an entry of a lookup table
Which command should be called to create the indexed file of a lookup table
postmap /path/to/lookuptabletxt
What is the goal of the parameter default_database_type
This parameter tells you which database type Postfix uses by default.
If you don’t specify a database type with postmap, it automatically uses your default type. In
general, you can just use the default type configured on your system, but you must know what
it is when assigning lookup tables to mapping parameters.
What is the format of a lookup maps parameter ?
parameter = type:name
canonical_maps = hash:/etc/postfix/canonical
What are the different database formats available in postfix ?
The usual ones are: hash, dbm, btree, unix
the command postconf -m allows to see the list of available format in a particular system:
static pcre nis regexp environ proxy btree unix hash
What is the relocated table ?
The optional relocated(5) table provides the information that is used in “user has moved to new_location” bounce messages.
What is the aliases table ?
The aliases(5) table provides a system-wide mechanism to redirect mail for local recipients. The redirections are processed by the Postfix local(8) delivery agent.
What is the difference between virtual_alias_maps and virtual_domain_maps
The optional virtual alias table rewrites recipient addresses for all local, all virtual, and all remote mail destinations.
Virtual aliasing is recursive, and is implemented by the Postfix cleanup daemon before mail is queued.
The virtual delivery agent is designed for virtual mail hosting services. Originally based on the Postfix local delivery agent, this agent looks up recipients with map lookups of their full recipient address, instead of using hard-coded unix password file lookups of the address local part only. This delivery agent only delivers mail. Other features such as mail forwarding, out-of-office notifications, etc., must be configured via virtual_alias maps or via similar lookup mechanisms.
What is the difference between alias files and lookup tables ?
The main difference is the format of the text files. Alias files use a Sendmail-compatible format. Therefore the postmap command cannot be used for alias files. Rather use postalias or newaliases.
• An alias definition has the form
name: value1, value2, ...
- Empty lines and whitespace-only lines are ignored, as are lines whose first non-whitespace character is a `#’.
- A logical line starts with non-whitespace text. A line that starts with whitespace continues a logical line
Which alias files are indexed when calling the command newaliases ?
By default, the alias files listed in the parameter : alias_database
What are the possible target of an alias file ?
- Email addresses:
Any RFC 2822 address is allowed, meaning target addresses can be local or forwarded
to another site for delivery. For example:
kyle.dent: kdent, kdent@oreilly.com
- Filename:
Specify the full path to a file. New messages are appended to the file specified. Delivery
occurs to the file as it would to any local mailbox. See Chapter 7 for information on local
delivery to mailboxes and on specifying different mailbox formats. For example:
info: /usr/local/mail/info_box
- Command
Specify a pipe character and a command. See Chapter 14 for more information on
delivery to commands. For example:
info: “|/usr/local/bin/autoreply”
- :include:
An included file contains a list of additional alias targets. The targets in the file can be
any valid target type as described here, but by default filenames and commands are not
allowed. The next section discusses configuration parameters to override these default
restrictions. For example:
info: :include:/usr/local/mail/info_list
Which parameters allow to control which kinds of targets are allowed in your alias files ?
allow_mail_to_commands and allow_mail_to_files.
Each of these parameters takes a list of
the aliasing mechanism that permits its action. Aliasing mechanisms are “alias,” the alias file we’ve been discussing; “include,” the include target, and “forward,” which is the .forward file
commands:
allow_mail_to_commands = alias, forward, include
allow_mail_to_files = alias, forward, include
What are the 4 parameters postfix uses to identify itself ?
myhostname, mydomain, myorigin, and
mydestination.
What is the goal of the myhostname parameter ?
It is the hostname that the postfix MTA consider as it own one. By default, it is set to the fully qualified domain name of the host running postfix. Unless the function “gethostname” does not return the fully qualified domain name, in which case it will be a concatenation of the localname and the “mydomain” parameter value.
What is the goal of the mydomain parameter ?
It is the domain that the postfix MTA consider as its own one. By default, if myhostname is set, it defaults to the domain part of myhostname. Otherwise it has to be explicitly set.