Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-03-2009, 01:24 PM   #1
Registered: Oct 2008
Distribution: FreeBSD, RedHat, Centos, Solaris, AIX
Posts: 34

Rep: Reputation: 17
Postfix: forward all account email within domain to another email account?

Hello. Im pretty sure this is trivial to config, but I havent had any luck searching on google.

My situation is: I want to forward any emails sent to my domain to another account. So:

root@domain                     ->      another_acc
any_other_system_user@domain    ->      another_acc
any_unknown_user@domain         ->      another_acc
Old 12-09-2009, 02:27 AM   #2
LQ Newbie
Registered: Mar 2004
Distribution: windows 7
Posts: 21

Rep: Reputation: 2
You mean a catchall? That catches emails that don't get delivered anywhere else.

There's also a bcc map which can send copies to a email address if you send or receive.
Old 12-09-2009, 02:31 AM   #3
Registered: Oct 2008
Distribution: FreeBSD, RedHat, Centos, Solaris, AIX
Posts: 34

Original Poster
Rep: Reputation: 17
My situation is not catchall. Catchall mode will deliver mails of non-exist users only

But I need all mail to be delivered, doesnt matter if recipient is exist or not
Old 03-04-2011, 01:10 PM   #4
LQ Newbie
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
Yes, you can

What you are looking for is a virtual alias table and can be done using the following...

First you need to edit, or create if it doesn't already exist, the /etc/postfix/virtual file. whatever
After this has been saved you will need to run postmap /etc/postfix/virtual in order to generate the indexed /etc/postfix/virtual.db Postfix will read.

You will then need to edit the /etc/postfix/ and be sure that you have the following line uncommented:

virtual_alias_maps = hash:/etc/postfix/virtual
This will actually let postfix know about the virtual alias table and use it.

The problem with using the luser_relay option as others have mentioned is that this is treated as the user of last resorts for unknown addresses by the local delivery agent. If postfix is only handling mail for one domain this can be utilized for this but it can mask other configuration errors and will likely cause unexpected results if more than one domain is being handled.

The one caveat I feel obligated to mention is that by creating a wildcard alias of this nature you are opening up your mail system to accept messages for addresses that will not exist and run the risk of having the mailbox filled quickly with spam for non-existent mailboxes.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to add new email account to sendmail/postfix masenko703 Linux - Newbie 7 06-02-2009 07:24 AM
LXer: Setup Postfix to Login to Your Email Account and Deliver Mail LXer Syndicated Linux News 0 01-24-2009 04:10 PM
Virtual Email Account for virtual domain in Postfix javed_dogar Linux - Server 7 10-17-2008 12:31 PM
Email account passwords for each domain on the server rossx Linux - Server 4 08-20-2008 03:01 AM
Why is PostFix sending mail using the email address of the smtp account? taigon Linux - Server 34 02-09-2007 01:09 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:41 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration