eximrm

Here is a bash script to delete mails in exim mail queue. Helpful when you have lot of spam mails in mail queue.

Create file

Add

Make it executable

Monitor Server Mail Queue

Run following script every 1 hour to monitor/alert email queue

SASL authentication no mechanism available

When sending email from postfix mail sever that use mailgun for relaying mails, i get error

Jan 4 03:16:06 serverok-vm postfix/qmgr[22652]: 795731A8D: from=, size=820, nrcpt=1 (queue active)
Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: warning: SASL authentication failure: No worthy mechs found
Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: 795731A8D: SASL authentication failed; cannot authenticate to server smtp.mailgun.org[34.237.7.101]: no mechanism available
Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: warning: SASL authentication failure: No worthy mechs found
Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: 795731A8D: SASL authentication failed; cannot authenticate to server smtp.mailgun.org[34.232.180.42]: no mechanism available
Jan 4 03:16:06 serverok-vm postfix/smtp[24050]: warning: SASL authentication failure: No worthy mechs found

On checking postfix mail queue, the mail is stuck in queue

The problem is fixed by installing libsasl2-modules.

On Debian/Ubuntu

On RHEL/CentOS

Now restart postfix.

Transnational Email Providers

Amazon Simple Email Service

$0.10 per 1,000 emails sent. 65K free emails per month if you are hosted on EC2.

Disadvantage: You can only sent from @your-domain.extn, if you have a SAS application and need to sent from some other email address, you need domain added to SES and verified.

https://aws.amazon.com/ses/pricing/

ElasticEmail

Free plan allows you to send 150K emails per month.

Disadvantage: All outgoing email must include physical address.

https://elasticemail.com

MailGun

First 10K emails for Free every month. Pay as you go pricing. After 10K free email, you will be charged $0.00050 per email.

https://www.mailgun.com

MailJet

Free account allow you to send 6,000/- email per month. Monthly plan start at $7.49 per month for 30k emails.

https://www.mailjet.com

SparkPost

50K Emails for $9 per month. If you are on AWS, you can get it cheaper from marketplace.

https://www.sparkpost.com

SendGrid

40K email per month for $9.95 per month.

https://sendgrid.com