/var/log/mail.log getting huge

Around last month, I googled how to Install Config Server Firewall (CSF) and then I found link https://www.tecmint.com/install-config-server-firewall-debian-ubuntu/

That tutorial asks me to install some dependencies, like sudo apt install wget libio-socket-ssl-perl git perl iptables libnet-libidn-perl libcrypt-ssleay-perl  libio-socket-inet6-perl libsocket6-perl sendmail dnsutils unzip before I proceed to install the config server firewall (csf).

And yesterday after I found a ncdu program  (it can analyze my entire / disk on Linux), which I posted here. I noticed a huge size of my /var/log/mail.log.

https://ns1.my.id/unggah/2023/03/varmaillog-huge.jpg

Welp, no wonder there is a notification in my server motd (message of the day) after logging in SSH.

=> / is using 85.7% of 9.71GB

I try to check the last 10 lines on /var/mail.log with tail command:

root@ariq01:/var/log# tail -10 mail.log
Mar  2 17:07:41 ariq01 sm-mta[5949]: 31SD1UNW3699135: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Mar  2 17:07:41 ariq01 sm-mta[4904]: 31SD1UNW3699135: to=<root@ariq01>, ctladdr=<root@ariq01> (0/0), delay=2+04:06:11, xdelay=00:00:00, mailer=local, pri=28200808, dsn=4.0.0, stat=Operating system error
Mar  2 17:07:41 ariq01 sm-mta[5950]: 31SD5UHN3699167: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory
Mar  2 17:07:41 ariq01 sm-mta[5950]: 31SD5UHN3699167: SYSERR(root): Cannot exec /usr/sbin/sensible-mda: No such file or directory
Mar  2 17:07:41 ariq01 sm-mta[4904]: 31SD5UHN3699167: to=<root@ariq01>, ctladdr=<root@ariq01> (0/0), delay=2+04:02:11, xdelay=00:00:00, mailer=local, pri=28200812, dsn=4.0.0, stat=Operating system error
Mar  2 17:07:41 ariq01 sm-mta[5951]: 31SCMTNE3696624: Warning: program /usr/sbin/sensible-mda unsafe: No such file or directory

A ton of these messages filled up my mail log.

How to fix this

So, in order to fix this, I have to install sensible-mda on my VPS.

apt install sensible-mda

This question was asked 13 years, 6 months ago (around 2009) by somebody too in server fault. 😁

What is sensible mda

sensible-mda  is  used  to simplify the installation and configuration of sendmail(8) , or other MTAs for use on Debian systems.  With sensible-mda, sendmail can support a  plethora of  MDAs  (procmail,  maildrop,  deliver,  etc.)  without  having  pick any one of them as required.
sensible-mda is called by sendmail  as  a  local  mailer  when  the  following  exists  in sendmail.mc: define(`LOCAL_MAILER_ARGS', `sensible-mda $g $u $h ${client_addr}')dnl sensible-mda will look for the following MDAs (in this order), and pass the mail on to the first SUID MDA found (Or first found MDA, if run w/euid=root):  procmail(1),  maildrop(1), deliver(8), mail.local(8)
Ubuntu Manpage: sensible-mda - a generic local MDA router for Debian systems

Turns out I need to Read The Friendly Manual then 😃


My previous post [Simple: Install and Configure CSF] didn't explain how to install and configure sendmail as a way to send CSF/LFD notifications, maybe I'll try to create a post later about it.

Anyway, thanks for reading!