TempestWindblown
TempestWindblown

Reputation: 41

Postfix integrated with SendGrid, but has since stopped sending email

I am running a CentOS server with Plesk. Several weeks ago, I set up Postfix to integrate with SendGrid using the instructions here. At the time, this worked without problems.

More recently, the server has stopped sending any emails. When I use the PHP mail() function, it returns true, but the maillog only shows the following two lines:

Mar  2 02:21:48 mercury plesk sendmail[19314]: handlers_stderr: SKIP
Mar  2 02:21:48 mercury plesk sendmail[19314]: SKIP during call 'check-quota' handler

SendGrid's activity page shows that it never receives the emails in question. I tried googling the issue, but haven't found anything that could help.

I originally thought that the second line in the error log might mean that there is a quota on how many emails can be sent, and then it ignores the rest. However, I cannot find any such quota. (The 'Switch on limitations on outgoing email messages' section in Plesk's mail settings is currently disabled.)

Since asking this question, I've tried resetting the server to its previous configuration. I've noticed that the maillog still contains those two lines above, but it continues to print more information. I now suspect that they are not related to the problem, but are just the information that postfix had printed before it stopped, for whatever reason.

Since resetting the postfix settings, a large number of emails have appeared in Plesk's Mail Queue tab which weren't there before. It looks like the server had kept track of these emails, and when it stopped trying to send them to SendGrid, it instead dumped them in the normal mail queue. These emails have been slowly clearing out since.

For now, I've got emails working again, but I do need to go back to using SendGrid. Is there a way to debug why relaying to SendGrid had stopped working?

Upvotes: 1

Views: 526

Answers (1)

Elvis Plesky
Elvis Plesky

Reputation: 3300

SKIP during call 'check-quota' handler message just means that the sender is unknown and this message will not be counted towards the set outgoing mail limit. It is not preventing mail from being sent.

The messages are stuck in the queue because they cannot be relayed to SendGrid. Therefore I suggest checking SendGrid email activity feed for corresponding messages.

If nothing is there too, that might mean that there are some network connectivity issues between the server and SendGrid. You can also limit queue lifetime on the server side to get the additional messages in Postfix mail log to troubleshoot further. From Postfix documentation:

bounce_queue_lifetime (default: 5d)

    Consider a bounce message as undeliverable, when delivery fails with a temporary error, and the time in the queue has reached the bounce_queue_lifetime limit. By default, this limit is the same as for regular mail.
    Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks). The default time unit is d (days).
    Specify 0 when mail delivery should be tried only once.
    This feature is available in Postfix 2.1 and later.

Upvotes: 0

Related Questions