Conflict between DA's Exim and mailutils/bsd_mailx breaks cronjob mail & mail command

HolyDiver

Verified User
Joined
Feb 21, 2016
Messages
50
Conflict between DA's Exim and mailutils/bsd_mailx breaks cronjob mail & mail command

Hi,

I noticed my DA cronjobs weren't sending out e-mails anymore for a while. The mail command in command line stated mail command was not found. According to syslog there is no MTA installed (Exim is installed which apparently doesn't count?)

root@server1:~# mail -V
bash: /usr/bin/mail: No such file or directory
root@server1:~# tail /var/log/syslog
Oct 26 19:10:02 server1 CRON[8659]: (CRON) info (No MTA installed, discarding output)
I installed the Debian "mailutils" package and it works again. But for some reason the Exim installation of DA gets downgraded to 4.89 and prompts me to update to 4.92.3. Doing so apparently damages the mailutils package

root@server1:~# apt install mailutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
exim4-base exim4-config exim4-daemon-light guile-2.0-libs libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0
Suggested packages:
eximon4 exim4-doc-html | exim4-doc-info spf-tools-perl swaks mailutils-mh mailutils-doc
The following NEW packages will be installed:
exim4-base exim4-config exim4-daemon-light guile-2.0-libs libgc1c2 libgsasl7 libkyotocabinet16v5 libmailutils5 libntlm0 mailutils
0 upgraded, 10 newly installed, 0 to remove and 0 not upgraded.
Need to get 6,369 kB of archives.
root@server1:~# usr/local/directadmin/custombuild/build exim
[...]
(Reading database ... 86515 files and directories currently installed.)
Removing exim4-daemon-light (4.89-2+deb9u6) ...
Removing exim4-base (4.89-2+deb9u6) ...
Removing exim4-config (4.89-2+deb9u6) ...
Processing triggers for man-db (2.7.6.1-2) ...
(Reading database ... 86381 files and directories currently installed.)
Purging configuration files for exim4-base (4.89-2+deb9u6) ...
Purging configuration files for exim4-config (4.89-2+deb9u6) ...
The cronjob mails and mail command in command line produce these errors now

root@server1:~# echo "Test" | mail -s "Test Title" ********************@gmail.com
mail: Cannot open mailer: No such file or directory
mail: cannot send message: No such file or directory
I noticed bsd-mailx is mentioned on DA's pre installation guide for Debian, but that will also prompt that DA's exim is downgraded and needs to be updated which will break bsd-mailx

root@server1:~# apt install bsd-mailx -s
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
exim4-base exim4-config exim4-daemon-light liblockfile-bin liblockfile1
Suggested packages:
eximon4 exim4-doc-html | exim4-doc-info spf-tools-perl swaks
The following NEW packages will be installed:
bsd-mailx exim4-base exim4-config exim4-daemon-light liblockfile-bin liblockfile1
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
I'm stuck in a loop :/
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,340
Location
LT, EU
It's been fixed in CustomBuild 2.0 rev. 2254, just run "./build exim" using it. Thank you for the report! :)
 

HolyDiver

Verified User
Joined
Feb 21, 2016
Messages
50
Something went wrong running "./build exim" (errors I haven't seen before), but both mailutils/mail as DA's Exim seem to be working as they should now.

make[1]: Entering directory '/usr/local/directadmin/custombuild/s-nail-14.9.15/.ob
j'
CC mx-001.o
CC mx-002.o
CC mx-003.o
[...]
CC mx-067.o
CC mx-068.o
CC mx-069.o

/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:248:18: error: 'SS L_OP_NO_TLSv1_3' undeclared here (not in a function)
{"TLSv1.3\0", SSL_OP_NO_TLSv1_3, TLS1_3_VERSION, TRU1, TRU1, FAL0, {0}},
^~~~~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:248:37: error: 'TL S1_3_VERSION' undeclared here (not in a function)
{"TLSv1.3\0", SSL_OP_NO_TLSv1_3, TLS1_3_VERSION, TRU1, TRU1, FAL0, {0}},
^~~~~~~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:248:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"TLSv1.3\0", SSL_OP_NO_TLSv1_3, TLS1_3_VERSION, TRU1, TRU1, FAL0, {0}},
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:249:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"TLSv1.2", SSL_OP_NO_TLSv1_2, TLS1_2_VERSION, TRU1, TRU1, FAL0, {0}},
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:250:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"TLSv1.1", SSL_OP_NO_TLSv1_1, TLS1_1_VERSION, TRU1, TRU1, FAL0, {0}},
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:251:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"TLSv1", SSL_OP_NO_TLSv1, TLS1_VERSION, TRU1, TRU1, FAL0, {0}},
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:252:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"SSLv3", SSL_OP_NO_SSLv3, SSL3_VERSION, TRU1, TRU1, FAL0, {0}},
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:253:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"SSLv2", SSL_OP_NO_SSLv2, SSL2_VERSION, TRU1, TRU1, FAL0, {0}},
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:254:4: warning: mi ssing initializer for field 'xp__dummy' of 'const struct a_xtls_protocol' [-Wmissi ng-field-initializers]
{"None", SSL_OP_NO_SSL_MASK, 0, TRU1, FAL0, TRU1, {0}}
^
/usr/local/directadmin/custombuild/s-nail-14.9.15/src/mx/xtls.c:216:7: note: 'xp__ dummy' declared here
u8 xp__dummy[3];
^~~~~~~~~
mk-config.mk:415: recipe for target 'mx-069.o' failed
make[1]: *** [mx-069.o] Error 1
make[1]: Leaving directory '/usr/local/directadmin/custombuild/s-nail-14.9.15/.obj '
makefile:24: recipe for target 'build' failed
make: *** [build] Error 2
Done!
 
Last edited:

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,340
Location
LT, EU
Do you have a custom-compiled version of OpenSSL on your system?
 

HolyDiver

Verified User
Joined
Feb 21, 2016
Messages
50
Only Nginx uses a custom version of OpenSSL, the rest of the system uses the default OpenSSL version of Debian 9.

root@server1:~# openssl version
OpenSSL 1.1.0l 10 Sep 2019
root@server1:~# nginx -V
nginx version: nginx/1.17.4
built by gcc 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)
built with OpenSSL 1.1.1d 10 Sep 2019
 
Last edited:

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,340
Location
LT, EU
Fixed in CB 2.0 rev. 2257. It affected debian9 only. Thank you for the report!
 

HolyDiver

Verified User
Joined
Feb 21, 2016
Messages
50
Thanks, all works perfectly now. One question though; "build exim" apparently installs s-nail along with exim, do I still need mailutils installed?

root@server1:~# which mail
/usr/local/bin/mail

root@server1:~# ls -lah /usr/local/bin/mail
lrwxrwxrwx 1 root staff 21 Oct 30 09:03 /usr/local/bin/mail -> /usr/local/bin/s-nail
 

smtalk

Administrator
Staff member
Joined
Aug 22, 2006
Messages
8,340
Location
LT, EU
Thanks, all works perfectly now. One question though; "build exim" apparently installs s-nail along with exim, do I still need mailutils installed?
s-nail takes priority over /usr/bin/mail (so, you may remove deb package of it, if you’d like to).
 
Top