Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

email forwording in postfix

Status
Not open for further replies.

mouse123

IS-IT--Management
Dec 16, 2002
82
US
I want forward my current email id (xx@yy.com) to abc@zz.com in postfix, I have added the following line in main.cf
canonical_maps = hash:/etc/postfix/canonical

and the contant of /etc/postfix/canonical

xx@yy.com abc@zz.com

I have stop and start postfix, but it not working.

Thanks in Advance
 

You need to recreate the db hash


from

canonical_maps (default: empty)
Optional address mapping lookup tables for message headers and envelopes. The mapping is applied to both sender and recipient addresses, in both envelopes and in headers, as controlled with the canonical_classes parameter. This is typically used to clean up dirty addresses from legacy mail systems, or to replace login names by Firstname.Lastname. The table format and lookups are documented in canonical(5).

If you use this feature, run "postmap /etc/postfix/canonical" to build the necessary DBM or DB file after every change. The changes will become visible after a minute or so. Use "postfix reload" to eliminate the delay.

Examples:

canonical_maps = dbm:/etc/postfix/canonical
canonical_maps = hash:/etc/postfix/canonical


Brian
 
You don't forward mail with canonical, you use aliases for that. Canonical influences how mail is delivered locally and and how your email address appears when it is sent out.
 

Thanks Brian and Ericbrunson,

I did use postmap /etc/postfix/canonical and than stop and restart postfix also.

Note user is not exisit in the server

I tried with aliases like

virtual_alias_domains = /etc/postfix/vrdomain
virtual_alias_maps = hash:/etc/postfix/virtual

and the contant of /etc/postfix/virtual

xx@yy.com abc@zz.com
@abc test@test.com

contant of /etc/postfix/vrdomain
yy.com
zz.com
test.com


postmap /etc/postfix/virtual

and than /etc/init.d/postfix reload

It is not working, I am getting the following MAILER-DAEMON error

This is the Postfix program at host proddns.dnsserver.com.

I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the message returned below.

The Postfix program

<abc@zz.com>: user unknown in virtual alias table


Where I am doing mistake?
 

Now I am not using caonical, I am using

My aliases contain /etc/postfix/aliases

xx abc

and

/etc/postfix/virtual

xx@yy.com abc@zz.com

( this users is not exisiting in the server, do I need to create the users in the server)

/etc/postfix/vrdomain
yy.com
zz.com
abc.com

/etc/main.cf

virtual_alias_domains = /etc/postfix/vrdomain
virtual_alias_maps = hash:/etc/postfix/virtual

and then /etc/init.d/postfix reload





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top