Notes on Sendmail
These notes are from the various README files that come with HC8. I put them here because the formatting of the provided files bugged me and it is easier to follow this way.
- You can use the /usr/local/hostingcontroller/config/sendmail/sendmail.mc file provided with the hostingcontroller. In case you want to use your own sendmail.mc file then add following line at the end of your sendmail.mc file and regenerate the sendmail.cf file using m4 or make utility.
- If you have given your machine the mail server role, then whenever you will update its mail server role (updating any information) from panel hostingcontroller will replace your sendmail.cf file with the one provided by hostingcontroller. If you want that hostingcontroller should not replace your sendmail.cf file then replace the file /usr/local/hostingcontroller/config/sendmail.cf with your sendmail.cf file.
Pop-before-smtp provides a mechanism to authenticate user before he is allowed to send emails. For this to work user has to pop his emails once before sending his emails. To configure pop-before-smtp follow following instructions
- In your sendmail.mc file add following lines at the end of file
- regenerate sendmail.cf file from sendmail.mc file. You can use m4 or make utility to generate it.
- restart sendmail
- create directory /usr/local/scripts/hc/sendmail with following command
$ mkdir -p /usr/local/scripts/hc/sendmail
- copy popauthor.pl and popauthorCH files from directory /usr/local/hostingcontroller/config/sendmail/pop-before-smtp to directory /usr/local/scripts/hc/sendmail/
- copy /usr/local/hostingcontroller/config/sendmail/pop-before-smtp/S95popauthor file in rc3.d and rc5.d directories, usually located in /etc/rc.d/ directory
- make following entry in file /var/spool/cron/root
*/2 * * * * /usr/local/scripts/hc/sendmail/popauthorCH
- create directory /var/spool/popauth with following command
$ mkdir -p /var/spool/popauth
- In syslog configuration file usually /etc/rsyslog.conf or /etc/syslog.conf, write following line at the end of file (use tabs, not spaces!)
- restart syslog
- start popauthor.pl with following command
$ /usr/local/scripts/hc/popauthor &
- restart crond with follwoing command
$ /etc/init.d/crond restart