restore message to mailbox, not parsing to address

Issue #37 resolved
Former user created an issue

I've been battling with a problem for a few days and can't seem to resolve it. Piler is accepting mail and archiving it fine. However when I try and use the 'restore message to mailbox funtion' it's failing.

From what I can see it doen't seem to parse a valid RCPT TO: address from the email in the archive store. This is occurring using both a local postfix server a remote server as a smarthost.

I can send mail from the command line on the piler box and its relayed correctly.

Any help would be appreciated.

mail.log output

< localhost[127.0.0.1]: RCPT TO: <>
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: extract_addr: input: <>
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: warning: Illegal address syntax from localhost[127.0.0.1] in RCPT command: <>
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: extract_addr: in: <>, result:
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: > localhost[127.0.0.1]: 501 5.1.3 Bad recipient address syntax
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: watchdog_pat: 0x7ffc754f3770
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: < localhost[127.0.0.1]: DATA
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: > localhost[127.0.0.1]: 554 5.5.1 Error: no valid recipients
Nov 26 16:41:55 mailarc postfix/smtpd[12005]: watchdog_pat: 0x7ffc754f3770
Nov 26 16:42:55 mailarc postfix/smtpd[12005]: < localhost[127.0.0.1]: Received: by piler
Nov 26 16:42:55 mailarc postfix/smtpd[12005]: warning: non-SMTP command from localhost[127.0.0.1]: Received: by piler
Nov 26 16:42:55 mailarc postfix/smtpd[12005]: > localhost[127.0.0.1]: 221 2.7.0 Error: I can break rules, too. Goodbye.

Piler Build.

piler -v
piler 0.1.22, build 724, Janos SUTO <sj@acts.hu>

Build Date: Fri Nov 23 12:03:32 EST 2012
Configure command: ./configure --enable-memcached --localstatedir=/var

Comments (6)

  1. Janos SUTO repo owner

    please get the piler-id from your mailling regarding this email. It's something like 40000.........<lots of hexadec numbers>

    the connect to the mysql database and issue the following queries:

    mysql> select id from metadata where piler_id='40000....';

    you get a number let's call it x, then

    mysql> select * from rcpt where id=x; --substitute x with the number you got

    please show me these outputs.

    Next question: are you an ordinary user or an auditor?

  2. Andrew Haskell
    mysql> select id from metadata where piler_id='4000000050b2b1a901058b147df6893b9286';
    +------+
    | id   |
    +------+
    | 5408 |
    
    +------+
    mysql> select * from rcpt where id=5408;
    +------+-------------------------------+----------------+
    | id   | to                            | todomain       |
    +------+-------------------------------+----------------+
    | 5408 | andrew.haskell@mydomian.com | mydomain.com |
    +------+-------------------------------+----------------+
    1 row in set (0.00 sec)
    

    So it seems the information is there. It was as a regular user, I made myself an auditor and it worked. Changed back to a regular user and it failed.

  3. Janos SUTO repo owner

    OK, it looks fine. Please login as administrator, then open the domain administration page, and make sure you have listed all of your domains, including "mydomian.com". I think this will fix the problem.

    If not, then go to the user administration page, find this user and verify that this email address is on the list of his email addresses.

    Then I'd like you to fire up "ngrep" and watch the smtp traffic to your smarthost, eg. ngrep -X -e port 25, and let me see what piler sends to postfix.

    And finally one more debugging: edit index.php, and add the following right after the "session_start();" line:

    print_r($_SESSION);

    then reload the page and verify that andrew.haskell@mydomian.com is in the email array. I suspect that the recipient address is somehow not present.

  4. Janos SUTO repo owner

    Thanks for the exhaustive debugging, I managed to identify and fix the problem.

    Please download the latest master branch, and update the following files:

    model/user/auth.php model/user/user.php

    Then logout, and login again with sso, and you should see a value for the session email

  5. Janos SUTO repo owner

    And you should be able to restore the selected message. If not then reopen the issue please.

  6. Log in to comment