Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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 < 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.

share|improve this question
    
I would say it's the responsibility of the mail server to perform any necessary re-distribution. That's certainly how ours is set up –  Clive Mar 3 at 14:08
    
@Clive but if he sends directly, with php mail(), without using outgoing mailserver (no Drupal module to do so, no mail proxy, nothing), it simply cannot work that way. His mailserver does not know about mails sent from Drupal, so it can't re-send them. septi, am I right? If no, please elaborate, edit your question with more details. –  Mołot Mar 3 at 14:10
    
@Mołot I read it wrong, was thinking about incoming graylisting –  Clive Mar 3 at 14:15
1  
(oops I deleted my comment) Yes @Mołot I'm using the simple drupal mail functionality which obviously is a simple mail() in PHP. –  septi Mar 3 at 14:18

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
So basically the problem is that PHP mail() is not performing a resend after receiving the "false rejection"? –  septi Mar 3 at 14:17
    
@septi about that. PHP mail() sends mail, but it's your mailserver who gets "false rejection" - 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. –  Mołot Mar 3 at 14:19
    
Yes, of course, got it ; ) thanks I'll try to communicate with the SMTP server and hopefully it'll work. –  septi Mar 3 at 14:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.