HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Server Operation (
-   -   Sender Address Rewriting In Postfix! (

ojha_riddhish 8th January 2010 14:04

Sender Address Rewriting In Postfix!
Dear friends,

I am here with a typical problem with my home email server. I hope anyone of you would have exerienced the same problem I'm experiencing currently. Please help me or guide me if somebody knows something about it. Thanks in advance!
My requirement:
I want a mail server that can relay mails to the internet using GMail and fetch the mails of different accounts into the mail server and distribute them to their respective users. I am using Postfix, Fetchmail and Dovecot. I have a PC with 3 users. My father, brother and I use the PC having Ubuntu 9.04 and share the internet. We all send mail and retrieve mail. We do use Evolution and Mutt sometimes. We want to send our mails with our email_ids without even logging in.




Whenever, I send a message using raj's account, the From address and Reply-To address contains or But I want it to be rewritten to my original email_id, that is, But somehow this is not happening.

My file contains:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myhostname =
myorigin = /etc/mailname
mydestination =,,, localhost
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
broken_sasl_auth_clients = yes
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/MyHomePC-cert.pem
smtp_tls_key_file = /etc/postfix/MyHomePC-key.pem
smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_cert_file = /etc/postfix/MyHomePC-cert.pem
smtpd_tls_key_file = /etc/postfix/MyHomePC-key.pem
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
tls_random_source = dev:/dev/urandom
smtpd_sasl_auth_enable = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_sasl_local_domain = $myhostname
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtpd_sasl_application_name = smtpd
smtp_tls_per_site = hash:/etc/postfix/tls_per_site
relayhost = []:587
disable_dns_lookups = yes
smtp_generic_maps = hash:/etc/postfix/generic
transport_maps = hash:/etc/postfix/transport

My sasl_passwd file contains:


My generic file contains: com m
raj@localhost=================thinking_raj@yahoo.c om com
raghav@localhost==============raghav...diffmail .com

A part of my file contains:

relay unix - - - - - smtp
-o smtp_generic_maps=
-o smtp_fallback_relay=

I have created my custom certificate using SSL. I've created the Postfix's file following a tutorial on the net. Currently mails are going fine, but with our local email_ids. I want Postfix to rewrite our local email_ids with the equivalent email_id on the net. I know that it's possible, but somehow I can't figure it out. Please help me in either correcting the wrong configuration on my part or guiding me to achieving what I require. Thanks in advance!

Thanks & Regards,

All times are GMT +2. The time now is 15:54.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.