MRatWork Forum by Mustafa Ramadhan
Sawo Project - Kloxo-MR Discussions => Kloxo-MR Bugs and Requests => Topic started by: KloxoLittleFish on 2016-03-07, 16:52:34
-
Since last update, mails not work. In maillog always:
send: delivery 648: deferral: not_allowed_to_perform_deliveries_as_root./
sh /script/sysinfo;
A. Control Panel:
- Kloxo-MR: 7.0.0.b-2016030202
- Web: hiawatha-10.1.0-f.6.mr.el6.x86_64
- PHP: php54s-5.4.40-1.ius.el6 (fpm mode)
B. Plateform:
- OS: CentOS release 6.7 (Final) x86_64
- Hostname: skobox.kobox.org
C. Services:
1. MySQL: MariaDB-server-10.0.24-1.el6.x86_64
2. PHP:
- Branch: php54-cli-5.4.45-1.ius.el6.x86_64
- Multiple:
* php52m-5.2.17-102.mr.el6
* php53m-5.3.29-1.ius.el6
* php54m-5.4.40-1.ius.el6
* php55m-5.5.24-1.ius.el6
* php56m-5.6.8-1.ius.el6
- Used: --Use PHP Branch--
3. Web Used: apache
- Hiawatha: --unused--
- Lighttpd: --uninstalled--
- Nginx: --uninstalled--
- Httpd: httpd-2.2.31-1.mr.el6.x86_64
- PHP Type: php-fpm_event
4. WebCache: none
- ATS: --uninstalled--
- Squid: --uninstalled--
- Varnish: --uninstalled--
5. Dns: bind
- Bind: bind-9.9.7-1.mr.el6.x86_64
- DJBDns: --uninstalled--
- NSD: --uninstalled--
- PowerDNS: --uninstalled--
- Yadifa: --uninstalled--
6. Mail: qmail-toaster-1.03-1.3.55.mr.el6.x86_64
- pop3/imap4: courier-imap-toaster-4.1.2-1.3.18.mr.el6.x86_64
- spam: spamassassin
/home/vpopmail/bin/vdominfo
domain: mydomain1.com
uid: 0
gid: 0
dir:
users: 2147483646
domain: mydomain2.com
uid: 0
gid: 0
dir:
users: 0
domain: mydomain3.com
uid: 7801
gid: 7801
dir: /home/lxadmin/mail/domains/mydomain3.com
users: 0
domain: mydomain4.com
uid: 7801
gid: 7801
dir: /home/lxadmin/mail/domains/mydomain4.com
users: 0
:'(
-
mydomain1.com and mydomain2.com use uid/gid = 0 that mean root. That's why found error 'not_allowed_to_perform_deliveries_as_root'
-
sh /script/cleanup; sh /script/fixmail-all; reboot;
... And still does not work ...
why do it use root? where/how fixe-it? Before update it worked fine. What has changed?
-
Check ownership of /home/<user>/mydomain1.com and /home/<user>/mydomain2.com
-
Check ownership of /home/<user>/mydomain1.com and /home/<user>/mydomain2.com
they are ok:
drwxr-x--x userdomain1 apache
drwxr-x--x userdomain2 apache
where did /home/vpopmail/bin/vdominfo get the info?
-
Inform here 'id userdomain1; id userdomain2'.
-
uid=7799(userdomain1) gid=7799(userdomain1) grupos=7799(userdomain1)
uid=7800(userdomain2) gid=7800(userdomain2) grupos=7800(userdomain2)
-
Inform from 'id <user>' not match to 'vdominfo'.
-
I know ... but ... why? ... from where did 'vdominfo' get the uid-info?
in ls -l /home/lxadmin/mail/domains/
*
drwx------ userdomain2 userdomain2 mydomain2.com
*
in ls -l /home/lxadmin/mail/domains/mydomain2.com
*
drwx------ vpopmail vchkpw postmaster
*
-
From 'vpopmail' database.
-
pw_uid and pw_gid are 0 in vpopmail table emails (in all emails)
-
Search domain like 'dom_1234' in dir_control where 1234 is uid of client
-
Are: dom_7800, dom_7801 and dom_89. Not dom_7799
All have equal values but different cur_users.
What can I do?
-
The problem is 'dom_89'. Try rename to 'dom_7799'
-
89 is the vpopmail user, i insert dom_7799, sh /script/fixmail-all, reboot, but not work.
I can send emails but not read. In log show:
send: delivery 811: deferral: Not_allowed_to_perform_deliveries_as_root./
*
-
You are missing iud 7799 and 89 (less then 500) act like 'root'.
-
renamed 89 to 7799 .. but not work
-
I researched ... "/home/vpopmail/bin/vdominfo" info is in "/var/qmail/users/assign" file ...
I see here a bad format string:
+mydomain.com-:mydomain.com:::/home/lxadmin/mail/domains//home/vpopmail/domains/mydomain.com:-::
good format string (7800 is my userdomain):
+mydomain.com-:mydomain.com:7800:7800:/home/lxadmin/mail/domains/mydomain.com:-::
... then i go ... "../bin/fix/fix-qmail-assign.php" and in resetQmailAssign function i read ...
$mpath = "/home/lxadmin/mail/domains";
and
$con->select_db("vpopmail");
$result = $con->query("SELECT pw_name, pw_domain, pw_dir FROM vpopmail");
if (!isset($result)) { return; }
$n = array();
while ($row = $result->fetch_array(MYSQLI_ASSOC)) {
// MR -- need this team to fix issue where prefix account as the same as prefix domain
// like your@yourdomain.com (the same 'your')
$temp = str_replace($mpath . "/", '', $row['pw_dir']);
$n[$row['pw_domain']] = $mpath . "/" . str_replace("/" . $row['pw_name'], '', $temp);
}
but in my "vpopmail" database ... old domains have: "pw_dir"=> /home/vpopmail/domains/mydomain.com/Postmaster ...
To resolve it, I have updated the "pw_dir" field in "vpopmail" database:
update vpopmail set pw_dir=replace(pw_dir, '/home/vpopmail/domains/','/home/lxadmin/mail/domains/') where pw_dir like '/home/vpopmail/domains/%'
Then: sh /script/fixmail-all; sh /script/restart-mail;