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.

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
add comment

2 Answers 2

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
add comment

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):

http://docs.freebsd.org/doc/4.6-RELEASE/usr/share/doc/en/books/ppp-primer/system-config.html
http://lists.freebsd.org/pipermail/freebsd-questions/2006-April/119355.html

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.