# Disabling Sendmail



## bsd10 (Aug 18, 2011)

In rc.conf I have 

```
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
```

but /var/spool/clientmqueue is still filling up. How do I completely disable sendmail?


----------



## jrm@ (Aug 18, 2011)

`# /etc/rc.d/sendmail onestop`

You can also add


```
NO_SENDMAIL=true
```

to /etc/make.conf.


----------



## francis (Aug 18, 2011)

Hi, the /var/spool/clientmqueue directory is filling up only by a Sendmail process to the *localhost* interface. Nothing more, nothing less. It is very important from security point of view. It means that Sendmail does not need to have setuid root for outgoing users mails to write messages to that directory. I think, that it is normal, that there is many messages. But if I am wrong, and this option is simply not needed to be enabled (I mean *sendmail_msp_queue_enable/_flags* of course), then please correct me.

More info about this issue you will find, by reading Clientmqueue keeps filling /var - especially read *DutchDaemon* message, clientmqueue filling up and maybe disable sendmail completely. This daemon is enable by default (see /etc/defaults/rc.conf file).

If it is about disabling sendmail - There is also the "NONE" option for a sendmail_enable. Did you tried to take advantage of it? I hope, that I helped  you in some way. Best regards!


----------



## bsd10 (Aug 18, 2011)

Should I replace the four sendmail lines with just
	
	



```
sendmail_enable="NONE"
```
 or do I need all of them?

I guess I will also add
	
	



```
NO_SENDMAIL=true
```
to make.conf and rebuild world.


----------



## wblock@ (Aug 18, 2011)

bsd10 said:
			
		

> Should I replace the four sendmail lines with just
> 
> 
> 
> ...



It's the same thing:
/etc/rc.d/sendmail

```
case ${sendmail_enable} in
[Nn][Oo][Nn][Ee])
        sendmail_enable="NO"
        sendmail_submit_enable="NO"
        sendmail_outbound_enable="NO"
        sendmail_msp_queue_enable="NO"
        ;;
esac
```

The single NONE is preferable because it can't get mixed like four different entries can.


----------



## zeissoctopus (Aug 19, 2011)

You can disable sendmail by adding a line to /etc/rc.conf

```
sendmail_enable="NONE"
```


----------

