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/

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

vi Makefile

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

and proceed

make

install

make install sendmail-link mailq-link install-spool-dirs install-etc
ls -lhF /usr/local/sbin/sendmail

you are now ready to proceed

Deploy manually

mkdir /etc/dma/
cp auth.conf dma.conf /etc/dma/

mkdir /var/spool/dma/
chmod 777 /var/spool/dma/
chmod +t /var/spool/dma/

ls -lhF /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
ln -s ../local/sbin/dma /usr/sbin/mailq

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/

Deploy manually into 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