-bash-3.2# hostname name.foo.bar.domain.tld -bash-3.2#
whenever I send an email it leaves as [email protected], I need to have sendmail change it to [email protected]
how do I do that?
-bash-3.2# hostname name.foo.bar.domain.tld -bash-3.2#
whenever I send an email it leaves as [email protected], I need to have sendmail change it to [email protected]
how do I do that?
Assuming you are using the default installed FreeBSD sendmail you should not be editing the .cf files directly. They are generated from .mc files in the /etc/mail directory.
There is a Makefile in /etc/mail that will generate the .cf from the .mc files
Add the following line to the .mc files to set the default domain:
define(`confDOMAIN_NAME',`domain.tld')
If you really want to edit the .cf file directly, I believe the correct line is:
Djdomain.tld
(don't include the $w.)
Update: How to use make to regenerate your .cf
cd /etc/mail
make #the first time you do this it will copy freebsd.mc and freebsd.submit.mc to ${HOSTNAME}.mc and ${HOSTNAME}.submit.mc then generate the .cf files
make install # will copy ${HOSTNAME}.cf and ${HOSTNAME}.submit.cf to sendmail.cf and sendmail.submit.cf
make restart # will restart your sendmail processes
you must be root.
# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
should be in /etc/mail/sendmail.cf