Lpic 2 Linux Engineer · Free Practice Question Medium
Question 8
- A if anyof (header :contains 'From' 'external.com') { discard; }
- B if address :is 'from' 'external.com' { reject; }
- C if not address :domain 'from' 'company.com' { redirect '[email protected]'; }
- D if address :is 'to' '[email protected]' { stop; }
Reveal correct answer
Correct answer: C
A. This choice uses the 'discard' action, which will discard the email from external senders. However, the question asks for the emails to be forwarded to the manager's assistant, not discarded.
B. This choice uses the 'reject' action, which will reject the email from external senders. However, the question asks for the emails to be forwarded to the manager's assistant, not rejected.
C. This choice correctly uses the 'redirect' action to forward emails from external senders to the manager's assistant. The condition checks if the email is not from the company's domain, which includes external senders.
D. This choice uses the 'stop' action, which will stop processing the Sieve script for emails addressed to the manager. It does not address the requirement of forwarding emails from external senders to the manager's assistant.
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
