Drupal mail problem - Greylisting in action I'm not sure how to solve this one and even not sure if it's a drupal issue or misconfiguration.

I'm running a Drupal site (7.22) and have huge problems with the sending mails. Most of the mails can't be delivered and I (the admin) get immediately a Mail Delivery System message:


  This is the mail system at host OUR_MAIL_HOST.
  
  I'm sorry to have to inform you that your message could not be
  delivered to one or more recipients. It's attached below.
  
  For further assistance, please send mail to postmaster.
  
  If you do so, please include this problem report. You can delete your
  own text from the attached returned message.

              The mail system

  
  : host
  USER_MAIL_HOST said: 450 4.7.1
  : Client host rejected: Policy
  Rejection-    Greylisting in action; Please try again later. (in reply
  to RCPT TO    command) Reporting-MTA: dns; OUR_MAIL_HOST
  X-Postfix-Queue-ID: D8047189CE9 X-Postfix-Sender: rfc822;
  admin@mail Arrival-Date: Wed, 26 Feb 2014 08:22:24 +0100
  (CET)
  
  Final-Recipient: rfc822; user@mail
  Action: failed Status: 4.7.1 Remote-MTA: dns;
  USER_MAIL_HOST Diagnostic-Code: smtp; 450 4.7.1
  &lt; OUR_MAIL_HOST[OUR_MAIL_HOST_IP]>: Client host    rejected: Policy
  Rejection- Greylisting in action; Please try again later.
  
  The original mail content...


So to get a mail through this greylisting-filter requires sending the mail again, but I don't know whether it should be done via Drupal or via the mail server? The admins of the mail server told me to send the mail again, but this means, I have to tell Drupal to send each mail twice if it gets greylisted. This sounds pretty odd to me and I'm sure there is a clean solution. So any ideas? I'm sure I'm not the only one with such a problem.
In your setup PHP mail() sends mail, but it's your mailserver who gets "false rejection" notification - possibly a different machine, and even if the same machine, it's totally separate system. PHP mail() never receives anything, so it can't resend. And your mailserver never sent it, so it can't resend, either.

Simplest way to fix it is to use SMTP module


  This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP.


PHPmailer module


  The main differences to the SMTP module are:
  
  
  Integration with Mime Mail module
  Improved bulk-mail performance through SMTP keep-alive connections (if supported by the mail server)
  Built-in e-mail rerouting option (useful during site building and development)
  


or similar solutions, there are a few more.

That way your Drupal will only need to send mail once, and your outgoing mail server will take care about graylists - most of them are configured in a way that works with graylist receiving servers out of the box.