Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm using LAMPP and sendmail on Ubuntu 12.04. When I call the mail() function in PHP specifying a sender address, it won't work. Every mail I get is sent by an address "daemon@myhostname".

I've checked my /etc/aliases and /etc/mail/aliases, both files have MAILER-DAEMON: postmaster but there's no daemon user. If I dig into /var/mail, there are three files:daemon,root and nobody. So here are two questions:

  1. What's this daemon user? Are there any configuration files in which I can find daemon's definition?
  2. What should I do if I want to use the address I specified in function mail()'s parameters instead of daemon@myhostname"?
share|improve this question
Is daemon the user of your web server processes? Is there a default setting for sendmail_from in php.ini? Controlling the From: address within a script is covered in PHP's documentation, there's a small example (php.net/manual/en/function.mail.php#example-3349). The email account doesn't necessarily have to exist. –  forcefsck Sep 3 '13 at 19:47

Your Answer


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

Browse other questions tagged or ask your own question.