Domain and Email issue.

9 posts / 0 new
Last post
#1 Wed, 04/13/2011 - 09:23
RogEnk

Domain and Email issue.

Imported a site from a CPanel backup, brilliant feature :) - really liking Virtualmin!

Ran into some niggles with email accounts on newly imported site, was getting bounce messages:

xx.yyyyyyyy@host.mydomain.biz (expanded from xx@yyyyyyyy.com): User unknown in virtual alias table

Because aliases appeared to be an issue I compared configs between two server running Virtulamin, and virtual hosts on same box, and decided somewhat foolishly to use the new 'Clone' tool. Cloned site to test.com, deleted old site (from within Virtualmin) and then cloned test.com back to what it was originally. Had to manually remove the group I wanted to use (original username:group) and users in that group.

Cloning succeeded - upto a point.

Email addresses failed due to them already existing. Error message 'no Apache Virtual Host Found!'

So question is two fold:

  1. How do I clean out all the email addresses and aliases associated with the original domain?
  2. How do I rectify the Apache Virtual Host message, a conf file exists for site in domains_enabled and site does work.

I have no issue with deleting site again and now prefer the new site from scratch approach, no emails were stored on server and re-creating 20 odd emails with new passwords is no great shakes.

What I do want to avoid is a clean box approach, but not ruling it out :-)

Thanks in advance.

Rog.

Wed, 04/13/2011 - 09:44
andreychek

User unknown in virtual alias table

That one may actually be a simple fix... that can occur if Postfix is confused about your hostname.

If you run the command "hostname" -- what name comes up? Then, take a look in /etc/postfix/main.cf, and look for the "mydestination" line. Is your hostname listed on that line somewhere (exactly as it appeared when you ran the "hostname" command)?

Once we get that working, we can talk about the Apache stuff :-)

-Eric

Wed, 04/13/2011 - 10:00
RogEnk

Hi Eric, that was a speedy response!

Right I checked it for the umpteenth time and err... it was wrong, mydestination had wrong host name before the correct tld.

Corrected that and restarted PostFix feeling optimistic and...

Was able to create a brand new email user, no problem.

Attempted to (re)create and old user (the most vociferous 'where is my email account' one and got this:

"Failed to save mailbox : A mailbox or mail alias with the same name and domain already exists"

So it would appear that PosFix has not fully cleansed?

Wed, 04/13/2011 - 10:12
andreychek

Well, that error means that the account may already exist as an account in your system password file, as well as perhaps in /etc/postfix/virtual.

That can occur either because that account is associated with a Virtual Server on your system, or because something got goofed up along the way. It's difficult to say which :-)

You don't see that particular account in "Edit Mail and FTP Users"?

What about in "Edit Mail Aliases", does that name exist there?

-Eric

Wed, 04/13/2011 - 10:48
RogEnk

Face + Palm time (and a very red face).

They do indeed exist as aliases - I am sure they did not but I have been going around and around on this...

Removed them, and also the homes that also exist. Can now create the email addresses again.

Thanks Eric! Superb!

The import included a parked domain, I used that as a transitory domain whilst DNS updated. Perhaps that caused the confusion?

Now to fix the Apache Virtual issue :)

Rog.

Wed, 04/13/2011 - 10:54
andreychek

Now to fix the Apache Virtual issue :)

Okay, let's start over with that one... can you describe exactly what you're seeing and when it started occurring, in excruciating detail? :-)

-Eric

Wed, 04/13/2011 - 11:13
RogEnk

Attempt to backup and get: Copying Apache virtual host configuration .. .. no Apache virtual host found!

Backup failed! See the progress output above for the reason why.

Same with validating site: /Excruciating detail on

  1. My Dedi Server had domainb.com added, all working fine and all data duplicated from Domain A (no email). Using same username as Domain A.. probably not a good idea...
  2. Decision to leave shared hosting for better pastures, set forwarding of domain A on S/Host to Domain B on mine.
  3. Created Cpanel Backup and transferred to new server.
  4. Imported from Cpanel, using original username and password.
  5. When complete I had Domain A and Domain B (which was now a sub-domain) in Virtualmin and all seemed rosy.
  6. Got some email bounces due to sending host validation failures (gmail didn't care but YaHoo did) narrowed this down to DNS incorrect, did not have the hostname bit before the TLD.
  7. User reported email bounce with the "xx.yyyyyyyy@host.mydomain.biz (expanded from xx@yyyyyyyy.com): User unknown in virtual alias table" message.
  8. Confirmed hostname and mydestination fields matched (I must have typo'd at a later date).
  9. Deleted Domain B from account
  10. Cloned Domain A to test.com
  11. Deleted Domain A and then all users in group and the group itself.
  12. Cloned test.com back to domainA and restored data Cloning advised me of the virtual host issue, however the domainA.conf file had been created and symlinked so site was up..

/Excruciating detail off

Reflection tells me having a parked domain doesn't help, and having it as the primary account when importing from a Cpanel backup with it as a parked domain is not a good idea.

Daft thing is I only did it this way for the email addresses and data, to find no data was kept by users any way!

Cheers,

Rog.

Wed, 04/13/2011 - 13:24
RogEnk

Fixed :)

When I looked at the conf file for the domain, with fresh eyes today, I realised the clone operation had not completed correctly.

There were two issues with the cloning and re-write of the xx.com.conf:

  1. The opening and closing statements (?) were missing.
  2. The operation had not remapped test.com to the correct tld name.

Not sure if this constitutes a bug as I may not be able to replicate.

But happy to report, thanks to Eric's very quick input and guidance, that emails and backups etc. are now working as designed.

Thanks Eric!

Rog.

Wed, 04/13/2011 - 13:34
andreychek

Oh goodie, because I was having a bear of a time figuring out what was wrong. I'm glad you figured it out, thanks for letting us know!

-Eric

Topic locked