Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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 [email protected] 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!

like image 200
tehaaron Avatar asked Jan 17 '13 00:01

tehaaron


People also ask

Where does postfix store outgoing mail?

Once you have access to the disk, Postfix stores email in /var/spool/postfix , in a binary format that you really want the postcat(1) tool to extract in human readable format.

What is postfix smarthost?

Postfix is an MTA for routing and the deliveries of emails. Similar to Microsoft Exchange and Lotus Notes but on a Linux platform. To set the smarthost for Postfix to relay mail to the Email Security for outbound, edit the main.cf configuration file under the Postfix directory.


1 Answers

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 [email protected]' >> /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!

like image 182
hhoover Avatar answered Sep 27 '22 20:09

hhoover