Chap4: General Configuration and Administration Flashcards

1
Q

What are the 2 important conf parameters to set before starting postfix ?

A

myhostname

and

aliases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the aim of the parameter myhostname ?

A

This is the parameter used by postfix to know the fully qualified domain name of the computer it is running on.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the command to rebuild the indexed aliases file ?

A

newaliases

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the command to start postfix ?

A

postfix start

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which configuration file is the core of postfix configuration

A

main.cf

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to separate multiple values in of a configuration parameter ?

A

spaces, commas, tabs, or newlines.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Which commands needs to be run whenever change made into main.cf have to be considered ?

A

postfix reload

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the canonical table format ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does LHS means ?

A

LeftHand Side of an entry of a lookup table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What does RHS means ?

A

RightHand Side of an entry of a lookup table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which command should be called to create the indexed file of a lookup table

A

postmap /path/to/lookuptabletxt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the goal of the parameter default_database_type

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the format of a lookup maps parameter ?

A

parameter = type:name

canonical_maps = hash:/etc/postfix/canonical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the different database formats available in postfix ?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the relocated table ?

A

The optional relocated(5) table provides the information that is used in “user has moved to new_location” bounce messages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the aliases table ?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is the difference between virtual_alias_maps and virtual_domain_maps

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is the difference between alias files and lookup tables ?

A

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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Which alias files are indexed when calling the command newaliases ?

A

By default, the alias files listed in the parameter : alias_database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What are the possible target of an alias file ?

A
  • 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

21
Q

Which parameters allow to control which kinds of targets are allowed in your alias files ?

A

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

22
Q

What are the 4 parameters postfix uses to identify itself ?

A

myhostname, mydomain, myorigin, and

mydestination.

23
Q

What is the goal of the myhostname parameter ?

A

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.

24
Q

What is the goal of the mydomain parameter ?

A

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.

25
Q

What is the goal of the myorigin parameter ?

A

When your users send or receive mail through the Postfix system with no domain name
specified in the envelope or header addresses, the parameter myorigin determines what
domain name should be appended.

The default is to use the value of myhostname.

26
Q

What is the goal of the mydestination parameter ?

A

The mydestination parameter lists all the domains your Postfix system should accept mail for
and deliver to local users. By default Postfix accepts mail destined for $myhostname and
localhost.$mydomain.

27
Q

What does UBE means ?

A

Unsollicited Bulk Emails

28
Q

What are the parameters used to restrict clients submitting messages to relay based on their IP addresses ?

A

mynetworks_style and mynetworks

You can limit or broaden the range of addresses that should be allowed to relay by setting the parameter mynetworks_style. If you prefer to limit relaying to the local machine only, set mynetworks_style to “host”. You can also set mynetworks_style to “class” to allow relaying by any host within the same class A, B, or C network as your server. For many networks a class setting opens relaying to too many systems. If you aren’t familiar with IP address classes, stick to the default “subnet” or more restrictive “host” settings.

Alternatively, you can explicitly indicate the hosts that should be allowed to relay mail by setting mynetworks. If you set mynetworks, the mynetworks_style parameter is ignored. You can list individual IP addresses or specify subnets using the network/netmask notation—for example, 192.168.100.0/28.

29
Q

What is pop-before-smtp ?

A

It is an SMTP Client authentication mechanism that works with Postfix by dynamically updating a Postfix lookup table, adding new IP addresses as users authenticate, and deleting others when the time period
expires. It require that a user first log in to a POP/IMAP server, thereby supplying the
client’s currently assigned IP address to your system or network.

30
Q

What is DRAC ? (Dynamic Relay Authorization Control)

A

It is an SMTP Client authentication mechanism that works with Postfix by dynamically updating a Postfix lookup table, adding new IP addresses as users authenticate, and deleting others when the time period
expires. It require that a user first log in to a POP/IMAP server, thereby supplying the
client’s currently assigned IP address to your system or network.

DRAC differs
from pop-before-smtp in that it can work over a network, while pop-before-smtp requires that
the POP/IMAP server be installed on the same system as the SMTP server.

31
Q

What is WHOSON ?

A

It is an SMTP Client authentication mechanism that provides an interface to both the POP/IMAP and SMTP
servers. You have to run a WHOSON server on your network, and you must obtain a patch that
adds a new lookup type to Postfix. After building Postfix with the patch, it can communicate
with the WHOSON server to determine if a particular client IP address should be allowed to
relay mail.

32
Q

What is SASL ?

A

SASL is a general protocol that
defines how a server and client can exchange authentication credentials. It can be used by postfix as an authentication mechanism

33
Q

Which daemon launches all the other postfix daemons/services

A

the master daemon.

34
Q

Which file contains the the various services to launch and their configuration ?

A

master.cf

35
Q

What are the different parameters to set when configuring a service in master.cf

A
Service Name,
Transport Name,
Private,
Unprivileged,
Chroot,
Wakeup time,
Process limit,
Command Name + Arguments
36
Q

Which parameter allows to configure the maximum number of recipients of a message ?

A

smtpd_recipient_limit

the default value is 1000

37
Q

Which parameter limits the size of any message your system will accept ?

A

message_size_limit

the default value is 10MB

38
Q

Which parameter specify the sleep delay after each error ?

A

smtpd_error_sleep_time

39
Q

Which parameter specify the number of errors after which the sleep delay should be increased by 1 ?

A

smtpd_soft_error_limit

40
Q

Which parameters specify the number of errors after which postfix should disconnect from the client ?

A

smtpd_hard_error_limit

41
Q

Which parameters prevent Postfix from appending the domain in myorigin or mydomain ?

A
append_at_myorigin = no
append_dot_mydomain = no
42
Q

Which parameter do you need to configure if you want your to rewrite only sender or recipient addresses (canonical) ?

A

sender_canonical_maps and recipient_canonical_maps

43
Q

What is masquerading ?

A

Address masquerading refers to the idea that you can hide the names of internal hosts, and make all addresses appear as if they originated from the gateway system itself. You may have internal systems that use your Postfix server as a gateway. When mail is sent from these systems and the sender addresses include the fully qualified hostname, you may want
addresses to appear with the domain name only.

44
Q

Which parameters strips hostnames down to their simpler domain names (technique known as masquerading) ?

A

masquerade_domains

Example:
masquerade_domains = acct.example.com hr.example.com example.com

With this setting, the address heloise@sys3.acct.example.com matches acct.example.com, so that it becomes heloise@acct.example.com. The address frank@db.hr.example.com matches hr.example.com, and becomes frank@hr.example.com. Finally, helene@server1.example.com matches the last value, example.com, to become helene@example.com.

masquerade_domains = !it.example.com, example.com
In this case, the domain it.example.com will not be rewritten, so the address kdent@it.example.
com stays as it is.

45
Q

How to exclude specific account names from masquerading ?

A

masquerade_exceptions = admin, root

46
Q

Which parameter allows to determine which addresses are to be masqueraded (envelope, header, sender, recipient) ?

A

masquerade_classes

masquerade_classes = envelope_recipient, envelope_sender, header_sender, header_recipient

47
Q

Which address allows to manage relocated users ?

A

relocated_maps = hash:/etc/postfix/relocated

48
Q

What happens when a message is sent to a relocated address ?

A

When a message is delivered to a relocated address, Postfix rejects the delivery attempt with a message that includes the user’s new address as specified in the lookup table.