Mail collection - Sendmail program




Sendmail is a mail delivery agent. Its job is to take mail from various programs and pass it on to another system, or handle it appropriately on the local system.

Sendmail is a very complicated program and its configuration is notoriously complex. You will find that you have sendmail on your Linux CDs, and if it is installed, its configuration file will be installed with it. It is probably safer to leave it alone if you don't understand it! You will find that it will handle mail delivery quite adequately unless you have a peculiar setup.

If you want to change your configuration but don't understand it, you could use linuxconf, which also handles other system administration tasks.

Setting up sendmail for automatic mail collection

If you have installed sendmail, you should find that it is started up at boot time. You ought to have this section in the file /etc/rc.d/rc.M (Slackware Linux systems):
# Start the sendmail daemon:
if [ -x /usr/sbin/sendmail ]; then
  echo "Starting sendmail daemon (/usr/sbin/sendmail -bd -q 15m)..."
  /usr/sbin/sendmail -bd -q 15m
fi
This runs sendmail as a daemon (that is, it runs in the background, disconnected from any terminal session) and has it process its queue every 15 minutes.

Of course, if your system is not connected to your ISP, sendmail will not be able to send mail out; it will hold it in its queue and will keep trying to send it. You can check what mail is waiting to go out by the command

sendmail -bp
In order to get mail sent out, you have to make sure that sendmail processes its queue while your connection to the ISP is open. To do this, include the command
sendmail -q
in your automatic mail script.

Up to my Automatic mail collection and delivery page

Last updated on 27th October 1996 by Oliver Elphick