1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

sending email problem

Discussion in 'Plesk for Linux - 8.x and Older' started by farakhkhan@yaho, Nov 29, 2007.

  1. farakhkhan@yaho

    farakhkhan@yaho Guest

    I am sending emails but hotmail is not accepting at all and yahoo, gmail is getting in bulk

    1. My SPF record is correct
    2. I can resolve my hostname from root
    3. I can pointer my host from root

    my ip is

    I am using javaMail for sending the msgs from my website while Plesk is using Qmail. Is there may be conflict between Qmail and javaMail??

    thanks & best regards
  2. Satoriya

    Satoriya Guest


    There can be two posible situations:
    - Your server does not send emails through scripts;
    - yahoo, gmail, etc. reject emails from your serevr.

    What should be checked in first situation:
    1) You can use following simple php script which works 100%, for example with this code:
    $to = "none@none.com";
    $subject = "Hi!";
    $body = "Hi,\n\nHow are you?";
    if (mail($to, $subject, $body)) {
    echo("<p>Message successfully sent!</p>");
    } else {
    echo("<p>Message delivery failed...</p>");

    If you received the message "Message successfully sent!", it means that the problem is in syntax of you script;

    3) If you received the message "Message delivery failed", what records appear in /var/www/vhosts/$domain_name/statistics/logs/error_log when you try sending mail with php script.
    Here $domain_name is the name of the domain on which this script is executed.

    4) Check what records appear in /var/log/messages upon script execution. If you see records like:

    deny httpd_sys_script_t var_t:file { execute getattr };
    deny httpd_t self:tcp_socket connect;
    deny httpd_t usr_t:dir write;
    deny httpd_t var_log_t:file { append getattr setattr };
    deny httpd_sys_script_t devlog_t:sock_file write;
    deny httpd_sys_script_t self:unix_dgram_socket {connect create write };

    Then this must be caused by Selinux. Check selinux status with getenforce command and if Selinux is in enforcing mode try switching it to permissive mode using following command:
    # setenforce 0

    In second situation:
    Send a message to an email account on yahoo, gmail, etc. and then check /usr/local/psa/var/maillog and maillog files on destination server (yahoo, gmail) to get exact reason why the message was rejected.