How To: Outgoing email masquerading (Postfix, Mutt)

Posted: April 21, 2011 in FOSS, How-to

Postfix –

1) Append smtp_generic_maps to Postfix main.cf
[root@server1 ~]# echo ‘smtp_generic_maps = hash:/etc/postfix/generic’ >> /etc/postfix/main.cf

2) Append the necessary outgoing email masks to Postfix address mapping table
<user>@<your_server> <your_email_address>

E.g.
[root@server1 ~]# echo ‘root@server1.mydomain.local admin@mydomain.com’ >> /etc/postfix/generic

3) Create lookup table for Postfix address mapping table
[root@server1 ~]# postmap /etc/postfix/generic

4) Restart Postfix to take effect Postfix main.cf changes
[root@server1 ~]# /etc/init.d/postfix restart

Mutt –

1) ‘set envelope_from=yes‘ in /etc/Muttrc file

2) Create .muttrc file if it’s not alredy created at your user’s home
[sajithr@server1 ~]$ touch ~/.muttrc

3) Add the necessary masks to ~/.muttrc
set from=”<from_email_address>”
set realname=”<username>”

E.g.
[sajithr@server1 ~]$ cat ~/.muttrc
set from=”admin@mydomain.com
set realname=”foo, server1″

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s