25

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!

Community
  • 1
  • 1
tehaaron
  • 2,250
  • 10
  • 31
  • 54
  • Mind sharing your config files and what exactly you did to get setup so I can help debug? – Swift Jan 17 '13 at 19:13

1 Answers1

50

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!

hhoover
  • 659
  • 6
  • 2
  • It works, but how can I change email again? I tried everything, postmap, restart postfix, apache, ... but still same. Some cache? – genderbee Jul 29 '20 at 17:43