How can I move users from old domain to new domain

I have a dedicated server and it was running on xwy.com domain as primary domain with name servers.

I wanted to change it to abc.com instead,
domain already exists on server but wont work as primary.

So I renamed it to abc2.com and renamed xyz.com to abc.com.
I updated the nameservers to.

It works now, but even though when I renamed it I changed the directory to a copy of the original abc.com the users are not showing.

My problem now is that when I created a new user it does not have the same username as before and I dont want to have to contact all the email users to change their usernames. its still uses the info it had for xyz.com as the username.

HELP

Otherwise is their an easier way to do this.

Regards
Shane

Hi Shane,

You said you renamed the two domains – how did you go about doing that?

If you didn’t do that from within Virtualmin, using “Server Configuration -> Move Virtual Server”, Virtualmin may be confused at the moment, not knowing those names have been changed.
-Eric

Hi Eric

I used Configure server>>>>>Change Domain Name

I have got the users back by dropping a backup for the domain over it,
I am moving the domain from another Vmin server so just did a current back up and did a restore.

My only problem now is that the emails side does not work.

When I try to download it gives me the following error.

An error occurred with the pop3 mail server. Mail Server mydomian.com responded.

This is not very helpful to me.

Regards
Shane

Hi Shane,

I actually meant to say "Change Domain Name" rather than "Move Domain Name" – you did it the right way :slight_smile:

You’re right though, that error isn’t very helpful.

What shows up in the email log, in /var/log/maillog or /var/log/mail.log, whenever you attempt to connect?

And, are you sure Dovecot is running, and that the POP3 port (110) isn’t being blocked by a firewall of some sort?
-Eric

HI Eric,

no problem on he wording,
its just great to see your only human too. :slight_smile:

Will have alook at your suggestions

thanx

Regards
Shane

Hi

So far using ssh tried this

telnet mail.mydomainname.com 110

I get this reply:

+OK Dovecot ready.

For telnet mail.mydomainname.com 25

I am not so sure as i get

Connected to mail.Mydomain.com (xx.xx.xxx.x).
Escape character is ‘^]’.
220 xxx.xxxx.net ESMTP Sendmail 8.13.8/8.13.8; Mon, 25 May 2009 13:12:30 -0400

It seems to me as if it connected as it does not say failed.

The error log keeps talking about a lame nameserver.

May 22 01:51:18 b06s14le named[8743]: lame server resolving ‘197.subnet192.222.62.64.in-addr.arpa’ (in ‘subnet192.222.62.64.in-addr.arpa’?): 38.99.80.114#53
May 22 01:51:18 b06s14le named[8743]: lame server resolving ‘197.subnet192.222.62.64.in-addr.arpa’ (in ‘subnet192.222.62.64.in-addr.arpa’?): 38.99.80.114#53
May 22 01:51:18 b06s14le named[8743]: lame server resolving ‘197.subnet192.222.62.64.in-addr.arpa’ (in ‘subnet192.222.62.64.in-addr.arpa’?): 38.99.115.141#53
May 22 01:58:43 b06s14le named[8743]: lame server resolving ‘ns2.saweb.biz’ (in ‘saweb.biz’?): 64.85.172.187#53
May 22 01:58:43 b06s14le named[8743]: lame server resolving ‘ns2.saweb.biz’ (in ‘saweb.biz’?): 64.85.163.5#53
May 22 04:02:03 b06s14le named[8743]: lame server resolving ‘213.165.94.211.in-addr.arpa’ (in ‘165.94.211.in-addr.arpa’?): 211.94.65.97#53
May 22 04:02:04 b06s14le named[8743]: lame server resolving ‘213.165.94.211.in-addr.arpa’ (in ‘165.94.211.in-addr.arpa’?): 211.94.65.97#53
May 22 04:02:04 b06s14le named[8743]: unexpected RCODE (SERVFAIL) resolving ‘dns.sh.cnuninet.net/A/IN’: 211.94.33.194#53
May 22 04:02:04 b06s14le named[8743]: unexpected RCODE (SERVFAIL) resolving ‘dns.sh.cnuninet.net/AAAA/IN’: 211.94.33.194#53
May 23 04:02:03 b06s14le named[8743]: lame server resolving ‘213.165.94.211.in-addr.arpa’ (in ‘165.94.211.in-addr.arpa’?): 211.94.65.97#53
May 23 04:02:04 b06s14le named[8743]: lame server resolving ‘213.165.94.211.in-addr.arpa’ (in ‘165.94.211.in-addr.arpa’?): 211.94.65.97#53

this does not mean much to me, well not yet at least.

I found another log with tis in it

May 25 19:17:34 b06s14le sendmail[30549]: n4PNHXkO030549: from=<Zaficionado@futureofchildren.org>, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=120.197.220.87.dynamic.jazztel.es [87.220.197.120]
May 25 19:18:10 b06s14le sendmail[30592]: n4PNI9Vk030592: ruleset=check_rcpt, arg1=<minette@saweb.biz>, relay=ctb-mesg8.saix.net [196.25.240.78], reject=550 5.7.1 <minette@saweb.biz>… Relaying denied
May 25 19:18:10 b06s14le sendmail[30592]: n4PNI9Vk030592: from=<amalia@alternafruit.co.za>, size=35619, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=ctb-mesg8.saix.net [196.25.240.78]
May 25 19:18:18 b06s14le sendmail[30593]: n4PNIHkk030593: ruleset=check_rcpt, arg1=<shane@swish.co.za>, relay=gw-brasil-12.14.contato.net [201.76.12.14], reject=550 5.7.1 <shane@swish.co.za>… Relaying denied
May 25 19:18:19 b06s14le sendmail[30593]: n4PNIHkk030593: from=<Javier-ohsnakni@engoulevent.com>, size=3756, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=gw-brasil-12.14.contato.net [201.76.12.14]

Seems to not allowing relay of emails

Is the system named saweb.biz or is there an entry in /etc/postfix/virtual for this domain ("saweb.biz saweb.biz") plus one for the user?

The server name is supposed to be saweb.biz and there are entries also in /etc/postfix/virtual for them.

So just to be ultra clear, in your "virtual" file, there is an entry that reads:

[code:1]saweb.biz saweb.biz[/code:1]

In addition to the various entries for the users within that domain?
-Eric

Just to be sure.

Where do I find this file to check it.

I just got a rejected reply to an email I sent to it on my other email account here is the reply I got.

I have added a forward email to another address to the main account and I do get the forwarded email.

QUOTE

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

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 attached returned message.

               The mail system

<binnemanbou.hosting@b06s14le.localdomain> (expanded from
<Binnemanbou@saweb.biz>): cannot update mailbox
/var/mail/binnemanbou.hosting for user binnemanbou.hosting. cannot open
file: Permission denied

<shane.hosting@b06s14le.localdomain> (expanded from <shane@saweb.biz>): cannot
update mailbox /var/mail/shane.hosting for user shane.hosting. cannot open
file: Permission denied

UNQUOTE

I am also having a problem with another domain not showing up,
even though its settings are identical to that of a domain that works with just the domain names etc changed.

Hrm, that looks like it could be a Postfix or procmail configuration problem. And/or a remnant of the hostname issue :slight_smile:

Had you installed this server using Virtualmin’s install.sh script?

Either way, could you post the contents of:

  1. /etc/postfix/main.cf

  2. /etc/procmailrc

Thanks,
-Eric

Hi Eric

Here is

/etc/procmailrc

DROPPRIVS=yes
:0fw
| /usr/bin/spamassassin
:0

  • ^X-Spam-Status: Yes
    $HOME/spam

If it would make it easier I can email you the
url and login details for webmin on the server,
If I can’t trust you who can I then.

Regards
Shane

Thanx will give it a go.

The system is a dedicated server with just webmin installed when I got it.

I installed virtualmin and then from within virtualmin installed Postfix.

Thast what I can remember it was done almost a month ago.

Hi Eric

This line did not work

mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME

I got an email back with this in it.

The mail system

<shane.hosting@b06s14le.localdomain> (expanded from <shane@saweb.biz>): Command
died with status 127: "/usr/bin/procmail-wrapper -o -a $DOMAIN -d
$LOGNAME". Command output: sh: /usr/bin/procmail-wrapper: No such file or
directory

This

/usr/bin/procmail-wrapper

does ot exist on the server,

but I did find this

usr/bin/procmail

Well, I think you missed the part of my post where I mentioned:

And the above requires the procmail-wrapper package be installed.

Having that package will solve this particular problem :slight_smile:

The thing to remember, though, is that you ought to take a really deep breath now, and prepare yourself for some work.

Virtualmin’s install.sh script configures an awful lot for you, so you’ll have to tune all of that manually.

You might want to take a peek at the portion of the installer that configures email to get an idea of what all you’ll want to tweak to get everything setup on your server:

http://software.virtualmin.com/lib/mail-setup.pl

What you’re missing ATM is the procmail-wrapper program, and to get that, you’ll need to either manually download it from the Virtualmin software repository, or setup a yum .repo file in /etc/yum.repo.d to automatically handle that for you so you can just run “yum install procmail-wrapper”.

Hopefully that gives you a push in the right direction :slight_smile:
-Eric

Hi Eric.

2 questions.

1 I already tried running "yum install procmail"

this is reply I got.

yum install procmail
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

do I still need to do the procmail-wrapper one seperately.

2nd Question.

Can I still run the install.sh on the system? If so how do I go about it.
Does not matter if it over writes things as long as the contents of the virtual domains are not lost.

I need to sort this out in the quickest way possible as my old server will expire soon.

1 I already tried running "yum install procmail"

do I still need to do the procmail-wrapper one seperately.

Of course. procmail is not the same as procmail-wrapper. :wink:

Can I still run the install.sh on the system? If so how do I go about it. Does not matter if it over writes things as long as the contents of the virtual domains are not lost.

Yes, if you’re not in production yet, and can deal with it bungling some of your configuration, it should be fine. Can’t make it much worse if things are already a mess.

Just make sure you have good backups (I know you have good backups already, right?!).

Well I went another root and told the techys to redo the dedicated server.

I will start from scratch.

When I tried downnloading virtualmin earlier using wget
(I think that was what is is called)

It asked me about a license when I tried to install over the old copy,
I want to install the free one so is there another download I must use?

Once downloaded I will try installing it from ssh access.