- edited description
No permission for <XXX>
Hello there
I'm having problems with the message 'no permission for XXX' when accessing some emails in the web GUI, but I've noticed that it happens when the to
field is quoted, for example 'user@domain.com'. The same user can see his messages when the imported email has no quotes in the to
field
The emails where imported (apparently) successful with the commands:
$ readpst -M -b /tmp/2013_big_file.pst
$ pilerimport -d "Carpetas personales"
I've tried to update the v_message table
with success:
Inicial state with quotes:
mysql> select `to` from v_messages where id=63323;
+----------------------------+
| to |
+----------------------------+
| 'ldgarcia@mydomaint.com' |
+----------------------------+
Updated with:
mysql> update v_messages set `to`='ldgarcia@mydomain.com' where id=63323;
mysql> select `to` from v_messages where id=63323;
+--------------------------+
| to |
+--------------------------+
| ldgarcia@mydomain.com |
+--------------------------+
Then the user is able to see the email in the web GUI
The problem is that I've a bunch of users with a bunch of this kind of emails..
Is there any way to solve this in the import process?
I've looking in the import.c
with no success so far
Any help or suggestions will be highly appreciated
Environment Info
$ hostnamectl
Static hostname: piler
Icon name: computer-vm
Chassis: vm
Boot ID: XXXYYYZZZ
Operating System: Ubuntu 14.04.4 LTS
Kernel: Linux 3.13.0-91-generic
Architecture: x86_64
$ ls piler-1.1.1.tar.gz
piler-1.1.1.tar.gz
$ apt list apache2 mysql-server php5 libapache2-mod-php5 php5-mcrypt php5-mysql php5-ldap php5-gd php5-memcache php5-curl php5-xcache libtre5 libzip2 sysstat catdoc poppler-utils unrtf tnef xlhtml memcached libpst4 ppthtml clamav pst-utils sphinxsearch libwrap0-dev libssl-dev libtre-dev libmysqlclient-dev libzip-dev libpst-dev
Listing... Done
apache2/trusty-updates,trusty-security,now 2.4.7-1ubuntu4.13 amd64 [installed]
catdoc/trusty,now 0.94.4-1.1 amd64 [installed]
clamav/trusty-updates,trusty-security,now 0.98.7+dfsg-0ubuntu0.14.04.1 amd64 [installed]
libapache2-mod-php5/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.19 amd64 [installed]
libmysqlclient-dev/trusty-updates,trusty-security,now 5.5.50-0ubuntu0.14.04.1 amd64 [installed]
libpst-dev/trusty,now 0.6.59-1build1 amd64 [installed]
libpst4/trusty,now 0.6.59-1build1 amd64 [installed]
libssl-dev/trusty-updates,trusty-security,now 1.0.1f-1ubuntu2.19 amd64 [installed]
libtre-dev/trusty,now 0.8.0-3ubuntu1 amd64 [installed]
libtre5/trusty,now 0.8.0-3ubuntu1 amd64 [installed]
libwrap0-dev/trusty,now 7.6.q-25 amd64 [installed]
libzip-dev/trusty,now 0.10.1-1.2 amd64 [installed]
libzip2/trusty,now 0.10.1-1.2 amd64 [installed]
memcached/trusty,now 1.4.14-0ubuntu9 amd64 [installed]
mysql-server/trusty-updates,trusty-security,now 5.5.50-0ubuntu0.14.04.1 all [installed]
php5/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.19 all [installed]
php5-curl/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.19 amd64 [installed]
php5-gd/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.19 amd64 [installed]
php5-ldap/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.19 amd64 [installed]
php5-mcrypt/trusty,now 5.4.6-0ubuntu5 amd64 [installed]
php5-memcache/trusty,now 3.0.8-4build1 amd64 [installed]
php5-mysql/trusty-updates,trusty-security,now 5.5.9+dfsg-1ubuntu4.19 amd64 [installed]
php5-xcache/trusty,now 3.1.0-2 amd64 [installed]
poppler-utils/trusty-updates,trusty-security,now 0.24.5-2ubuntu4.4 amd64 [installed]
ppthtml/trusty,now 0.5.1-6ubuntu1 amd64 [installed]
pst-utils/trusty,now 0.6.59-1build1 amd64 [installed]
sphinxsearch/trusty,now 2.2.11-release-0ubuntu12~trusty amd64 [installed]
sysstat/trusty,now 10.2.0-1 amd64 [installed]
tnef/trusty,now 1.4.9-1 amd64 [installed]
unrtf/trusty,now 0.21.5-1 amd64 [installed]
xlhtml/trusty,now 0.5.1-6ubuntu1 amd64 [installed]
Comments (12)
-
reporter -
reporter - edited description
-
reporter - edited description
-
reporter - edited description
-
repo owner Show me the headers for such a mail. The trouble is that ' seems to be a legitim character in email addresses.
-
repo owner -
assigned issue to
-
assigned issue to
-
reporter Hello. Here are the header of a similar email with the quote situation
Status: RO From: "Patricio Navarrete" <pnavarrete@mydomain.com> Subject: bla To: 'bcevallos@mydomain.com'; 'acedeno@mydomain.com' Cc: 'cemento@mydomain.com'; Freddy Cartagena Date: Fri, 03 Jun 2016 14:13:17 +0000 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="--boundary-LibPST-iamunique-1332301370_-_-"
As a work around, I've changed line 702 in
/var/www/piler/model/search/search.php
, from:$query = $this->db->query("SELECT id FROM " . VIEW_MESSAGES . " WHERE id=? AND ( `from` IN ($q) OR `to` IN ($q) )", $arr);
To:
$query = $this->db->query("SELECT id FROM " . VIEW_MESSAGES . " WHERE id=? AND ( REPLACE(`from`, '\'', '') IN ($q) OR REPLACE(`to`, '\'', '') IN ($q) )", $arr);
And it worked, but I've noticed that the header remains using
;
incorrectly as the email address separator, which causes that the email client (Mac Mail in my case) reports all the email address as oneAny suggestions?
-
repo owner What application made this email? Anyway I suspect that the To/Cc headers are not correct. I'll check the RFCs to see if I'm correct.
-
reporter Hello, the email comes from a MS Outlook PST, that I've converted and imported with:
$ readpst -M -b /tmp/2013_big_file.pst $ pilerimport -d "Carpetas personales"
Please let me know if the change I've made in
/var/www/piler/model/search/search.php
, could be a solution or another clue or suggestion -
repo owner Yes, your change might be a solution.
-
reporter Ok, I'll improve it with a REGEX (to escape emails with middle quote?) and post it here for a future reference.
Thanks for your quick answers!
-
repo owner - changed status to wontfix
OK, then the issue is closed.
- Log in to comment