Import from Maildir, no Mails to be seen for local user

Issue #816 closed
Martin created an issue

Hi there,

I'm testing Piler at the moment on a VM inside a network, so I have to use local accounting.

This is what I have: Debian 8, Jessie / Piler 1.2.0 / Sphinxsearch 2.2.11

I'm importing Maildir via: $pilerimport -d $NAME /home/administrator/NAME

Where NAME is the name of the user and the Maildir. I'm doing this with several users and several Maildirs. NAME is different then.

Loggin in as admin@local and auditor@local shows all mails. Great! :D

Loggin in as NAME@local shows no mails. :(

I guess I'm doing something wrong and this is no bug. According to local users there is very small information on the web (as it should be, because this is not the usual way).

Not b.t.w., but mostly: MANY THANKS FOR THIS GREAT PIECE OF WORK! (Sorry for shouting, but it has to be said this way!)

Greetz Martin

Comments (7)

  1. Janos SUTO repo owner

    I'm glad that you like piler :-) When a regular user (no admin, no auditor) logs in, then the gui applies a filter to narrow the search in the background to his own emails. To do so it assigns a list of emails to the user. I suspect that this user has only @ local addresses, even though (I think) the emails have valid (@ realdomain.com) From and To/Cc addresses.

    To verify this check the sphinx query logged to mail log. If it has only @ local addresses applied (@ is replaced with X), then you have to fix the user. If you have a central user database, eg. ldap, AD, imap, ... then you should prefer them over the local piler database.

  2. Martin reporter

    Hey Janos,

    Thanks for your quick reply and the well-grounded answer.

    Some voice deep inside me calls "Don't touch that database!" and I guess I will follow her. "fixing" a user might end up in "fixing" other stuff, while "fixing" likely will mean "reinstalling".

    So I will connect my piler with the IMAP-Database, but will not load mails from there. Why not. :)

    Greetz Martin

  3. Janos SUTO repo owner

    So, assuming you have authenticated against the imap server, do you have a login name containing the domain part, eg. user@domain? Can you show me the search query when you you just hit the search button?

  4. Martin reporter

    Hey Janos,

    I managed to do the authentification against imap, but I felt, that it would be better to go to bed. So no more testing last night.

    What I can say after first tests is: I was using username@imap.server and password for the mailbox. My provider runs a small debian even for every webhosting customer. That's pretty crazy, so the mailaddress is not the username. After login everything was empty. Why? Read on.

    I woke up just five minutes before my alarm clock was ringing with some idea in my mind. First walk was to the computer. not the cofe machine...

    I kicked out the authentification against imap and followed straight what you said, not touching the database, but the gui (on which I didn't had a closer look): 1. gui as admin@local > administration > domain => Put in all domains as Domain and Mapped Domain 2. gui as admin@local > administration > users => Asign "user@local" and all email addresses used in "E-Mail addresses" 3. gui as admin@local > administration > users => "local" in Domain Nothing else in there.

    Result: See all mails, when I log on as "user@local". Also auditor sees all the mails. If I delete one email address of the user, he can't see mails to those account, but auditor can.

    That's what I was searching for.

    Btw.: You have a very good attitude in here! You help out everyone, but not with explaining everything up to the end. You just show the way. By that I learnt a lot during the last days just reading some threads here.

    Thanks again for your kind help!

    Greetz Martin

  5. Martin reporter

    Found a way to manage this, solution is described in the last answer.

    This is no bug, but a "you have to know how to..."

    Home someone who is looking for that finds an answer in here.

  6. Log in to comment