I found the following errors after installing sendmail:
apt-get install sendmail:
Errors in generating sendmail.cf *** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`always_add_domain')*** ERROR: FEATURE() should be before MAILER() *** MAILER(`local') must appear after FEATURE(`allmasquerade')*** ERROR: FEATURE() should be before MAILER() Starting Mail Transport Agent (MTA): sendmail. Setting up sensible-mda (8.14.3-9.4) ... Setting up sendmail (8.14.3-9.4) ...
Apparently sendmail.cf located at /etc/mail/sendmail.cf is automatically generated. To fix the issue, edit /etc/mail/sendmail.mc
#grep -in FEATURE\(\`always_add_domain\'\) ./etc/mail/sendmail.mc 106:FEATURE(`always_add_domain')dnl #grep -in MAILER ./etc/mail/sendmail.mc 100:dnl # Default Mailer setup 101:MAILER_DEFINITIONS 102:MAILER(`local')dnl 103:MAILER(`smtp')dnl
I edited the lines from #100, and switched the positions of the MAILER and FEATURE tags.
Once edited, sendmail.cf should be autoregenerated with:
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.