Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #21  
Old 9th July 2008, 14:55
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

Any errors in your mail log or in Apache's error log? Are you using PHP Safe Mode?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Sponsored Links
  #22  
Old 9th July 2008, 16:39
ataman79 ataman79 is offline
Junior Member
 
Join Date: Aug 2007
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Any errors in your mail log or in Apache's error log? Are you using PHP Safe Mode?
Yes I have an error in my apache's error log:

[Wed Jul 09 17:24:48 2008] [error] an unknown filter was not added: PHP
sendmail: fatal: Recipient addresses must be specified on the command line or via the -t option
[Wed Jul 09 17:24:48 2008] [error] an unknown filter was not added: PHP
[Wed Jul 09 17:24:48 2008] [error] an unknown filter was not added: PHP


And this is the error which I have in my mail.log:

Jul 9 17:24:48 mailserver postfix/sendmail[26585]: fatal: Recipient addresses must be specified on the command line or via the -t option

Last edited by ataman79; 9th July 2008 at 16:50.
Reply With Quote
  #23  
Old 10th July 2008, 14:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

Quote:
Originally Posted by ataman79 View Post
[Wed Jul 09 17:24:48 2008] [error] an unknown filter was not added: PHP
http://www.howtoforge.com/forums/sho...che2_php%22%5D


Quote:
Originally Posted by ataman79 View Post
sendmail: fatal: Recipient addresses must be specified on the command line or via the -t option

Jul 9 17:24:48 mailserver postfix/sendmail[26585]: fatal: Recipient addresses must be specified on the command line or via the -t option
Did you specify a recipient in the mail command?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #24  
Old 10th July 2008, 15:23
ataman79 ataman79 is offline
Junior Member
 
Join Date: Aug 2007
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Did you specify a recipient in the mail command?

Yes I did, here is the script I'm using

PHP Code:
<?
/* Edit these preferences to suit your needs */

  
$mailto 'myemailaddress@domain.com'// insert the email address you want the form sent to
    
$returnpage 'thankyou.php'// insert the name of the page/location you want the user to be returned to
    
$sitename 'Anatoly-art'// insert the site name here, it will appear in the subject of your email

/* Do not edit below this line unless you know what you're doing */
    
  
$name $_POST['name'];
  
$tel $_POST['tel'];
  
$email $_POST['email'] ;
  
$enquiry stripslashes($_POST['query']);

    if (!
$name) {
        
open("<strong>Error:</strong> Please provide your name.<br/><br/><a href='javascript:history.go(-1)'>Back</a>");
         exit;
    }
    if (!
$tel) {
        print(
"<strong>Error:</strong> Please provide your telephone number.<br/><br/><a href='javascript:history.go(-1)'>Back</a>");
         exit;
    }
    if (!
eregi("[0-9]{5,25}"$tel)){
    print(
"<strong>Error:</strong> Telephone number must include: country code + area code + telephone number<br/><br/><a href='javascript:history.go(-1)'>Back</a>");
         exit;
    }
    if (!
$email) {
        print(
"<strong>Error:</strong> Please provide a valid email address.<br/><br/><a href='javascript:history.go(-1)'>Back</a>");
         exit;
    }
    if (!
$enquiry) {
        print(
"<strong>Error:</strong> Please provide your enquiry details.<br/><br/><a href='javascript:history.go(-1)'>Back</a>");
         exit;
    }
    if (!
eregi("^[a-z0-9]+([-_\.]?[a-z0-9])+@[a-z0-9]+([-_\.]?[a-z0-9])+\.[a-z]{2,4}"$email)){
    print(
"<strong>Error:</strong> this email address is not in a valid format.<br/><br/><a href='javascript:history.go(-1)'>Back</a>");
         exit;
    }    

  
$message "\n$name submitted the following message:\n\n$enquiry\n\nTheir contact details are as follows:\n\nName: $name\nTelephone: $tel\nEmail Address: $email\n";

  
mail($mailto"$sitename Contact Form from $name"$message"From: $email");
    
header("Location: " $returnpage);
?>
Reply With Quote
  #25  
Old 11th July 2008, 13:29
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

What's in the mail section of your php.ini?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #26  
Old 11th July 2008, 16:53
ataman79 ataman79 is offline
Junior Member
 
Join Date: Aug 2007
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
What's in the mail section of your php.ini?
This is thr mail section of my php.ini , which is located in /etc/php5/apache2/php.ini - you mean this file right ?


[Syslog]
; Whether or not to define the various syslog variables (e.g. $LOG_PID,
; $LOG_CRON, etc.). Turning it off is a good idea performance-wise. In
; runtime, you can define these variables by calling define_syslog_variables().
define_syslog_variables = Off

[mail function]
; For Win32 only.
SMTP = localhost
smtp_port = 25

; For Win32 only.
;sendmail_from = me@example.com

; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
sendmail_path = /usr/sbin/sendmail

; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
Reply With Quote
  #27  
Old 12th July 2008, 12:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
Default

Try
Code:
sendmail_path = /usr/sbin/sendmail -t
and comment out the SMTP and smtp_port lines. Restart Apache afterwards.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
ataman79 (14th July 2008)
  #28  
Old 14th July 2008, 08:17
ataman79 ataman79 is offline
Junior Member
 
Join Date: Aug 2007
Posts: 25
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Try
Code:
sendmail_path = /usr/sbin/sendmail -t
and comment out the SMTP and smtp_port lines. Restart Apache afterwards.

Thank you Falko, you always help me ! Now all is OK !!!
Reply With Quote
  #29  
Old 14th July 2008, 17:29
misiek04 misiek04 is offline
Junior Member
 
Join Date: Jul 2008
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi.
I`ve got the similar problem, but in my case i can`t send message to other server. If I send e-mail to my domain it works good and no error message in log.
While sending to other domain in log I have got:

Sender address rejected: Domain not found (in replay to MAIL FROM command)

When I use IMAP to send e-mail to other domains everything works good.
Reply With Quote
  #30  
Old 15th July 2008, 16:23
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,900
Thanked 2,703 Times in 2,546 Posts
 
Default

Is this other domain on another or on your server?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Not receiving any incoming mail. Jcorrea920 General 11 3rd April 2010 13:08
Filtering emails using Spamassassin and Clamav for Exchange 2000 Server Rocky Server Operation 19 11th March 2008 08:27
Ispconfig + FC4 + mail function vocoder General 15 10th March 2006 12:36
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs ebbay Installation/Configuration 9 4th March 2006 11:47
Problem sending mail to 2nd SMTP server inside network kisong Server Operation 2 2nd March 2006 18:05


All times are GMT +2. The time now is 02:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.