#16 mail_fetch plugin should cope with renamed folder


when fetching mail i have this error :

Login OK: Inbox contains [1] messages
Fetching UIDL...
Leaving Mail on Server...
Fetching message 1
A31 NO Invalid mailbox Error Appending Message!


1 2 > >> (Page 1 of 2)
  • Tomas Kuliavas
    Tomas Kuliavas

    Logged In: YES

    No patch available.

    Bug can be reproduced by setting mail_fetch plugin to store
    messages in some folder and then renaming that folder.

    • assigned_to: nobody --> kink
    • summary: A31 NO Invalid mailbox Error Appending M --> mail_fetch plugin should cope with renamed folder
  • Logged In: YES

    The mail_fetch plugin should utilize the
    folder_rename_delete hook then to cope with that, just like
    filters does

  • Logged In: YES

    As I do not use the mail_fetch plugin, I was not able to
    test the fix I have attached. Thijs/Tomas, are you guys
    able to test? It's very simple, it updates the folder name
    to the new name on rename, or sets it to INBOX on delete.

  • Tomas Kuliavas
    Tomas Kuliavas

    Logged In: YES

    patch fixes only one part of the problem. It assumes that
    folder is renamed/deleted inside squirrelmail. we must add
    extra tests.

    Attached mail_fetch2.diff, that also checks if folder was
    renamed/deleted not in squirrelmail and that folder is not

    Patch also fixes incorrect variable assignment in fetch.php
    $mailfetch_subfolder == 'INBOX';

  • Tomas Kuliavas
    Tomas Kuliavas

    Second diff for test fix

  • Logged In: YES

    Hehe, glad you looked over the code, that "typo" has
    probably been in there for a bit.

    I completely forgot about external sources affecting the
    folder tree as well, good catch. Is it really necessary
    that the folder be subscribed before the mail can be
    delivered to that folder? Mail should be movable to an
    unsubscribed folder, shouldn't it?

  • Tomas Kuliavas
    Tomas Kuliavas

    Logged In: YES

    replace sqimap_mailbox_is_subscribed() with
    sqimap_mailbox_exists() and be prepared for "I see that
    emails are fetched, but I don't see them in squirrelmail.
    Please help, I lost all my emails." :)

    I think fetching only to subscribed folder is safer and I
    haven't tested appending to unsubscribed mailbox.

  • Logged In: YES

    That's a viable comment... but there might be cases where
    you want to deliver mail to a "hidden" folder for review
    later... Like if you fetch POP3 mail from an account you
    know gets a lot of spam. I'd be more inclined to deliver it
    to a folder I don't see, and handle it every few days or so,
    that way it's not checked for notifications, and such. But
    that might just be me :)

    But I agree, if you'd prefer to send to a subscribed folder,
    that works okay.

1 2 > >> (Page 1 of 2)