Forums

Resolved
0 votes
Hello forum and Dev

I have spend a lot of time on this issue where the functions on the filesystem work and can be verified however upon actioning a re-delivery task and consistently met with "Redelivery complete. Invalid message ID".

In summary the mail_archive app has been removed and re-installed, multiple times and also removing the mail_archive sql database and /var/clearos/mail_archive app folder so it can rebuild (successful!)... it appears there is a seperate database or logging system keeping track of archive messages outside of mail_archive? (see screenshot for the error I see using the app)

I can cat /var/clearos/mail_archive/import/xyz1234 and see the contents just fine in terminal, grab some header details and search using the app just fine, its only upon pulling the relevant email file does the app generate this error.

Aside from dumbing the whole install and starting fresh, what else is tracking the message ID for mail_archive??
Tuesday, November 14 2017, 06:05 AM
Share this post:

Accepted Answer

Wednesday, November 15 2017, 06:19 PM - #Permalink
Resolved
1 votes
Try pulling down version 3.4.4 just uploaded (may take 20 min for mirrors to sync).

If you know the database id of the message you're trying to resend, this version support command line resending:


/usr/sbin/mail-archive -a=redeliver -e=me@example.com -m=<DB_ID>


B
The reply is currently minimized Show
Responses (6)
  • Accepted Answer

    Wednesday, November 15 2017, 10:30 PM - #Permalink
    Resolved
    0 votes
    Working now as of 16/11/2017, thanks for the update. It has cost me a lot of time but I need a bigger solution anyway and this has pushed me to look hard at what I need so will run with this mail_archive for now. I am using amazon s3 and now amazon RDS (mariadb) on next project to have many hosts with one db and one file store.

    Thanks team
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 14 2017, 10:26 PM - #Permalink
    Resolved
    0 votes
    Discovery process

    File system acknowledgement
    ## terminal Start ##

    /usr/sbin/mail-archive -a=import
    Message 19633e8e8e6cb5f4860658dd8a7df96a import OK.
    Import complete - 1 messages. Updating stats table.
    Complete.
    Mail archival import complete.

    # ls -ll
    total 12
    -rw-r--r-- 1 webconfig webconfig 0 Nov 14 10:12 enabled
    drwx------ 2 root root 4096 Nov 14 19:39 error
    drwx------ 2 filter filter 4096 Nov 14 22:04 import. (this was root 700 originally on fresh install but made no difference changing to archive which was in CLROS v6.5)
    drwxr-xr-x 2 filter filter 4096 Nov 14 22:04 messages (as setup by install)

    cat import/19633e8e8e6cb5f4860658dd8a7df96a
    Received: from C07HQ4GUDJD1.local (xxxxxxxx.xxx.xxxxx [---------])
    by xxxxxxxx.xxx.xxxxx (Postfix) with ESMTP id 21BC18008
    for <yyyy@xxx.xxxxx>; Tue, 14 Nov 2017 22:04:07 +0000 (UTC)
    To: <yyyy@xxx.xxxxx>
    From: admin <zzzz@xxx.xxxxx>
    Subject: test 1104

    X-Clear-Delivered-To-899: yyyy@xxx.xxxxx
    Message-ID: <1cef877e-e436-2833-f12d-ce7908b6fcac@xxx.xxxxx>
    Date: Wed, 15 Nov 2017 11:04:06 +1300

    SQL
    MariaDB [mail_archive]> SELECT * FROM messages WHERE id=13
    -> ;
    +----+----------------------------------+----------------------------------+------------------+----------------------------------+------------------------------+------+-----------+------+---------------------+----------+------------+------------------+------------+
    | id | message_id | filename | delivered_to | to | from | cc | subject | size | date | keywords | attachment | archive_filename | encrypt_pw |
    +----+----------------------------------+----------------------------------+------------------+----------------------------------+------------------------------+------+-----------+------+---------------------+----------+------------+------------------+------------+
    | 13 | 19633e8e8e6cb5f4860658dd8a7df96a | 19633e8e8e6cb5f4860658dd8a7df96a | yyyy@xxx.xxxxx | Test User <yyyy@xxx.xxxxx > | admin <zzzz@xxx.xxxxx> | | test 1104 | 644 | 2017-11-14 22:04:06 | test | 0 | NULL | NULL |
    +----+----------------------------------+----------------------------------+------------------+----------------------------------+------------------------------+------+-----------+------+---------------------+----------+------------+------------------+------------+
    1 row in set (0.00 sec)


    ## terminal End ##

    Application usage

    Step 1
    https://accessmy.net/index.php/s/1Gy6JexZ6hkPiqD/download

    Step2
    https://accessmy.net/index.php/s/TMvJmazl9w5nJ2c/download

    Step3
    https://accessmy.net/index.php/s/Q8NbzffUHuFImKJ/download

    Step4
    https://accessmy.net/index.php/s/0vmA8kOtXPrf0Yi/download

    Step5
    https://accessmy.net/index.php/s/jKuHQgFOhuXzw64/download
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 14 2017, 10:11 PM - #Permalink
    Resolved
    0 votes
    Hello and thanks for the update yum --enablerepo=clearos-updates-testing upgrade app-mail-archive

    Updated, rebooted on second test to be sure. Same result, everything but re-delivery working.

    Update has tidied up the error message to more human readable but still not working. I have this on a linode instance for dev purposes. If you want the root for this I can pass it forward via private message.

    Be good to test terminal/command line usage with the right string of cmds/options to do it.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 14 2017, 08:00 PM - #Permalink
    Resolved
    0 votes
    In a couple of hours, when the mirrors have synced, please run:

    yum --enablerepo=clearos-updates-testing upgrade app-mail-archive


    Please post back here if that solves your issue.

    Thanks,

    B
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 14 2017, 05:24 PM - #Permalink
    Resolved
    0 votes
    Luke,

    I've tracked this down to a newly introduced bug in the way the PHP framework (CodeIgniter) handles form array's. Working on a fix...

    B.
    The reply is currently minimized Show
  • Accepted Answer

    Tuesday, November 14 2017, 11:55 AM - #Permalink
    Resolved
    0 votes
    Can someone provide a working terminal command to redeliver messages via archive for any specific ID for testing?

    ie
    /usr/sbin/mail-archive -a=redeliver -e=me@my_email.here d66a39ee922fe1b701557f2bbc94c405 ??
    /usr/sbin/mail-archive -a=redeliver -e=me@my_email.here /var/clearos/mail_archive/import/d66a39ee922fe1b701557f2bbc94c405 ??
    /usr/sbin/mail-archive -a=redeliver -e=me@my_email.here -o=/var/clearos/mail_archive/import/d66a39ee922fe1b701557f2bbc94c405 ??
    The reply is currently minimized Show
Your Reply