Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed sendmail on ubuntu 9.04 on my laptop computer. My php mail() function still doesn't work from localhost, so I want to disable the auto start up of mail transport agent during system boot.

How do I disable the auto start up of the mail transport agent?

Thanks

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

sudo update-rc.d sendmail disable

But I don't see how this is going to help your non-working mail() function.

share|improve this answer
    
Perhaps he found an alternative like a SMTP server somewhere else he could use and he is just trying to clean up? –  Zoredache Nov 6 '09 at 1:53
    
thanks, that worked. Actually, I'll ask about the mail function another time. I couldn't get sendmail working on my localhost, so i figured I'll get rid of it for now because it was slowing down my system boot up. –  John Nov 6 '09 at 4:55
add comment

To make sendmail work with php, edit your php.ini file:

sudo nano /etc/php5/cli/php.ini

Use ctrl+W to search for "sendmail_". Remove the comment (#) before "sendmail_from" and "sendmail_path" and modify them like so:

sendmail_from = php@hostname
sendmail_path = /usr/sbin/sendmail -i -t

You can replace "php@hostname" with your own.

To make sendmail boot faster, check your hostname with (or just look in /etc/hostname):

hostname

Then edit /etc/hosts:

sudo nano /etc/hosts

Make sure it contains the following lines (you might have additional info like localhost.localdomain, if you have a domain):

127.0.0.1 localhost
127.0.1.1 hostname
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.