{"id":700,"date":"2011-04-11T14:48:34","date_gmt":"2011-04-11T19:48:34","guid":{"rendered":"http:\/\/it.thelibrarie.com\/weblog\/?p=700"},"modified":"2011-04-11T14:48:34","modified_gmt":"2011-04-11T19:48:34","slug":"change-the-from-address-for-users-emails","status":"publish","type":"post","link":"https:\/\/it.thelibrarie.com\/weblog\/2011\/04\/change-the-from-address-for-users-emails\/","title":{"rendered":"Change the From Address for Users Emails"},"content":{"rendered":"<p>I was running a cron job script:<br \/>\n<code>cat \/var\/log\/syslog | mailx -s \"Server 48 - Syslog - Daily\" email@domain.tld<\/code><br \/>\nUnfortunately I setup all these cronjobs as root.  All emails were showing up as from &#8220;root@domain&#8221; or &#8220;root@server&#8221;, or even just plain &#8220;root&#8221;.  Awesome.<\/p>\n<p>So here&#8217;s the easiest way to fix this issue:<br \/>\n<code>chfn<\/code><br \/>\nThen change the information for first\/last\/etc.  This will change it for the CURRENTLY LOGGED IN USER.<\/p>\n<p>Otherwise you can always just run:<br \/>\n<code>chfn -f \"Full name\" root<\/code><br \/>\nUsage is chfn [-f full_name] [-r room_no] [-w work_ph] [-h home_ph] [-o other] [user]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was running a cron job script: cat \/var\/log\/syslog | mailx -s &#8220;Server 48 &#8211; Syslog &#8211; Daily&#8221; email@domain.tld Unfortunately I setup all these cronjobs as root. All emails were showing up as from &#8220;root@domain&#8221; or &#8220;root@server&#8221;, or even just plain &#8220;root&#8221;. Awesome. So here&#8217;s the easiest way to fix this issue: chfn Then change &hellip; <a href=\"https:\/\/it.thelibrarie.com\/weblog\/2011\/04\/change-the-from-address-for-users-emails\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Change the From Address for Users Emails<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-700","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/700","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/comments?post=700"}],"version-history":[{"count":1,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/700\/revisions"}],"predecessor-version":[{"id":701,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/posts\/700\/revisions\/701"}],"wp:attachment":[{"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/media?parent=700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/categories?post=700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/it.thelibrarie.com\/weblog\/wp-json\/wp\/v2\/tags?post=700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}