Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to configure the mail() function for 3 days by now, and I'm running out of ideas.
I've installed and configured postfix as a satellite, following this guide: How to have my PHP Send mail? but it seems I lack the file /etc/postfix/sender_canonical (and of course I have no idea of what to put inside it). By now this is the only clue I have about the problem...
I'm trying to run it on Ubuntu 12.04 laptop, built with x32 architecture.

EDIT: After a few iterations of apt-get purge and apt-get install, mail() started to return true, the error log has stopped growing so it seems all ok, but no mail managed to reach my inbox, not even as spam.

share|improve this question
up vote 2 down vote accepted

This might be overkill for what you want, but following the directions here:

and literally just copy pasting all commands and following the directions carefully should get you there.

I run 12.04 on three different systems and have set all of them up this way - i've had zero problems with mail().

I'm still a bit of a newbie at this, so like i said - it might be overkill for what you need. Hope it helps though.

share|improve this answer
Wonderful! Now it's working, thank you – frollo Mar 25 '13 at 14:04

Check php config file and try to use simple sendmail instead of postfix.

share|improve this answer
I tried it in attempts 2-5, but thank you – frollo Mar 25 '13 at 14:07

Your Answer


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.