Running our sendmail mail relay in a chroot jail, ‘make’ does not update sendmail config files with changes. While I’m certain there’s a way to sort that, it’s a lot easier to go back to the old-school way of updating sendmail.cf and sendmail’s hash files.
Modifying Sendmail Configuration (sendmail.mc) on Servers with CHROOT Jailed Sendmail
- SSH to server using your ID
- Change to the sendmail service account (e.g. sudo /bin/su – sendmail)
- Change directory to the jailed sendmail /etc/mail locatio (e.g. cd /smt00p20/sendmail/etc/mail)
- vi sendmail.mc
- Make requisite changes and save file
- m4 sendmail.mc > sendmail.cf
- Under your ID, restart sendmail using “sudo systemctl stop sendmail stop;sudo systemctl start sendmail”
- Validate changes
Modifying Sendmail Data Files on Servers with CHROOT Jailed Sendmail
- SSH to server using your ID
- Change to the sendmail service account (e.g. sudo /bin/su – sendmail)
- Change directory to the jailed sendmail /etc/mail locatio (e.g. cd /smt00p20/sendmail/etc/mail)
- vi filetoedit
- Make requisite changes and save file
- makemap hash ./filetoedit.db < ./filetoedit
- Under your ID, restart sendmail using “sudo systemctl stop sendmail stop;sudo systemctl start sendmail”
- Validate changes
Where filetoedit is the name of the data file. For example, run “makemap hash ./access.db < ./access” to update the changes to the access file into access.db