HELP: migration issue email accounts cpanel to virtualmin

ok…here are some log files…

maillog

Mar 6 17:39:25 server postfix/smtp[2460]: A39F25F68003: to=no-reply889@workingin-australia.com, relay=none, delay=112768, delays=112699/0.02/69/0, dsn=4.4.1, status=deferred (connect to workingin-australia.com[203.89.183.105]: Connection timed out)
Mar 6 17:39:25 server postfix/smtp[2459]: 3E7C65F68005: to=no-reply167@workingin-australia.com, relay=none, delay=111638, delays=111568/0.08/69/0, dsn=4.4.1, status=deferred (connect to workingin-australia.com[203.89.183.105]: Connection timed out)
Mar 6 17:50:55 server dovecot: pop3-login: Disconnected: Input buffer full: user=warren@ww-cs.com, method=PLAIN, rip=::ffff:97.100.156.44, lip=::ffff:66.23.232.242
Mar 6 17:51:55 server postfix/smtpd[3749]: connect from clickcashvault.com[66.207.161.157]
Mar 6 17:51:55 server postfix/smtpd[3749]: CBF0625782EF: client=clickcashvault.com[66.207.161.157]
Mar 6 17:51:55 server postfix/cleanup[3758]: CBF0625782EF: message-id=1299451915.vjppoqwfhy@clickcashvault.com
Mar 6 17:51:55 server postfix/qmgr[2454]: CBF0625782EF: from=stayhome2@websiteloader.com, size=3302, nrcpt=1 (queue active)

*secure

Mar 6 17:26:26 server dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser= rhost=::ffff:97.100.156.44
Mar 6 17:26:26 server dovecot-auth: pam_succeed_if(dovecot:auth): error retrieving information about user warren@ww-cs.com
Mar 6 17:30:04 server su: pam_unix(su:session): session opened for user postgres by (uid=0)
Mar 6 17:30:04 server su: pam_unix(su:session): session closed for user postgres
Mar 6 17:35:03 server su: pam_unix(su:session): session opened for user postgres by (uid=0)
Mar 6 17:35:03 server su: pam_unix(su:session): session closed for user postgres
Mar 6 17:39:05 server webmin[2601]: Webmin starting
Mar 6 17:40:04 server su: pam_unix(su:session): session opened for user postgres by (uid=0)
Mar 6 17:40:04 server su: pam_unix(su:session): session closed for user postgres
Mar 6 17:45:03 server su: pam_unix(su:session): session opened for user postgres by (uid=0)
Mar 6 17:45:03 server su: pam_unix(su:session): session closed for user postgres
Mar 6 17:50:03 server su: pam_unix(su:session): session opened for user postgres by (uid=0)
Mar 6 17:50:03 server su: pam_unix(su:session): session closed for user postgres
Mar 6 17:50:20 server dovecot-auth: pam_unix(dovecot:auth): check pass; user unknown
Mar 6 17:50:20 server dovecot-auth: pam_unix(dovecot:auth): authentication failure; logname= uid=0 euid=0 tty=dovecot ruser= rhost=::ffff:97.100.156.44
Mar 6 17:50:20 server dovecot-auth: pam_succeed_if(dovecot:auth): error retrieving information about user warren@ww-cs.com

If you type “grep warren@ww-cs.com /etc/passwd”, what output do you receive?

Also, can you attach your /etc/dovecot/dovecot.conf file to the thread here?

-Eric

ok when i type “grep warren@ww-cs.com /etc/passwd” i get no output:

[root@server ~]# grep warren@ww-cs.com /etc/passwd
[root@server ~]#

i attached the dovecot.conf file which is actually in the “etc” folder (there is no “dovecot” folder)…i had to give it a .txt extension to allow it to be attached.

thanks,
warren

Hmm, what if you run this:

grep warren /etc/passwd

Does that produce any output?

-Eric

yes it did eric…

[root@server ~]# grep warren /etc/passwd
warrenwo:x:500:500:Migrated cPanel server warrenworld.com:/home/warrenwo:/bin/sh
paypal.warrenworld:x:501:500::/home/warrenwo/homes/paypal:/dev/null
warren.ww-cs:x:565:517::/home/wwcs/homes/warren:/dev/null
[root@server ~]#

looking at this output i tried telnetting using warren.ww-cs.com instead of warren@ww-cs.com but got the same results…any ideas?

Well, try it with “warren.ww-cs” (no .com on the end).

If that works, we can discuss what to do from there :slight_smile:

-Eric

ok that worked!

hopefully we can get it to work using full email address like “warren@ww-cs.com” because all my clients have their email programs set up that way!

thanks,
warren

Well, whenever Virtualmin creates an account, it consults a setting in the server templates regarding how to add that account.

It sounds like it used that setting (which defaults to user.domain, and not user@domain.tld), rather than using specifically what you had previously in cPanel.

You can set the username format in System Settings -> Server Templates -> Default -> Mail for Domain, and set “Format for usernames that include domain” (all the way at the bottom) to user@domain.

The problem is that I don’t know of a way to change your existing users – you’d probably need to remove the Virtual Servers you have, and perform the import again.

-Eric

great…i changed the setting and will give it a try!

no problem deleting and re-migrating…i was planning on doing that anyway to update all the emails!

will keep you posted!

thanks again,
warren

woohoo! we have success!

i migrated a domain running wordpress…database is working and i was able to telnet in using full email as the login!

will do a full migration tonight!

i have another mail related question…is there a global way t (before i start migrating domains over) to for “domain.com/webmail” to redirect to usermin? i’m hoping to keep my clients from changing anything and right now they get to cpanels webmail by browsing to “domain.com/webmail

also can i do a global install of squirrelmail and will that take care of the “domain.com/webmail” issue. They are all used to squirrelmail but usermin doesn’t look to much different for them…

i am really liking virtualmin/webmim so far!

thanks,
warren

Well, Virtualmin creates some redirects for you, but they redirect webmail.domain.tld over to Usermin.

The same with admin.domain.tld – those are redirected to Virtualmin.

In System Settings -> Server Templates -> Default -> Apache Website, you can configure where exactly those redirects go… so if you have Squirrelmail installed in a given Virtual Server, you can make webmail redirect to it.

Using the above would be the easy way :slight_smile:

Could you do something with domain.com/webmail? Yes, you could add a mod_rewrite rule to each Virtual Server template, have it look for anyone browsing to /webmail, and when it finds a match, redirect it to your desired location.

You could add those rewrite rules to the “Directives and settings for new websites” section of the Apache Server Template.

However, that’s the harder way to set things up – I’d suggest using Virtualmin’s existing webmail.domain.tld and admin.domain.tld if possible :slight_smile:

-Eric

thanks eric…i think i will use virtualmins redirects for now…and not install squirrelmail : )

i really appreciate your help…i am feeling pretty good so far about switching from cpanel to virtualmin/webmin!

Sounds good!

I did want to offer though that having Virtualmin setup a redirect to squirrelmail using webmail.domain.tld is no problem, and that’s nice and simple to configure using the Server Template’s GUI.

A lot of folks are do just that, though more often redirecting to RoundCube (which has a pretty, AJAX interface).

-Eric

roundcube does look pretty good…

if i understand right i have to install roundcube or squirrelmail in one of the virtual servers and then have all other domains access it on that virtual server?

is there no way to install it globally…maybe in centos and then pointing the redirect to it?

The way I’d suggest doing it is to install RoundCube into a particular Virtual Server – let’s call it “myroundcube.com”.

Then, in the Apache Server Template – configure the webmail.domain.tld redirect to go to myroundcube.com.

So, any user on your server can then browse to webmail.domain.tld, which will redirect them to your central myroundcube.com installation.

-Eric

we have success! looks like almost everything is working!

one issue (so far)…it doesn’t seem that the redirects are working…if i try and go to “webmail.mydomain.tld” or “admin.mydomain.tld” it can’t find them…i do notice that the redirect adds “www.” to the address so it becomes “www.webmail.mydomain.tld”…could that be the problem?

thanks,
warren

Hmm, the redirect should send the user to exactly “webmail.mydomain.tld”.

One thing you could do is check in /etc/httpd/conf/httpd.conf, and verify the various VirtualHost blocks.

You’ll see a set of “RewriteCond” and “RewriteRule” lines – do the domains they redirect to look correct?

-Eric

they look good to me…here is one virtual host entry…

<VirtualHost 66.23.xxx.xxx:80>
SuexecUserGroup “#500” “#500
ServerName warrenworld.com
ServerAlias www.warrenworld.com
ServerAlias webmail.warrenworld.com
ServerAlias admin.warrenworld.com
DocumentRoot /home/warrenwo/public_html
ErrorLog /var/log/virtualmin/warrenworld.com_error_log
CustomLog /var/log/virtualmin/warrenworld.com_access_log combined
ScriptAlias /cgi-bin /home/warrenwo/public_html/cgi-bin
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/warrenwo/public_html>
Options -Indexes +IncludesNOEXEC +FollowSymLinks +ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /home/warrenwo/fcgi-bin/php5.fcgi .php
FCGIWrapper /home/warrenwo/fcgi-bin/php5.fcgi .php5

<Directory /home/warrenwo/cgi-bin>
allow from all

RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.warrenworld.com
RewriteRule ^(.) https://warrenworld.com:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.warrenworld.com
RewriteRule ^(.
) https://warrenworld.com:10000/ [R]
RemoveHandler .php
RemoveHandler .php5
IPCCommTimeout 31

Okay, then chances are that it’s something in the Virtual Server it’s redirecting to. There might be a .htaccess file that’s looking for a URL without a ‘www’ at the beginning, and it’s causing a redirect to a URL with a ‘www’. But in your case, that’s not desirable :slight_smile:

Take a peek in your public_html for a .htaccess, and see if that’s the issue :slight_smile:

-Eric