No permission for xxx

Issue #339 on hold
Antonio Trogu created an issue

I've already read an issue about this problem but no reply.

I'm testing version 0.1.24 for production use.

When I log in via IMAP authentication I'm able to find my messages, but clicking on one of them always gives me "No permission for ..." instead of showing the message body.

This works correctly instead with the auditor user.

TIA.

Antonio

Comments (13)

  1. Janos SUTO repo owner

    Show me the sphinx query you performed (see the maillog). Then show me the To/Cc lines from the message itself.

  2. Antonio Trogu reporter

    Thanks, jsuto.

    This is the sphinx search query:

    [Tue Jul 8 15:52:42.904 2014] 0.000 sec [ext2/0/ext 22 (0,1000)] [dailydelta1,main1] @from aeusebi

    And this is the To: header line (no Cc: in this one - my address modified for privacy reasons):

    To: Antonio Trogu a.trogu@xxxx.it

  3. Antonio Trogu reporter

    Sorry, the previous query line was from the query.log. The following is the correct one from the maillog:

    Jul 8 15:52:42 dave piler-webui[9336]: sphinx query: 'SELECT id FROM dailydelta1,main1 WHERE MATCH('@from aeusebi' ) ORDER BY sent DESC LIMIT 0,1000 OPTION max_matches=1000' in 0.00 s, 22 hits

  4. Janos SUTO repo owner

    OK, so far, so good. Now check the settings menu in the gui (it's on the upper right corner), and verify that all your email addresses are listed there. The "no permission" error indicates that you attempt to access a message, but neither the From nor the To/Cc fields match the your known email addresses.

  5. Antonio Trogu reporter

    Thanks for your reply, jsuto. In the email field of my settings page I see only my username, instead of my complete email address. Could this be because of having logged in via IMAP authentication? (We log in to our mail server with username only, so how can piler know the complete mail addresses?)

  6. Janos SUTO repo owner

    Yes, this must be definitely an issue. Is it possible to use your email address as an imap username? Or is it possible to use ldap authentication? If none of these may work out, then you may either create local users for piler or hack model/user/auth.php, and locate the following function (~274th line):

    private function checkLoginAgainstIMAP($username = '', $password = '') {

    then replace

    $emails = array($username);

    with

    $emails = array($username . '@yourdomain.com');

    If it works, then I'll add an imap option to do this.

  7. Antonio Trogu reporter

    jsuto, sorry for my delay in replying, but I'm very busy on other matters in this period.

    Your suggestion has been really helpful, but the solution to this problem is still quite complex for us, since we can't login with the email address nor via LDAP. Furthermore, on our mail server we manage multiple domains and hundreds of users, with many aliases, lists, etc.

    So we are still working on this and I'll let you know our developments.

  8. Janos SUTO repo owner

    OK, no problem, take your time. Where do you store the email settings (eg. address, alias, list)? If you insist on imap auth, I'm not sure how piler can retrieve these data. Another option could be updating the piler user and email tables matching your settings. Not sure if it's feasible to you, just an idea.

  9. Antonio Trogu reporter

    jsuto, thanks. I'm back from vacation but still waiting for my consultant. I'll reopen this as soon as possibile.

    To answer your questions, 1) users, aliases and lists are stored into text files on the linux mail server, and 2) they are too many and too quickly changing to be able/convenient to update them manually into piler.

  10. Janos SUTO repo owner

    OK, no problem. Btw. what kind of mail server (and perhaps other components) do you have? Perhaps there's an API for retrieving user info, and membership data, etc.

  11. Log in to comment