Change outgoing mail address from root@servername - rackspace sendgrid postfix [closed]

泄露秘密 提交于 2019-11-29 00:05:17

问题


So I recently setup my Rackspace server (Ubuntu LAMP stack) to use Postfix and Sendgrid for outgoing email. It works great in that my test mail from the cmd line gets delivered via sendgrid smtp. However, when I receive the email it says its from root@rackspaceservername and I cannot reply to it.

I created an alias as per this topic how to change default email address for postfix? which makes it say webmaster@mydomain.com by the sender name which still appears as root.

What do I need to change to have the server use my webmaster email or at least make it appear thats where it is coming from and thus a reply would go to that email?

Any help is greatly appreciated!


回答1:


Make sure this is set in /etc/postfix/main.cf:

smtp_generic_maps = hash:/etc/postfix/generic

When setting a generic alias, don't use "http" like the link you provided - you would use www-data with Ubuntu.

echo 'www-data yourusername@yourdomain.com' >> /etc/postfix/generic
postmap /etc/postfix/generic
service postfix restart

A side note: Sendgrid is awesome but since Rackspace bought MailGun the MailGun service is pretty much free for Rackspace customers. Hope this helps!



来源:https://stackoverflow.com/questions/14370224/change-outgoing-mail-address-from-rootservername-rackspace-sendgrid-postfix

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!