|
From: Peter P. <pet...@fa...> - 2025-07-16 07:41:03
|
Hi list, (this might be slightly-OT) my employer is forcing me to host all emails, that are older than X years, somewhere else than on his IMAP server. I am using multiple clients and isync. I am now thinking of moving certain imap folders from the employer's server to some network storage, which would only be accessible through ssh/scp/rsync but not through the imap protocol. Can isync sync emails through such connections as well? Is the "Tunnel" commenad the way to go? Thanks for all ideas and advice! Peter |
|
From: Marton B. <ba...@gm...> - 2025-07-16 15:10:22
|
I use three different machines and sync all my email between them by rsync over SSH, so as files rather than via isync. When I boot up a machine I rsync down all files, including hundreds of thousands of email, from my home server. Some of these emails I only have as maildir files, they are not even on any IMAP server. I make sure dot files are synced too, and deletions of files also propagate. Once the rsync logs are ok I then launch isync to Google and M365 for those mail folders that are on there as well. Before closing down the machine I rsync everything, including all email, to the home ssh server. Next day I sit at another machine and do the same. This has worked reliably for me for several years, the important thing is to make sure everything is rsynced with no errors before isync is launched to my email providers. This is not exactly answering your question though... Best wishes Marton On Wed, 16 Jul 2025, 08:41 Peter P., <pet...@fa...> wrote: > Hi list, > > (this might be slightly-OT) > > my employer is forcing me to host all emails, that are older than X > years, somewhere else than on his IMAP server. I am using multiple > clients and isync. I am now thinking of moving certain imap folders from > the employer's server to some network storage, which would only be > accessible through ssh/scp/rsync but not through the imap protocol. > > Can isync sync emails through such connections as well? > Is the "Tunnel" commenad the way to go? > > Thanks for all ideas and advice! > Peter > > > _______________________________________________ > isync-devel mailing list > isy...@li... > https://lists.sourceforge.net/lists/listinfo/isync-devel > |
|
From: H <ag...@me...> - 2025-07-16 23:42:30
|
On July 16, 2025 5:09:57 PM GMT+02:00, Marton Balazs <ba...@gm...> wrote: >I use three different machines and sync all my email between them by >rsync >over SSH, so as files rather than via isync. When I boot up a machine I >rsync down all files, including hundreds of thousands of email, from my >home server. Some of these emails I only have as maildir files, they >are >not even on any IMAP server. I make sure dot files are synced too, and >deletions of files also propagate. Once the rsync logs are ok I then >launch >isync to Google and M365 for those mail folders that are on there as >well. >Before closing down the machine I rsync everything, including all >email, to >the home ssh server. Next day I sit at another machine and do the same. >This has worked reliably for me for several years, the important thing >is >to make sure everything is rsynced with no errors before isync is >launched >to my email providers. This is not exactly answering your question >though... > >Best wishes >Marton > >On Wed, 16 Jul 2025, 08:41 Peter P., <pet...@fa...> wrote: > >> Hi list, >> >> (this might be slightly-OT) >> >> my employer is forcing me to host all emails, that are older than X >> years, somewhere else than on his IMAP server. I am using multiple >> clients and isync. I am now thinking of moving certain imap folders >from >> the employer's server to some network storage, which would only be >> accessible through ssh/scp/rsync but not through the imap protocol. >> >> Can isync sync emails through such connections as well? >> Is the "Tunnel" commenad the way to go? >> >> Thanks for all ideas and advice! >> Peter >> >> >> _______________________________________________ >> isync-devel mailing list >> isy...@li... >> https://lists.sourceforge.net/lists/listinfo/isync-devel >> Interesting approach. Which mail client(s) do you then use on the different machines? Am I correct that the mail client(s) accesses the local mail storage on the desktop rather than your mail server? How do you handle the mail accounts on phones/tablets? Why did you choose approach? It would seem to me that the mail clients on e.g. a phone and the desktop you are currently using will be out of sync? |
|
From: Marton B. <ba...@gm...> - 2025-07-17 00:45:40
|
[Clients]: I use NeoMutt; yes, operating on local maildir on my {desk/lap}tops.
[On phone/tablet]: I use the official Gmail/M365 apps. I don't move emails while on the phone, just read and, rarely, respond to them. I can also delete from Inbox, that doesn't do harm in the workflow. I don't have a tablet but I guess those could work the same way. I sort Inbox and Sent Mail on my {desk/lap}tops only, and this is propagated up to Gmail/M365 via isync.
[Why]: This seemed easiest. I think of my email as files in my ecosystem, that is local copy on the machine I'm currently on, backed up and synced to my other machines as files via my rsync-ssh server and mirrored from there by further backup ssh servers for additional safety. I find this more reassuring than trusting big corporations with all my messages. I essentially use Gmail/M365 as vehicles to collect Inbox and additional backing up my sorted folders. These latter also allow me to view these archived mails over the phone.
[Out of sync]: Yes, that's true, but working on local maildir I'm out of sync anyway so this doesn't really bother me. I isync my mails many times a day; Inbox, Sent, Spam, Deleted mail in both directions; saved folders only up to Gmail/M365. Local maildirs and Gmail/M365 get in sync with each other at those instances.
If Gmail and M365 go bust right now I only lose the newest few mails in Inbox since I last ran isync. If they decide to delete my emails they can only do harm to my Inbox which doesn't normally has too many emails. If some mails cannot be stored in Gmail or M365 (like in Peter's question) that's no problem as not all sorted maildir folders are synced up. In fact I'm deleting all emails from Google that are more than 4 years old as I'm not paying for extra storage in there. I have the old ones in my maildirs and that's enough. And, as an additional plus, an easy bash script moving everything from "Junk Email" to "Inbox" in my local maildir sorted Microsoft's stupid decision of not letting us turn off their useless spam filter. :-)
Best wishes,
Marton
On Thu, Jul 17, 2025 at 01:29:14AM +0200, H wrote:
> On July 16, 2025 5:09:57 PM GMT+02:00, Marton Balazs <ba...@gm...> wrote:
> >I use three different machines and sync all my email between them by
> >rsync
> >over SSH, so as files rather than via isync. When I boot up a machine I
> >rsync down all files, including hundreds of thousands of email, from my
> >home server. Some of these emails I only have as maildir files, they
> >are
> >not even on any IMAP server. I make sure dot files are synced too, and
> >deletions of files also propagate. Once the rsync logs are ok I then
> >launch
> >isync to Google and M365 for those mail folders that are on there as
> >well.
> >Before closing down the machine I rsync everything, including all
> >email, to
> >the home ssh server. Next day I sit at another machine and do the same.
> >This has worked reliably for me for several years, the important thing
> >is
> >to make sure everything is rsynced with no errors before isync is
> >launched
> >to my email providers. This is not exactly answering your question
> >though...
> >
> >Best wishes
> >Marton
> >
> >On Wed, 16 Jul 2025, 08:41 Peter P., <pet...@fa...> wrote:
> >
> >> Hi list,
> >>
> >> (this might be slightly-OT)
> >>
> >> my employer is forcing me to host all emails, that are older than X
> >> years, somewhere else than on his IMAP server. I am using multiple
> >> clients and isync. I am now thinking of moving certain imap folders
> >from
> >> the employer's server to some network storage, which would only be
> >> accessible through ssh/scp/rsync but not through the imap protocol.
> >>
> >> Can isync sync emails through such connections as well?
> >> Is the "Tunnel" commenad the way to go?
> >>
> >> Thanks for all ideas and advice!
> >> Peter
> >>
> >>
> >> _______________________________________________
> >> isync-devel mailing list
> >> isy...@li...
> >> https://lists.sourceforge.net/lists/listinfo/isync-devel
> >>
>
> Interesting approach. Which mail client(s) do you then use on the different machines? Am I correct that the mail client(s) accesses the local mail storage on the desktop rather than your mail server?
>
> How do you handle the mail accounts on phones/tablets?
>
> Why did you choose approach? It would seem to me that the mail clients on e.g. a phone and the desktop you are currently using will be out of sync?
>
>
> _______________________________________________
> isync-devel mailing list
> isy...@li...
> https://lists.sourceforge.net/lists/listinfo/isync-devel
|
|
From: Peter P. <pet...@fa...> - 2025-07-17 06:31:15
|
* Marton Balazs <ba...@gm...> [2025-07-16 17:10]: > I use three different machines and sync all my email between them by rsync > over SSH, so as files rather than via isync. When I boot up a machine I > rsync down all files, including hundreds of thousands of email, from my > home server. Some of these emails I only have as maildir files, they are > not even on any IMAP server. I make sure dot files are synced too, and > deletions of files also propagate. Once the rsync logs are ok I then launch > isync to Google and M365 for those mail folders that are on there as well. > Before closing down the machine I rsync everything, including all email, to > the home ssh server. Next day I sit at another machine and do the same. > This has worked reliably for me for several years, the important thing is > to make sure everything is rsynced with no errors before isync is launched > to my email providers. This is not exactly answering your question though... It is to a large extent, thanks for your kind reply Marton! I am furthermore looking for a scriptable solution that will move all email older than X years from one local imap folder to another (which is then rsynced to a file server). Looking forward to this list memeber's suggestions! Your help is much appreciated, best, Peter |
|
From: Oswald B. <osw...@gm...> - 2025-07-17 09:41:49
|
On Wed, Jul 16, 2025 at 09:37:51AM +0200, Peter P. wrote: >Can isync sync emails through such connections as well? > yes. you can run an imap server on the ssh host and have ssh forward the port to your local host, which you then connect via isync. >Is the "Tunnel" commenad the way to go? > also possible. one way would be running tcpconnect (or netcat) on the ssh host to connect the imap server locally. another way is to run an imap server that directly serves on stdio, for example panda-imap (yes, it's old, and it's what i use). |
|
From: Peter P. <pet...@fa...> - 2025-07-17 10:10:13
|
* Oswald Buddenhagen via isync-devel <isy...@li...> [2025-07-17 11:42]: > On Wed, Jul 16, 2025 at 09:37:51AM +0200, Peter P. wrote: > > Can isync sync emails through such connections as well? > > > yes. > > you can run an imap server on the ssh host and have ssh forward the port to > your local host, which you then connect via isync. > > > Is the "Tunnel" commenad the way to go? > > > also possible. > one way would be running tcpconnect (or netcat) on the ssh host to connect > the imap server locally. > another way is to run an imap server that directly serves on stdio, for > example panda-imap (yes, it's old, and it's what i use). Thanks Oswald! That's good to know! In fact I am trying to avoid having to install and configure an imap server to sync two folders between different hosts, as I am much more familiar with rsync. best, Peter |
|
From: Daniel T. <tam...@gm...> - 2025-07-17 20:33:45
|
On Thu, Jul 17, 2025 at 08:31:00AM +0200, Peter P. wrote:
>
> I am furthermore looking for a scriptable solution that will move all
> email older than X years from one local imap folder to another (which is
> then rsynced to a file server).
>
I would look at mblaze. It is a collection of tools and contains the mpick command. From the example section of it's man page:
You can pick mails to move them into another maildir.
mv $(mlist ./INBOX | mpick -t 'from =~ "@github"') ./github/cur
A more advanced mpick expression to pick mails in a certain time span, which are flagged as replied or not seen.
mpick -t 'date >= "2016-01-01" && date < "2017-01-01" && (replied || !seen)'
Best regards,
Daniel
|
|
From: Oswald B. <osw...@gm...> - 2025-07-18 07:02:25
|
On Thu, Jul 17, 2025 at 10:33:36PM +0200, Daniel Tameling wrote: > mv $(mlist ./INBOX | mpick -t 'from =~ "@github"') ./github/cur > this will preserve the ,U=nnn infixes of the files, which is a very bad idea. |
|
From: Peter P. <pet...@fa...> - 2025-11-14 05:21:10
|
Hi list, reviving an older thread here, I am still looking for a solution to the problem of my employer wanting to move all email in my account older than X years from all folders and host it on a separate webservice[1], thus making it inaccessible to me from isync/mutt/notmuch etc. The employer is trying to save storage and server ressources this way and this questionable move is unavoidable for me. Denial Tamling has suggested using tools from the mblaze package to filter mail older than a certain date, with Oswald pointing out a pitfall when moving these messages, which I don't yet understand: * Oswald Buddenhagen via isync-devel <isy...@li...> [2025-07-18 09:02]: > On Thu, Jul 17, 2025 at 10:33:36PM +0200, Daniel Tameling wrote: > > mv $(mlist ./INBOX | mpick -t 'from =~ "@github"') ./github/cur > > > this will preserve the ,U=nnn infixes of the files, which is a very bad > idea. Is there a correct way to move all mail from all folders older than X to some other folder? I am wondering if mblaze/mlist is nevertheless the best way I can anticipate the forced archival. If I would manage to hereby extract all old email from all far-side folders I would then need to store it to a near-side folder that is not synced back to the far side. How could I nevertheless keep that near-side folder in sync across multiple computers? Is there any other way to work around this imminent problem? Thank you so much! best, Peter [1] https://www.opentext.com/products/retain-unified-archiving |
|
From: Rene K. <ma...@rk...> - 2025-11-14 07:41:40
|
On Fri, Nov 14, 2025 at 06:20:52AM +0100, Peter P. wrote: > Hi list, > > reviving an older thread here, I am still looking for a solution to the > problem of my employer wanting to move all email in my account older than X > years from all folders and host it on a separate webservice[1], thus > making it inaccessible to me from isync/mutt/notmuch etc. > The employer is trying to save storage and server ressources this way > and this questionable move is unavoidable for me. > > Denial Tamling has suggested using tools from the mblaze package to filter > mail older than a certain date, with Oswald pointing out a pitfall when > moving these messages, which I don't yet understand: > > * Oswald Buddenhagen via isync-devel <isy...@li...> [2025-07-18 09:02]: > > On Thu, Jul 17, 2025 at 10:33:36PM +0200, Daniel Tameling wrote: > > > mv $(mlist ./INBOX | mpick -t 'from =~ "@github"') ./github/cur > > > > > this will preserve the ,U=nnn infixes of the files, which is a very bad > > idea. > > Is there a correct way to move all mail from all folders older than X to > some other folder? > > I am wondering if mblaze/mlist is nevertheless the best way I can > anticipate the forced archival. I'd guess that using mrefile(1) should do it the correct way. > If I would manage to hereby extract all old email from all far-side > folders I would then need to store it to a near-side folder that is not > synced back to the far side. How could I nevertheless keep that > near-side folder in sync across multiple computers? By using another IMAP server - which is probably against some rules about corporate stuff. > Is there any other way to work around this imminent problem? As long as you are not deleting anything from the archive, as emails are just text and files, any method to sync text and files should do. |