Building Exim

tested on Slackware current (Jan 2021)

Requirements

slackpkg install db48 libtool
sbopkg -i libspf2
sbopkg -i opendmarc

Build & install

Grab from UK/https or the nearest mirror

wget https://ftp.exim.org/pub/exim/exim4/exim-4.94.tar.gz
wget https://ftp.exim.org/pub/exim/exim4/exim-4.94.tar.gz.asc
gpg --recv-keys E41F32DF
gpg --verify exim-4.94.tar.gz.asc
# Primary key fingerprint: A986 F3A6 BD63 77D8 7309  58DE BCE5 8C8C E41F 32DF

Create a user for the Makefile to be happy

groupadd -g 362 opendmarc
useradd -r -u 362 -d /var/run/opendmarc -g opendmarc -s /sbin/nologin opendmarc

groupadd -g 31 exim
useradd -r -u 31 -d /dev/null -g exim -G opendmarc -s /sbin/nologin exim

Extract and prepare the Makefile

tar xzf exim-4.94.tar.gz
cd exim-4.94/
grep -vE '^[[:space:]]*(#|$)' src/EDITME > Local/Makefile
vi Local/Makefile

change those

BIN_DIRECTORY=/usr/local/bin
CONFIGURE_FILE=/etc/exim/configure
EXIM_USER=exim
# EXIM_USER=ref:exim

and add those – assuming libressl is installed into /usr/local/

SUPPORT_SPF=yes
CFLAGS  += -I/usr/local/include
LDFLAGS += -lspf2

SUPPORT_DMARC=yes
CFLAGS += -I/usr/local/include
LDFLAGS += -lopendmarc

USE_OPENSSL=yes
TLS_LIBS=-L/usr/local/lib -lssl -lcrypto

make makefile
make

mkdir /etc/exim/
make install

Trash

You need LIBSPF2 to begin with

wget https://www.libspf2.org/spf/libspf2-1.2.10.tar.gz
tar xzf libspf2-1.2.10.tar.gz
cd libspf2-1.2.10/
./configure
make

spf_compile.c: In function 'SPF_c_parse_macro':
../../src/include/spf_log.h:66:86: error: expected expression before ')' token
   66 | #define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, __VA_ARGS__ )
      |                                                                                      ^
spf_compile.c:580:5: note: in expansion of macro 'SPF_debugf'
  580 |     SPF_debugf("Adding literal %%");
      |     ^~~~~~~~~~
../../src/include/spf_log.h:66:86: error: expected expression before ')' token
   66 | #define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, __VA_ARGS__ )
      |                                                                                      ^
spf_compile.c:589:5: note: in expansion of macro 'SPF_debugf'
  589 |     SPF_debugf("Adding literal space");
      |     ^~~~~~~~~~
../../src/include/spf_log.h:66:86: error: expected expression before ')' token
   66 | #define SPF_debugf(format, ... ) SPF_debugx( __FILE__, __LINE__, format, __VA_ARGS__ )

HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun