Creating new account following message comes up to requester:

Warning: mail(): Policy restriction in effect. The fifth parameter is disabled on this system in DefaultMailSystem->mail() (line 77 of /customers/X.x/X.x/httpd.www/modules/system/system.mail.inc).
* Warning: mail(): Policy restriction in effect. The fifth parameter is disabled on this system in DefaultMailSystem->mail() (line 77 of /customers/X.x/X.x/httpd.www/modules/system/system.mail.inc).

Comments

cord1’s picture

Solution for me:
modules/system/system.mail.inc line 74
remove comma behind $mail_headers
line 76 comment out '-f ' . $message['Return-Path']

I get no more warnings.

berdir’s picture

Do you know what kind of "policy" that is?

Is this is shared host?

Is there some sort of php security extension running? I never heard of such a feature in php itself, you can block functions, sure, but specific arguments of functions?

bfroehle’s picture

From http://us.php.net/manual/en/function.mail.php

The additional_parameters parameter is disabled in safe_mode and the mail() function will expose a warning message and return FALSE when used.

From http://drupal.org/requirements

PHP needs the following configuration directives for Drupal to work (only directives that differ from the default php.ini-dist / php.ini-recommended):

  • safe_mode: off. Safe mode may interfere with file and image uploads.

Guess we should add a note that safe mode also messes up sending users mail.

MrMagoo’s picture

chord1: Did you remove the comma at $mail_body,? and that line 76 your mention? What did you do? Dont understand what you wrote? Im getting the same information about safe mode when i created a new user

gyurma’s picture

I have same problem using drupal commerce.
on my host in a small example php file the ini_get('safe_mode') returns false, and I really can send mail via mail() with 5 arguments, but the drupal commerce writes this policy warning.
I have no idea how the mail() function gets confused...
The native drupal mail function checks for this safe_mode stuff, and still gets this error.
Actually the mails seem to be sent OK.

th_tushar’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

Looks like this issue do not exists anymore. Marking it as closed.