Name

-bd

Synopsis

The -bd command-line switch causes sendmail to become a daemon, running in the background, listening for and handling incoming SMTP connections.[5]

To become a daemon, sendmail first performs a fork(2). The parent then exits, and the child becomes the daemon by disconnecting itself from its controlling terminal. The -bD command-line switch can be used to prevent the fork(2) and the detachment and allows the sendmail program’s behavior to be observed while it runs in daemon mode.

As a daemon, sendmail does a listen(2) on TCP port 25 by default for incoming SMTP messages.[6] When another site connects to the listening daemon, the daemon performs a fork(2), and the child handles receipt of the incoming mail message.

[5] In its classic invocation, -bd is usually combined with a -q1h.

[6] Beginning with V8.10, sendmail also listens on port 587 for message submissions via MUAs. This default behavior can be turned off with the no_default_msa mc feature (FEATURE(no_default_msa)).

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.