Thanks Viktor. I have a compile…
I’ve had to make a couple of very small changes.
The queue directory is missing the “/“ in front of var. and I added in the
sasl2 stuff. I’m rebuilding this so that I’m not having to use macports - only
Homebrew things, and the native Apple libraries in the case of SASL. I can’t
locate any others for now that I feel will work. There probably is, but it’s an
ongoing project.
I have a running Postfix with all the stuff like dovecot, spamassassin etc etc.
so this is going to be the postfix replacement.
Thank you so much for your help. Brilliant. I was getting quite lost in my
Makefile collection.
I’m presuming I can stuff all this into a shell script?
This is my version.
set -- '-DUSE_TLS -I/usr/local/opt/openssl/include'
set -- "$@" '-I/usr/local/opt/icu4c/include'
set -- "$@" '-DHAS_MYSQL -I/usr/local/include/mysql'
set -- '-DHAS_PCRE -I/usr/local/include'
set -- "$@" '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL
-DDEF_SERVER_SASL_TYPE=\"dovecot\"
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sasl'
CCARGS="$@"
set -- '-lsasl2'
set -- "$@" '-L/usr/local/opt/openssl/lib -lssl -lcrypto'
set -- "$@" '-L/usr/local/lib -ldb'
set -- "$@" '-L/usr/lib -lsasl2'
set -- "$@" '-L/usr/local/opt/icu4c/lib -licuuc'
AUXLIBS="$@"
make -f Makefile.init shared=yes dynamicmaps=yes \
config_directory=/usr/local/etc/postfix \
command_directory=/usr/local/sbin \
daemon_directory=/usr/local/libexec/postfix \
queue_directory=/var/spool/postfix \
data_directory=/var/lib/postfix \
html_directory=/usr/share/doc/postfix/html \
manpage_directory=/usr/local/man \
readme_directory=/usr/share/doc/postfix \
mailq_path=/usr/local/bin/mailq \
newaliases_path=/usr/local/bin/newaliases \
sendmail_path=/usr/local/sbin/sendmail \
"CCARGS=${CCARGS}" \
"AUXLIBS=${AUXLIBS}" \
'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm' \
'AUXLIBS_PCRE=-L/usr/local/lib -lpcre'
=============================================
> On 19 Nov 2018, at 17:16, Viktor Dukhovni <[email protected]> wrote:
>
> On Mon, Nov 19, 2018 at 03:42:51PM +0000, Robert Chalmers wrote:
>
>> make -f Makefile.init dynamicmaps=yes CCARGS='-DHAS_MYSQL
>> -I/usr/local/include/mysql -I/usr/local/include -I/usr/local/include/openssl
>> -I/usr/local/include/gnutls -DUSE_TLS -DUSE_SASL_AUTH -DUSE_CYRUS_SASL
>> -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sasl
>> -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DHAS_PCRE -I/usr/local/include
>> -DEF_COMMAND_DIR=\"/usr/local/sbin\"
>> -DEF_CONGIG_DIR=\"/usr/local/etc/postfix\"
>> -DEF_DAEMON_DIR=\"/usr/local/libexec/postfix\"
>> -DEF_DATA_DIR=\"/var/lib/postfix\" -DEF_MAILQ_PATH=\"/usr/local/bin/mailq\"
>> -DEF_HTML_DIR=\"/usr/share/doc/postfix/html\"
>> -DEF_MANPAGE_DIR=\"/usr/local/man\"
>> -DEF_NEWALIAS_PATH=\"/usr/local/bin/newaliases\"
>> -DEF_QUEUE_DIR=\"/private/var/spool/postfix\"
>> -DEF_README_DIR=\"/usr/share/doc/postfix\"
>> -DEF_SENDMAIL_PATH=\"/usr/local/sbin/sendmail\"' 'AUXLIBS=-L/usr/lib -lsasl2
>> -L/usr/local/opt/openssl/lib -lssl -lcrypto -L/usr/local/lib -ldb -lpcre
>> -L/usr/lib' 'AUXLIBS_IUUC=-L/usr/local/Cellar/icu4c/62.1/lib -licuuc'
>> 'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm'
>> 'AUXLIBS_PCRE=-L/usr/local/lib -lpcre'
>
> Change the above to:
>
> # There's no need to mention "-I/usr/local/include" multiple times.
> #
> set -- '-DUSE_TLS -I/usr/local/opt/openssl/include'
> set -- "$@" '-I/usr/local/opt/icu4c/include'
> set -- "$@" '-DHAS_MYSQL -I/usr/local/include/mysql'
> set -- '-DHAS_PCRE -I/usr/local/include'
> set -- "$@" '-DUSE_SASL_AUTH -DUSE_CYRUS_SASL
> -DDEF_SERVER_SASL_TYPE=\"dovecot\"'
> CCARGS="$@"
>
> # Do not use "-lprcre" in "AUXLIBS" when using "AUXLIBS_PCRE" for
> # dynamic_maps=yes. There is no "AUXLIBS_IUUC", the libraries for
> # Unicode support go into AUXLIBS, and include files into CCARGS.
> # When using "-L/usr/local/opt/openssl/lib" for the homebrew
> # OpenSSL libraries, also use "-I/usr/local/opt/openssl/include"
> # for the corresponding headers. Do not use ".../include/openssl",
> # rather use ".../include", because the OpenSSL headers are included
> # as "<openssl/ssl.h>", ....
> #
> set -- '-lsasl2'
> set -- "$@" '-L/usr/local/opt/openssl/lib -lssl -lcrypto'
> set -- "$@" '-L/usr/local/lib -ldb'
> set -- "$@" '-L/usr/local/opt/icu4c/lib -licuuc'
> AUXLIBS="$@"
>
> # Do you also need overrides for:
> #
> # shlib_directory ?
> # meta_directory ?
> #
> make -f Makefile.init shared=yes dynamicmaps=yes \
> config_directory=/usr/local/etc/postfix \
> command_directory=/usr/local/sbin \
> daemon_directory=/usr/local/libexec/postfix \
> queue_directory=var/spool/postfix \
> data_directory=/var/lib/postfix \
> html_directory=/usr/share/doc/postfix/html \
> manpage_directory=/usr/local/man \
> readme_directory=/usr/share/doc/postfix \
> mailq_path=/usr/local/bin/mailq \
> newaliases_path=/usr/local/bin/newaliases \
> sendmail_path=/usr/local/sbin/sendmail \
> "CCARGS=${CCARGS}" \
> "AUXLIBS=${AUXLIBS}" \
> 'AUXLIBS_MYSQL=-L/usr/local/lib -lmysqlclient -lz -lm' \
> 'AUXLIBS_PCRE=-L/usr/local/lib -lpcre'
>
> --
> Viktor.
Robert Chalmers
https://robert-chalmers.uk
[email protected]
@R_A_Chalmers