Outgoing mail limits do not limit mails sent by scripts: ERROR 'NoneType' object has no attribute 'lower'

Created:

2016-11-16 12:50:29 UTC

Modified:

2017-08-08 13:31:48 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Outgoing mail limits do not limit mails sent by scripts: ERROR 'NoneType' object has no attribute 'lower'

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 12.0 for Linux

Symptoms

Outgoing mail control do not limit mails sent by script. The following error can be found in /var/log/maillog :

py_limit_out[58221]: ERROR 'NoneType' object has no attribute 'lower'
plesk sendmail[58219]: Error during 'limit-out' handler
plesk sendmail[58219]: handlers_stderr: SKIP
plesk sendmail[58219]: SKIP during call 'check-quota' handler
postfix/pickup[9361]: E193B22C8646: uid=0 from=<parallels@domain.tld>
postfix/cleanup[19586]: E193B22C8646: message-id=<54feab72.GWHEeqpMfp8J6tR/%parallels@domain.tld>
postfix/qmgr[9512]: E193B22C8646: from=<parallels@domain.tld>, size=470, nrcpt=1 (queue active)
postfix/smtp[12806]: E193B22C8646: to=<parallels@gmail.com>, relay=gmail-smtp-in.l.google.com[173.194.71.26]:25, delay=1, delays=0/0/0.55/0.49, dsn=2.0.0, status=sent (250 2.0.0 OK 1425976178 t4si16082812lbp.105 - gsmtp)

Script may look like following:

<?php 
$to = 'reciever@domain.tld';
$subject = 'Subject';
$message = 'Hello world!';
$headers = 'From: sender@domain2.tld' . "\\r\

" . 'Reply-To: sender@domain2.tld' . "\r\" . 'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);
?>

or

<?php 
mail('reciever@domain.tld', "Subject", "Hello World!");
?>

or sent through command line:

# echo "Hello world!" | mail -s "Subject" -r "receiver@domain.tld" sender@domain2.tld

Cause

This issue has been considered as software issues with IDs #PPPM-2612 and #PPPM-2628 and was fixed in Plesk 12.0, microupdate #39 .

Resolution

Apply the latest Plesk microupdates .

Have more questions? Submit a request
Please sign in to leave a comment.