How do I make postfix send emails from user@mydomain
instead of root@hostname
? Even after installing and entering my domain when it asked, it's still being sent with the hostname and not the domain I provided. In my main.cf
file
myorigin = /etc/mailname
and /etc/mailname
contains:
gateblogs.com
which is my domain.
I have managed to fix my problem temporarily by changing my hostname to my domain name. However, how can I change who the email is from; currently mail is shown from root
I want it to be something else.
mail
command or what? – Wildcard Jul 18 '17 at 04:56echo "body" | mail -s blah email
– user8292439 Jul 18 '17 at 04:59mail -r fromaddress
. Seeman mail
. – Wildcard Jul 18 '17 at 05:02myhostname.mac.com
? – user8292439 Jul 18 '17 at 05:07-r
option? Is that what you were looking for? – Wildcard Jul 18 '17 at 05:28-r
option works great, but error messages seem to be sent differently. – user8292439 Jul 18 '17 at 05:33-r
. – Wildcard Jul 18 '17 at 05:51/etc/mailname
, did you reload or restart postfix? – abchk1234 May 29 '19 at 08:41