Linux - Sendmail configuration and control, Find mail queue in sendmail
Sendmail configuration and control
The below command's helps you after configuring the sendmail.
|Examples||What it does|
|sendmail -bp or mailq||Displays the status of the mail queue. List Email files waiting to be sent and incoming.|
|ps ax | grep sendmail||Lists the process status of the sendmail daemon. May display something like....... sendmail: accepting connections on port 25|
|sendmail -bi or newaliases||Rebuilds the aliases database. Should be run after any changes are made to the alias file.|
Run the below commands after configuring the sendmail
cd /etc/mail /usr/bin/make /usr/bin/newaliases /etc/init.d/sendmail restart /etc/init.d/spamassassin restart
The make command will create a new sendmail.cf file from the sendmail.mc file and compiles supporting configuration file in the /etc/mail directory according to the instructions in the file /etc/mail/Makefile.
The newaliases command generates new e-mail aliases, the newaliases and m4 commands require the sendmail-cf and m4 RPM packages. All theses packages must be installed. If they are not installed then, you'll get errors when running various sendmail related commands.
The sendmail command restarts the sendmail service.
The spamassassin restarts the spamassassin service, if it is installed.
Rebuild the new sendmail.cf file from the sendmail.mc using either the Makefile in the configuration directory or by issuing the command
m4 sendmail.mc > /etc/sendmail.cf OR cd /etc/mail /usr/bin/make
Find the status of mail sent in your server using grep command from the maillog
/var/log/maillog | grep mail_id
Find the status of mail sent in your server using grep command if you are using exim mail server
/var/log/exim_log | grep mail_id
Hope this will be handy for you folks :-)
The topic on Linux - Sendmail configuration and control is posted by - Math
Hope you have enjoyed, Linux - Sendmail configuration and controlThanks for your time