Building DMA

Easy install

git clone https://github.com/corecode/dma.git
cd dma/

#wget https://github.com/corecode/dma/archive/v0.13.tar.gz
#tar xzf v0.13.tar.gz
#rm -f v0.13.tar.gz
#cd dma-0.13/

local libressl

in case you have libressl in /usr/local/lib/

vi Makefile

LDADD?=         -lssl -lcrypto -lresolv -L/usr/local/lib

alpine linux

draft

apk add bsd-compat-headers openssl-dev libbsd libbsd-dev flex bison
#apk add libressl libressl3.7-libcrypto libressl3.7-libssl libressl3.7-libtls

shared

and proceed

make

install

make install
make install-etc
# sendmail-link
# mailq-link
# install-spool-dirs

deploy the rest manually

ls -lF /usr/sbin/sendmail
mv /usr/sbin/sendmail /usr/sbin/sendmail.dist
chmod -x /usr/sbin/sendmail.dist
ln -s ../local/sbin/dma /usr/sbin/sendmail

ls -lF /usr/sbin/mailq # no exist
ln -s ../local/sbin/dma /usr/sbin/mailq

mkdir /etc/dma/
cp auth.conf dma.conf /etc/dma/
    mkdir /var/spool/dma/
    chown root:mail /var/spool/dma/
    chmod 775 /var/spool/dma/

    touch /var/spool/dma/flush
chown root:mail /var/spool/dma/flush
    chmod 660 /var/spool/dma/flush

you are now ready to proceed

Additional notes

uninstall

find /usr/local/ -ctime -1 -print
rm -f /usr/local/lib/dma-mbox-create /usr/local/share/man/man8/dma.8 /usr/local/sbin/sendmail /usr/local/sbin/dma /usr/local/sbin/mailq
rmdir /usr/local/lib/
rmdir /usr/local/share/man/man8/

rmdir /var/spool/dma/
rm -rf /etc/dma/

within a container

cp dma /data/instances/moodlenew/rootfs/usr/sbin/
ln -s dma /data/instances/moodlenew/rootfs/usr/sbin/mailq
ln -s dma /data/instances/moodlenew/rootfs/usr/sbin/sendmail
mkdir /data/instances/moodlenew/rootfs/etc/dma/
cp auth.conf dma.conf /data/instances/moodlenew/rootfs/etc/dma/

cp -a /usr/local/lib/libssl.so.48 /usr/local/lib/libssl.so.48.0.1 /data/instances/moodlenew/rootfs/usr/lib/
cp -a /usr/local/lib/libcrypto.so.46 /usr/local/lib/libcrypto.so.46.0.1 /data/instances/moodlenew/rootfs/usr/lib/
chroot /data/instances/moodlenew/rootfs/ ldconfig

mkdir /data/instances/moodlenew/rootfs/var/spool/dma
chmod 777 /data/instances/moodlenew/rootfs/var/spool/dma/
chmod +t /data/instances/moodlenew/rootfs/var/spool/dma/

Resources

Undefined reference to SSL_library_init and SSL_load_error_strings https://stackoverflow.com/questions/5593284/undefined-reference-to-ssl-library-init-and-ssl-load-error-strings

https://github.com/corecode/dma/blob/master/Makefile

https://packages.debian.org/testing/dma


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