3

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

2 Answers 2

10
sudo update-rc.d sendmail disable

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

2
  • 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, 2009 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. Nov 6, 2009 at 4:55
1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .