LPIC-2 202-450 study materials
LPIC-2 202-450 study resources

LPIC-2 202-450: E-Mail Services

LPIC-2 202-450 · Work through your exam, one topic at a time.

All guide sections

E-Mail Services

E-Mail Services focuses on Postfix and Dovecot: accepting mail, routing aliases and virtual domains, queue management, TLS, and IMAP/POP3 delivery. You need to trace a message from SMTP ingress to mailbox.

Core rules

  • Postfix main.cf keys include myhostname, mydomain, myorigin, inet_interfaces, mydestination, relayhost, home_mailbox = Maildir/, and virtual_alias_maps. postconf -n shows non-default settings; postfix check validates.
  • Local aliases are in /etc/aliases, applied with newaliases. Virtual aliases use a hash map: virtual_alias_maps = hash:/etc/postfix/virtual, then postmap /etc/postfix/virtual; a virtual domain should not also be in mydestination.
  • Queue tools: mailq, postqueue -f, postsuper -d ALL, postcat -q QUEUEID. TLS uses smtpd_tls_cert_file, smtpd_tls_key_file, and smtpd_use_tls=yes; test with openssl s_client -starttls smtp -connect mail:25.
  • Dovecot separates passdb/userdb and mail location: mail_location = maildir:~/Maildir, protocols = imap pop3, and TLS cert/key settings. doveadm inspects mailboxes.

Worked example

Forward all mail for [email protected] to [email protected]. Add virtual_alias_maps = hash:/etc/postfix/virtual; create /etc/postfix/virtual with [email protected] [email protected]; run postmap /etc/postfix/virtual, postfix check, reload. Reasoning: Postfix rewrites the envelope recipient through the virtual alias map before delivery; the target is external, so no local mailbox is needed. If example.com were in mydestination, local delivery would win and the alias would not behave as intended.

Traps

Editing /etc/aliases without newaliases; editing a hash map without postmap; leaving a virtual domain in mydestination; wrong Maildir path so Dovecot shows an empty inbox; key files readable by non-postfix users; and an open relay from an overly broad mynetworks.