Imap-mail-archiver
| logo | |
| Maintainer | ReetP |
|---|---|
| Url | https://nextcloud.com |
| Source: | smeserver- |
| Licence | AGPLv3 |
| Category | |
| Tags | email, imap |
Maintainer
Version
https://src.koozali.org/jcrisp/mail-archiver
Description
A simple IMAP email archiver for email stores locally and remotely, and storing in an ordered format.
Forked from
https://github.com/netconstructor/Imap4-Archiver
Installation
dnf install perl-Dotenv mkdir git cd git git clone https://src.koozali.org/jcrisp/mail-archiver cp env.example .env
Edit your .env and set your server details.
To impersonate another user you can use the format:
user*admin
Usage
Usage:
Action: All
From/To year go to separate Inbox/Sent year folders. Older than yearFrom go to Archives/old/Inbox|Sent
perl ./mailarchive.pl --action All --yearFrom YEAR --yearTo YEAR
Folder layout eg:
Mailbox/Archives/$year/Inbox Mailbox/Archives/$year/Sent Mailbox/Archives/Old/Inbox Mailbox/Archives/Old/Sent
Action: Years
From/To year go to separate Inbox/Sent year folders. Older than yearFrom are not touched
perl ./mailarchive.pl --action Years --yearFrom YEAR --yearTo YEAR
Folder layout eg:
Mailbox/Archives/$year/Inbox Mailbox/Archives/$year/Sent
Action: Before
Anything more than X days old go to Archives/old/Inbox|Sent
perl ./mailarchive.pl --action Before --daysOld DAYS ( >=7 )
Folder layout eg:
Mailbox/Archives/Old/Inbox Mailbox/Archives/Old/Sent
Options:
Set the following to 0 to diable or 1 to enable
General script debugging:
[--debug]
IMAP advanced logging:
[--debugimap]
Copy but do not delete original:
[--debug-delete]
Other thoughts
Could probably write other layouts but it suited me for Thunderbird. Could cron for certain accounts eg admin archive every 3-0 days etc.
Not the fastest, but does what I want.
Could be more modular, could open the accounts DB and go through each user? Not sure about passwords.
Could be used in Smanager.
Bugs
Probably lots.
Changelog
Only released version in smecontrib are listed here.