# sendmail from ports - where to configure?



## HL1234 (May 9, 2019)

Before I start to configure my files for sendmail I get a simple question.
I has not installed (compiled) sendmail with FreeBSD. I installed sendmail form the ports. So normally all own software installed from the ports goes to /usr/local/.... 
So there is the place /usr/local/etc/mail. But I could also use /etc/mail/  like sendmail from the OS use it.
What is the right way?
Thank you for Your advice.


----------



## PMc (May 9, 2019)

I would recommend to leave it in /usr/local, so that there is no risk that some upgrade scripts for the OS might be disturbed or even might remove things. Better safe than sorry.


----------



## trev (May 10, 2019)

HL1234 said:


> I has not installed (compiled) sendmail with FreeBSD. I installed sendmail form the ports.



Curious, why? Aren't they the same version


----------



## SirDice (May 10, 2019)

The port allows you to enable/disable a bunch of options.


----------



## HL1234 (May 10, 2019)

I found also in this FORUM 


> Keep in mind that only port: mail/sendmail is activated for blacklistd. The base sendmail is not compiled with that feature.


----------



## 6502 (May 10, 2019)

Why sendmail and not Postfix?


----------



## trev (May 11, 2019)

SirDice said:


> The port allows you to enable/disable a bunch of options.



Indeed, but /etc/make.conf allows tweaking such options. For example, in mine I have:


```
# Sendmail config
SENDMAIL_CFLAGS= -UNETINET6     # no ISP IPv6 rDNS, so ditch IPv6 for sendmail
```

Of course, you do need to be building your own world (or at least sendmail) from base source.


----------



## drhowarddrfine (May 11, 2019)

make.conf is for tweaking `make` and, in this case, specifically the build for sendmail. Sendmail tweaks are done in the config file when you install sendmail and sendmail.mc.


----------



## trev (May 12, 2019)

Well obviously the tweaks being talked about were to the compilation of sendmail options (like IPv6) which can be tweaked either by using `make config` for the sendmail port or `SENDMAIL_CFLAGS= -UNETINET6` in the /etc/make.conf for the base sendmail. I'm not sure what your point is?


----------



## Phishfry (May 12, 2019)

The sendmail port pkg-message seems to be lacking in the setting required for using an alternative sendmail, not the one in base.


> You may also need to update /etc/rc.conf.


I know when I used hostapd from ports I had to add a setting to /etc/rc.conf to tell it about the different version than in base.
Guessing sendmail would need that too.

This is above and beyond any `make` stuff.


----------



## Phishfry (May 12, 2019)

Well I was wrong. No special redirect for /etc/rc.conf.








						sendmail from ports + blacklistd - stopped working (?)
					

Can someone confirm (or disprove) that the current version of Sendmail from ports (8.15.2_5), explicitly compiled with the blacklistd flag, has stopped feeding offending IPs (e.g. those failing do_auth) to blacklistd since Jan 3?  I ran blacklistd -d to check, but the poll() revealed nothing...




					forums.freebsd.org


----------



## drhowarddrfine (May 12, 2019)

trev My point is that one shouldn't be using make.conf for sendmail configuration but, instead, use the sendmail only files for configuring sendmail.


----------



## trev (May 13, 2019)

Gotcha. However, there was no way to disable IPv6 without using compilation flags (which is why I assume the port make config has that as an option).


----------

