User unknown in virtual address table

Hi,

I have a box whose hostname is vm1.domain1.com

The server hosts the web site for domain1.com but email is handled by another server (not controlled by me and the MX record for domain1.com reflects this.

On my box I also have domain2.com and domain3.com.

I have configured the email addresses info@domain2.com and info@domain3.com to forward to info@domain1.com.

However when I send an email to info@domain2.com, it is immediately returned to sender with the error:

<info@domain1.com> (expanded from <info@domain2.com>): User unknown in virtual alias table 

I am assuming this is because postfix is looking for the user info@domain1.com on the local machine, whereas in fact it needs to forward to box detailed in the MX record for the domain.

How can I force it to look external for the email service for domain1.com?

Thanks in advance

You need to turn off the “Mail for Domain” feature for “domain1.com”. Then Postfix will no longer try to deliver it locally.

Hi Locutus,

Thanks, but I tried that. I can turn that off, because I have aliases pointing to it. I get this error:

Failed to modify server : A target server must have email enabled if any aliases do

Any other thoughts?

Okay I see… this might be either a bug or unfortunate behavior of Virtualmin… Since you’re trying to forward to a domain that’s managed by your system, Virtualmin might expect to also be responsible for its email in that case. I think though that what you’re trying to do should be possible, i.e. define an email forwarding target that’s a locally known domain that doesn’t have local email.

Maybe Eric or Jamie could barge in here and give some insight?

Just to report back, I got around this problem by (1) changing the setting for “What domains to receive mail for” to remove the hostname from that field, and (2) editing the file at /etc/postfix/virtual to remove any references to the domain I don’t want delivered locally.

Step (1) I did through webmin, but step (2) I did by editing the file directly. I guess I am expecting that when I change other settings in postfix (if I ever do) that the problem may return, since the /etc/postfix/virtual might be recreated on applying any other settings?

I guess the problem I have is that the parent server has sub-servers which share the same web site, but the sub-servers’ mail is forwarded to an address at the parent server’s domain which is hosted elsewhere, and that seems to be an illegal configuration from Virtualmin’s point of view.