Lpic 1 Linux Administrator · Free Practice Question Medium
Question 15
- A mail.* /var/log/maillog; mail,!crit @logger.example.com
- B mail.* /var/log/maillog & mail,!crit @logger.example.com
- C mail.* /var/log/maillog; mail.crit @logger.example.org
Reveal correct answer
Correct answer:
A. This configuration line uses the incorrect syntax with the exclamation mark (!) after mail, which is not valid in syslog.conf. The correct syntax for excluding events is to use a tilde (~) before the event level.
B. Similar to choice B, the use of the ampersand (&) symbol is incorrect in syslog.conf configuration. The correct syntax for specifying multiple actions is using a semicolon (;) to separate them.
C. While this configuration correctly logs all mail-related events to /var/log/maillog and sends critical events to a remote server, the destination server is specified as logger.example.org instead of logger.example.com as required in the question.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
