• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Allowing email users to login after upgrade

theywill

Basic Pleskian
---------------------------------------------------------------
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk 10.3, CentOS 5.6 64-bit

PROBLEM DESCRIPTION AND STEPS TO REPRODUCE

After upgrade to Plesk 10x, mail users can no longer login via the control panel to adjust their mail settings, such as the autoresponder.

ACTUAL RESULT

See above.

EXPECTED RESULT

I would expect that all email users that could previously login, would still be allowed to login to change their settings.

ANY ADDITIONAL INFORMATION

This problem occurred after the upgrade and affects existing accounts. New accounts created via the Users tab are not affected (they are able to login).

I am able to update individual accounts, using the Users tab, Change Settings, and applying a password. There are two problems with this. 1) I need to update hundreds of accounts. 2) If the email account address is associated with another user role, such as a customer, an email address already in use error results.

I also think the email user login is clunky.

--------------------------------------------------------------

Thank you,
James
 
Yes; it's not really relevant.

The problem is that users can no longer administer their auto responder. To manually edit their role permissions is going to take hours.

James
 
Right now, customers are getting around this problem by giving their email users access to their customer-level control panel login. That's obviously less than ideal and a real embarrassment for me and my company.

What I need is some kind of query that will allow me to update all email users so that they can again login to edit their email settings and only their email settings.

Thank you,
James
 
Well, a solution didn't come soon enough. I just lost the email management for a very important, large account, in part because of this issue. When end-users can't manage their email accounts any more, it's a big problem. That's not a reasonable change.

EXPECTED RESULT
I would expect that users could log into the control panel to manage their email settings, as before.

Thank you,
James
 
...

EXPECTED RESULT
I would expect that users could log into the control panel to manage their email settings, as before.

Thank you,
James


Why you can not use section 'Change Mail Account Setting' for these purposes?
 
theywill, have you had any joy with this?

My migrated users are OK logging in - as long as the email address in question wasn't also the domain owner's email address.

I too have lots of accounts that a manual update would be too time consuming. An SQL query to do this automatically would be a good solution.
 
The following script enables control panel access for all mail names:

Code:
#/bin/bash
mysql -uadmin -p`</etc/psa/.psa.shadow` -Dpsa -Ns \
  -e"select concat(m.mail_name,'@',d.name) from domains d,mail m where d.id=m.dom_id" | \
while read E; do
  /usr/local/psa/bin/mail -u "$E" -cp-access true
done

This command can take about 1 hour if Plesk server contains 3000 mail accounts.
 
Plesk 10.4.4 , CentOS 6 x64

Does anyone have a solution for this issue -

Server: Plesk 10.4.4 , CentOS 6 x64

Email account users cannot login at https://servername:8443 with their email address and password to configure their Auto Responders etc.

The /usr/local/psa/bin/mail command does not include a -cp-access option in 10.4.4.

Christopher.
 
Does anyone have a solution for this issue -

Server: Plesk 10.4.4 , CentOS 6 x64

Email account users cannot login at https://servername:8443 with their email address and password to configure their Auto Responders etc.

The /usr/local/psa/bin/mail command does not include a -cp-access option in 10.4.4.

Christopher.

I have the same problem.

Any news ?
 
We've just upgraded our server and full client base to 10.4 from 8.6 and I have lots of inquiries from clients regarding the exact same issue.

After many hours of testing and support from Hostway - it appears to be a permissions issue. I can create a new User, assigned to "Mail User" and access to the Plesk panel as expected. But the client email list that was transferred using Migration Manager is not fully editable or I am missing something. I select a User, click "Change Settings", and there is an option: E-mail address which is also used as a username for logging in to the Panel
The new User has the first choice selected: Create an e-mail address under your account
and it works fine.
The existing User was assigned a new User "Mail User 1" which I changed to "Mail User" but when I select it and Change Settings, the 2nd choice is selected: Use an external e-mail address
I cannot change this setting. So something in the inner permissions is causing the problem.

Any ideas? Parallels support staff?

Thank you.
 
Last edited by a moderator:
has anyone got an update on this issue?

I cannot believe there has been no solution to this. I was just planning on the migration of 4 Parallels Pro servers to Plesk but have now put that on hold.

If the idea was of 'added security' by having a CP user and and email user, then that was *very* shortsighted as 99% of the time you need the add the user in both places anyway, so no different to having 1 user access to all.

Any real solutions?
 
I would like to «up» this post, we have the same issue, running Panel 11.0.9, our «user» accounts are no more linked by the mailboxes.

It would be nice to provide something like -cp-access.

Any solution ?
 
The command :

mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa -e 'update mail set userid = 0 where mail.userid!=0;'

Solved our problem.

It sets in the database 'psa', in the table 'mail', all the 'userId' (used to link from a mail account to a plesk user account) at 0 (which is equivalent to 'no user').

Then we installed Vacation (Horde plugin) on our 11.0.9 Panel in order to get a working autoresponder.
This page http://blog.felix-griewald.de/2010/...enheitsnachricht/comment-page-1/#comment-5566 saved us. (German inside)
 
Did parallels ever post a solution for this?
Did anyone at Parallels ever really solve this?

The script and the mysql command both did not work for us. We're at version 11.5.30 which *still* suffers from this, apparently. Not for all customers, making it even harder to solve.
 
Restoring control panel access for mail users in Plesk 11

OK, after fiddling around a few hours this is the succesful result. This worked for us on Plesk 11.5.30 within Centos 5.9.
Code:
#!/usr/bin/perl
# file: /root/scripts/recreate_mail_user_accounts.pl
# Author: Stanislav Sinyagin <[email protected]>
# Improved for Plesk Panel 11.5.30 on CentOS 5.9 by Julius Thijssen @ driebit.nl
## the script reads all mailboxes for a domain and creates users with the same 
## passwords and gives them Mail User roles (so they can set Autoreplies and such)
## There might be error messages if the Mail User exists already or if a user 
## account does not exist before deleting. They are quite normal and are harmless.

use strict;
use Getopt::Long;
use DBI;

my $domain;
my $limit;

my $ok = GetOptions('domain=s' => \$domain,
                    'limit=s' => \$limit);

if( not $ok or not defined($domain)  or
    scalar(@ARGV) > 0 )
{
    print STDERR "Usage: $0 --domain=DOMAIN [--limit=XXX]\n";

    exit 1;
}

my $dbpw = `cat /etc/psa/.psa.shadow`;
$dbpw =~ s/\s+//gm;

my $dbh = DBI->connect('DBI:mysql:database=psa',
                       'admin',
                       $dbpw,
                       {RaiseError => 1,
                        AutoCommit => 1});

die() unless $dbh;

my ($owner) = $dbh->selectrow_array
    ('SELECT clients.login ' .
     'FROM  domains, clients ' .
     'WHERE domains.cl_id=clients.id AND domains.name=\'' . $domain . '\'');

die("Cannot find owner for domain $domain") unless defined($owner);

my $cmd;
my $rcode;

$cmd = sprintf('/usr/local/psa/bin/role --create \'Mail User\' -owner %s',
               $owner);    
$rcode = system($cmd);

if( $rcode != 0 )
{
    print STDERR ("Error executing: \n" . $cmd);
    exit(1);
}

my $limit_clause = '';
if( defined($limit) )
{
    $limit_clause = ' AND mail.mail_name LIKE \'%' . $limit . '%\' ';
}

my $sth = $dbh->prepare
    ('SELECT mail.mail_name, password ' .
     'FROM accounts, mail, domains ' .
     'WHERE ' .
     ' mail.dom_id=domains.id AND ' .
     ' mail.account_id=accounts.id AND ' .
     ' domains.name = ? ' .
     $limit_clause .
     'ORDER BY mail.mail_name' );

$sth->execute($domain);

while(my ($mailname, $passwd) = $sth->fetchrow_array())
{
    my $account = $mailname . '@' . $domain;

    if( not defined($passwd) or length($passwd) == 0 )
    {
        $passwd = 'changeme000';
    }

    printf("-----\nProcessing user: %s\n", $account);

    $cmd = sprintf('/usr/local/psa/bin/user --delete %s', $account);    
    $rcode = system($cmd);

    if( $rcode != 0 )
    {
        print STDERR ("Error executing: \n" . $cmd);
        exit(1);
    }

    $cmd = sprintf('/usr/local/psa/bin/user --create %s -passwd \'%s\' -cname %s ' .
                   '-role "Mail User" -owner %s',
                   $account, $passwd, $account, $owner);

    $rcode = system($cmd);

    if( $rcode != 0 )
    {
        print STDERR ("Error executing: \n" . $cmd);
        exit(1);
    }

    printf("Finished user: %s\n-----\n", $account);
}
 
Back
Top