this post was submitted on 11 Feb 2024
29 points (93.9% liked)

Linux

48287 readers
651 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I am again deleting old mails. And I have inboxes with like 200 of them, it is hell.

I would like to autodelete mails that contain a date. If there are multiple dates, take the latest one. If that date is older than x days from today, delete the mail.

Is there something like that? Or some regex possible in native filters?

top 6 comments
sorted by: hot top controversial new old
[–] kixik@lemmy.ml 4 points 9 months ago (1 children)

Are you looking to clean up your client inbox, or the server inbox?

If your client inbox, you don't need a plugin, on the account settings synchronization & storage, on the section disk space, select the synchronize the most recent and specify the amount days, months, years, whatever.

If you want to remove too old messages from the server, perhaps the server itself offers a way to do so...

[–] Pantherina@feddit.de 1 points 9 months ago

I want to delete my mails? I use IMAP so this is the same and I will always delete all my old mails from everywhere.

I dont think servers have more of those features than Thunderbird.

[–] Shdwdrgn@mander.xyz 2 points 9 months ago* (last edited 9 months ago) (1 children)

So you're not simply trying to delete old emails based on the date they were sent to you? It might help to know where these dates are located, if in the subject line or in the body. And is consistently a straightforward date like "2024-02-11", or are you also trying to look for vague references like "Feb 11"? That might make a difference for how the question is answered, however a quick google search suggests that the FiltaQuilla add-on will support regular expressions in the message filters for addresses and subjects, while "Expression Search / GmailUI" adds expressions for body searches.

[–] Pantherina@feddit.de 1 points 9 months ago

No that would be easy. Often that also works and is kinda enough, but invitations are always sent in different timespans ahead.

Hm, seems like both addons are not what I need but if there is a good modern one that could be used as reference.

[–] otl@hachyderm.io 2 points 9 months ago

If you've done any programming, you could hook up a script to fdm (https://github.com/nicm/fdm).

Rough logic, for each message:

* match body with several timestamp regexps
* parse matched messages
* find dates in message body
* parse final match
* discard message if that is date earlier than now - x days

@Pantherina @linux

[–] ouch@lemmy.world 0 points 9 months ago

I would have a look at mutt's patterns in your position.