# Missing sendmail because i removed it.



## Alain De Vos (Jul 9, 2021)

Some programs , like fcron, want to use sendmail to send mails.
They produce errors like , "Couldn\'t exec \'/usr/sbin/sendmail\': No such file or directory"
But I removed sendmail and installed opensmtpd instead.
How to instruct to "all programs" use smtpd to send mails instead of sendmail?


----------



## SirDice (Jul 9, 2021)

Alain De Vos said:


> But I removed sendmail and installed opensmtpd instead.
> How to instruct to "all programs" use smtpd to send mails instead of sendmail?


Configure /etc/mail/mailer.conf correctly.


----------



## mtu (Jul 9, 2021)

It depends. mailwrapper wouldn't exist on a base system explicitly compiled without sendmail.

In any case, using an SMTP connection instead of a sendmail binary is something that each piece of software must be configured to do separately. Some can do it, some can't.


----------



## SirDice (Jul 9, 2021)

mtu said:


> mailwrapper wouldn't exist on a base system explicitly compiled without sendmail.


WITHOUT_SENDMAIL doesn't include WITHOUT_MAILWRAPPER. WITHOUT_MAIL does. So it depends.


```
WITHOUT_MAIL
             Set to not build any mail support (MUA or MTA).  When set, it
             enforces these options:

             WITHOUT_DMAGENT
             WITHOUT_MAILWRAPPER
             WITHOUT_SENDMAIL

     WITHOUT_MAILWRAPPER
             Set to not build the mailwrapper(8) MTA selector.
```


----------



## Alain De Vos (Jul 9, 2021)

I had compiled src.conf,

```
WITHOUT_MAIL=yes
WITHOUT_MAILWRAPPER=yes
WITHOUT_SENDMAIL=yes
```
I now changed now mailer.conf to,

```
sendmail        /usr/local/sbin/smtpctl
send-mail       /usr/local/sbin/smtpctl
mailq           /usr/local/sbin/smtpctl
makemap         /usr/local/libexec/opensmtpd/makemap
newaliases      /usr/local/libexec/opensmtpd/makemap
#hoststat
#purgestat
```
And in fcron.conf

```
sendmail    =    /usr/local/sbin/smtpctl
```

As mailwrapper seems an interesting program next time i use in src.conf,

```
WITH_MAILWRAPPER
WITHOUT_DMAGENT
WITHOUT_SENDMAIL
```


----------



## SirDice (Jul 9, 2021)

Remove WITHOUT_MAIL too, that one includes WITHOUT_MAILWRAPPER.


----------

