Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my virtusertable I have the following entry:

Now I also want to forward all the inbound mail to another external domain while keeping my current setup, so I did this :

But when doing makemap hash virtusertable.db < virtusertable this error appears :

makemap: virtusertable.db: line 2: key duplicate key

The destination mails will be random fax numbers like so I can't use username based forwarding.

So I guess it is not possible to have duplicate entries for the inbound domain. How would you do it ?

share|improve this question
up vote 0 down vote accepted

You cannot have a double key entry in virtusertable. You can do what you want for specific accounts by using both virtusertabe and aliases:

In virtusertable: user1-fax

In aliases:

user1-fax:, "|"

Now run make virtusertable and newaliases and you are all set.


Since the FAX numbers change rapidly, you can try installing MIMEDefang and call add_recipient() from within the filter_recipient function. This way you can add and delete the local and external recipients that you need. You may need to modify too.

share|improve this answer
I can't do that since users are not really usernames but fax numbers, so I can't really specify usernames. I will update my question. – drcelus Jul 23 '12 at 5:39
Usage of the word "user" is liberal here. If the FAX numbers are fixed and do not change rapidly over time, the proposed solution holds. If the word "user" bothers you, replace it with "number" and your are set. – adamo Jul 23 '12 at 7:03
I mean that fax numbers are not fixed, they change on a daily basis. – drcelus Jul 23 '12 at 10:24
Updated my answer with one more suggestion. – adamo Jul 23 '12 at 11:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.