Could not execute: /usr/sbin/sendmail

Discussion in 'Installation/Configuration' started by alexloko, Jul 26, 2011.

  1. alexloko

    alexloko New Member

    Hi All.

    The "Could not execute: /usr/sbin/sendmail" error appears when i try to send mail from webpage.

    I trying to change strings in configuration.php file
    from:

    public $mailer = 'sendmail';
    public $sendmail = '/usr/sbin/sendmail';

    to:

    public $mailer = 'postfix';
    public $sendmail = '/usr/sbin/postfix';
    or :
    public $mailer = 'sendmail.postfix';
    public $sendmail = '/usr/sbin/sendmail.postfix';

    but "Could not instantiate mail function." error appears.

    CentOS 5.6 ISPconfig 3.0.3.3 Joomla1.7

    I'm confused... What can I do? Thanks.
     

    Attached Files:

  2. alexloko

    alexloko New Member

    I noticed that there is a syntax error in string of results # postconf -n
    In the name of domain is missing letter.

    mydestination = MYhost.Mydomen(HERE_ERROR).tld, localhost, localhost.localdomain
    myhostname = MYhost.Mydomen(HERE_ERROR).tld

    This syntax error i was fixed immediately after install CentOS an ISPconfig (1 month ago) with vi /etc/hosts , but now i see that this strins in postconf was not changed . Maybe that is the problem?
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    You can not execute the sendmail binary directly from your php scripts, as they dont have permissions to execute that file outside of the web directory. Better use the php mail() function to send emails or make a smtp connection to localhost.
     
  4. alexloko

    alexloko New Member

    Till - Thanks for reply. Let me bother you again.

    After select wich mailer to delivery of site e-mail to / PHP Mail / - the message "Thank you for your email" appear after sent mail from site. But NOTHING is not recive.
    I waited 48 hours, but nothing changed.
    Joomla says that the message sent - but it is not arrives.

    The error in
    mydestination = MYhost.Mydomen(HERE_ERROR).tld, localhost, localhost.localdomain
    myhostname = MYhost.Mydomen(HERE_ERROR).tld
    ш fixed and rebooted the server. No change.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Check the mail log file, if there are any errors.
     
  6. alexloko

    alexloko New Member

    sorry for the stupid question, I newbie in Linux. in what directory to look for log file. too many log files (for me) in different directories, thank you

    -----
    Ok. i got some information by command "tail -f /var/log/maillog" and now begin to analyze it
     
    Last edited: Jul 29, 2011
  7. falko

    falko Super Moderator Howtoforge Staff

    It's in the /var/log directory (something like "mail" or mail.log").
     

Share This Page