Skip to main content

Sendmail

Configure Sendmail with Sendgrid for SmartHost Mail Relay

Submitted by system on
Set the authorization credentials in /etc/mail/access AuthInfo:smtp.sendgrid.net "U:apikey" "P:" "M:PLAIN"
Define the Smart Host in /etc/mail/sendmail.mc. You should add these lines just after the commented
\#dnl define('SMART_HOST', 'smtp.your.provider')dnl
line in the file. In Ubuntu these would be the last lines added to the file. define(`SMART_HOST', `smtp.sendgrid.net')dnl
FEATURE(`access_db')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl

Sendmail

Submitted by amitsedai on
You can use the mailq command sendmail -bp command to display a summary of the mail messages queued for future delivery. mailq
OR sendmail -bp
Remove all queued mails from: /var/spool/mqueue cd /var/spool/mqueue/
ls
rm *

-- Source http://www.cyberciti.biz/faq/linux-unix-bsd-clear-sendmail-queue/

Clear Sendmail Queue

Submitted by system on
To clear the sendmail queue, one can manually delete the contents of the folder: /var/spool/mqueue. To see the contents of the queue,one can type the command.
mailq
-- Source: http://www.cyberciti.biz/faq/linux-unix-bsd-clear-sendmail-queue/