# grep '^inetd_flags="' /etc/rc.conf
inetd_flags="NO"                # for normal use: ""
# grep -i 'sendmail_flags="NO"' /etc/rc.conf

after a reboot..:
two questions:

# ps -aux | egrep -i "inetd|sendmail"
root      4420  0.0  0.1   452   652 ??  Is     8:10PM    0:00.00 /usr/sbin/inetd

QUESTION: How can I disable inetd, so that it will not start after a reboot? (+how can I disable sendmail correctly?)

  • 1
    Why do you want to disable sendmail? – gabe. Nov 4 '12 at 17:29

You could delete the symlinks for them in the /etc/rc2.d (or rc3.d) directory. That will stop them from starting up at startup.

rm /etc/rc2.d/*sendmail* /etc/rc2.d/*inetd*


@BenjiWiebe: That would be true for Linux. But this is OpenBSD.

If you really want to turn it off properly in the current version of OpenBSD (5.9) edit the file: /etc/rc.conf Look for the line that starts with smtpd_flags and change it to say: smtpd_flags=NO

You should not do this since the system mails reports of the system's health daily. You will save very very little memory and CPU usage.

My guess is that you don't feel comfortable for other reasons - you don't want to become a spam relay since the standard setup allows a local user to email out to the internet. To only allow local to local mail edit the file /etc/mail/smtpd.conf and change the last line to: accept from local for local


On OpenBSD 5.3 I didn't find any symlinks, it just has one /etc/rc/ directory, so I edited /etc/rc (lines starting with start_daemon).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.