nerdexam
Linux_Foundation

LFCS · Question #473

To avoid spammers using your mail server to relay their messages, you need to _______.

The correct answer is B. Set up a ruleset for this in /etc/sendmail.cf. To prevent unauthorized mail relaying through your Sendmail server, you must configure relay control rules within its main configuration file.

Submitted by jakub_pl· Apr 18, 2026Service Configuration

Question

To avoid spammers using your mail server to relay their messages, you need to _______.

Options

  • ADisable the relay control in /etc/aliases
  • BSet up a ruleset for this in /etc/sendmail.cf
  • CSet up relay control in your DNS's MX record.
  • DRecompile sendmail with the -NORELAY flag.

How the community answered

(61 responses)
  • A
    7% (4)
  • B
    75% (46)
  • C
    15% (9)
  • D
    3% (2)

Why each option

To prevent unauthorized mail relaying through your Sendmail server, you must configure relay control rules within its main configuration file.

ADisable the relay control in /etc/aliases

/etc/aliases maps email addresses to local users, files, or programs, and does not provide controls for mail relaying.

BSet up a ruleset for this in /etc/sendmail.cfCorrect

The /etc/sendmail.cf file is the main configuration file for the Sendmail Mail Transfer Agent, where rulesets are defined to control various mail processing behaviors, including policies to prevent open relaying by restricting which hosts are allowed to relay mail.

CSet up relay control in your DNS's MX record.

DNS MX records specify which mail servers are responsible for a domain, but they do not configure the relaying policies of the mail server itself.

DRecompile sendmail with the -NORELAY flag.

Recompiling Sendmail with a -NORELAY flag is an outdated and impractical method; relay control is managed through runtime configuration within sendmail.cf.

Concept tested: Sendmail relay control configuration

Source: https://www.sendmail.com/doc/html/m4.html

Topics

#Mail Server Configuration#Sendmail#Spam Prevention#Relay Control

Community Discussion

No community discussion yet for this question.

Full LFCS Practice