Installing sendmail in non-default location

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Installing sendmail in non-default location

Larry Stone
I’m trying to figure out how to tell make {install | upgrade} to install sendmail eleswhere? I tried sendmail_path=/usr/local/sbin as well as -DDEF_SENDMAIL_PATH and while that changes the default value of sendmail_path, it still installs in /usr/sbin.

Background: last week, I finally upgraded one of my Macintoshes to Catalina (MacOS 10.15.6). I build Postfix from source. In this version, Apple has tightened down modifications to the system even more (it’s now on a read-only partition that normally only MacOS upgrade packages can modify). For the last few versions, if you turned off Apple’s System Integrity Protection (SIP), the Postfix make install | upgrade could install its version of the sendmail executable in /usr/sbin. With Catalina, now you also need to remount the root file system as writable (mount -uw /). I figure at some point Apple will find a way to stop that as well. And I don’t need the Postfix built sendmail in /usr/bin as I have Apple’s built-in Postfix configured to write to the same queue files so it works fine anyway.

--
Larry Stone
[hidden email]





Reply | Threaded
Open this post in threaded view
|

Re: Installing sendmail in non-default location

Larry Stone
> On Jul 27, 2020, at 11:05 AM, Larry Stone <[hidden email]> wrote:
>
> I’m trying to figure out how to tell make {install | upgrade} to install sendmail eleswhere? I tried sendmail_path=/usr/local/sbin as well as -DDEF_SENDMAIL_PATH and while that changes the default value of sendmail_path, it still installs in /usr/sbin.

Never mind (at least somewhat). I found after pouring through the install script that at least for upgrades, it looks at main.cf so once I changed it in main.cf, it installed sendmail to /usr/local/sbin as I wanted.

Which leads to a new question. In working on this, I modified my “make makefiles” to add a sendmail_path argument (which worked to change the default value) and later as I worked through this, a -DDEF_SENDMAIL_PATH to CCARGS. Do I need both in the “make makefiles” command? My full command is below (based on a template Viktor provided me years ago although I think he recommends something slightly different now).

make -f Makefile.init makefiles CCARGS='-DUSE_TLS -I/usr/local/ssl/include \
-DUSE_SASL_AUTH \
-DUSE_CYRUS_SASL \
-I/usr/local/include/sasl \
-DDEF_SERVER_SASL_TYPE=\"dovecot\"\
-DDEF_COMMAND_DIR=\"/usr/local/sbin\"\
-DDEF_SENDMAIL_PATH=\"/usr/local/sbin\"\
-DDEF_CONFIG_DIR=\"/usr/local/etc/postfix\"\
-DDEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"\
-DHAS_PCRE -I/usr/local/include' \
AUXLIBS='-L/usr/local/lib -lpcre -L/usr/local/ssl/lib -lssl -lcrypto \
-L/usr/local/lib -lsasl2' \
sendmail_path=/usr/local/sbin

Thanks.


Larry Stone
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Installing sendmail in non-default location

Viktor Dukhovni
On Mon, Jul 27, 2020 at 01:12:41PM -0500, Larry Stone wrote:

> Which leads to a new question. In working on this, I modified my “make
> makefiles” to add a sendmail_path argument (which worked to change the
> default value) and later as I worked through this, a
> -DDEF_SENDMAIL_PATH to CCARGS. Do I need both in the “make makefiles”
> command?

No, just a correct setting for sendmail_path, e.g.

    sendmail_path=/usr/local/sbin/sendmail

is enough.

> make -f Makefile.init makefiles CCARGS='-DUSE_TLS -I/usr/local/ssl/include \
> [...]
> -DDEF_SENDMAIL_PATH=\"/usr/local/sbin\"\

This is not correct, it lists the containing directory, rather than the
full path to the executable.

> [...]
> sendmail_path=/usr/local/sbin

This is not correct, it lists the containing directory, rather than the
full path to the executable.

--
    Viktor.
Reply | Threaded
Open this post in threaded view
|

Re: Installing sendmail in non-default location

Larry Stone

> On Jul 27, 2020, at 1:18 PM, Viktor Dukhovni <[hidden email]> wrote:
>
>
>> make -f Makefile.init makefiles CCARGS='-DUSE_TLS -I/usr/local/ssl/include \
>> [...]
>> -DDEF_SENDMAIL_PATH=\"/usr/local/sbin\"\
>
> This is not correct, it lists the containing directory, rather than the
> full path to the executable.
>
>> [...]
>> sendmail_path=/usr/local/sbin
>
> This is not correct, it lists the containing directory, rather than the
> full path to the executable.
>

Duh! And it was staring me in the face in the on-line documentation.

Anyway, thanks for the reply. All works as desired now.

--
Larry Stone
[hidden email]