Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

Emails are now sent from www@hostname, but I want them to be sent from webmaster@my-domain.com

My developer said it should be in php.ini but I figured out this is true only for Win32 systems.

How do I make this change in FreeBSD 8.3-RELEASE-p3?

share|improve this question
What mailserver do you use? – qbi Nov 8 '12 at 8:55
up vote 2 down vote accepted

If you use the default mailserver (sendmail), you should add the -f argument to the sendmail_path in php.ini

share|improve this answer

I presume you have a dedicated FreeBSD 8.3 server (virtual or not, doesn't matter).

If so, then you can change the hostname by running the hostname(1) command with the argument being the new hostname. In order for the changes to be persistent across reboots, you must change the hostname variable in /etc/rc.conf.

However, notice that sendmail(8) gets system hostname only when it boots, so, in order for it to notice the changes you've made, you will probably have to restart the sendmail daemon.

More details on changing your hostname here (from a simple http://www.google.com/search?q=hostname+freebsd):


share|improve this answer

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.