Page 1 of 1

Configuring mail on FreeBSD

Posted: Mon Feb 03, 2003 10:33 am
by abdul
Hi there,

I am tring to send a simple mail with the following line

Code: Select all

mail("me@domain.com","Enquiry","Hello")
This works well with windows2000, but fails (Though it doesn't show any error message) on a FreeBSD server running apache. With phpinfo() I am getting the follwing information about the server
sendmail_path /usr/sbin/sendmail -t -i /usr/sbin/sendmail -t -i
Whis sound like, what it should be. All mails are still available on /var/spool/mqueue. But, it is not being send. Any help would be appreciated.

Thanks in advance.

-Abdul

Posted: Mon Feb 03, 2003 10:40 am
by mr_griff
Maybe try adding the additional headers for the from address.

Code: Select all

<?php
mail("me@domain.com","Enquiry","Hello", "From: someone@domain.com")
?>

Posted: Mon Feb 03, 2003 10:44 am
by abdul
I have tried adding almost all available headers.

Thanks

-Abdul
mr_griff wrote:Maybe try adding the additional headers for the from address.

Code: Select all

<?php
mail("me@domain.com","Enquiry","Hello", "From: someone@domain.com")
?>

Posted: Mon Feb 03, 2003 10:50 am
by mr_griff
Do you have access to the maillog (/var/log/maillog) on the server? You should be able to see some kind of error in there.

Posted: Mon Feb 03, 2003 11:06 am
by abdul
Yes, I have access and it says
relay=mail2.mydomain.com., dsn=4.0.0, stat=Deffered, Operation timed out with mail2.mydomain.com
But, our email server is "mail.mydomain.com" rather than mail.mydomain.com. But, I don't remember adding/changing it anywhere when I install the server. Do I need to change it. If yes, then on which file. Thanks for the reply.

Cheers!
-Abdul

Posted: Tue Feb 04, 2003 3:38 am
by abdul
I still couldn't solve this issue. All suggestions are welcome.

Cheers!

-Abdul