Skip to content

Script to extract and filter out nextcloud mails by lastLogin time, groupnames and groupby languages. Useful for maintenance, mailing and analytics

License

AGPL-3.0, AGPL-3.0 licenses found

Licenses found

AGPL-3.0
LICENSE
AGPL-3.0
LICENSE.txt
Notifications You must be signed in to change notification settings

numeropi/extract_nextcloud_mails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

extract_nextcloud_mails

Script to extract and filter out nextcloud mails by lastLogin time, groupnames and groupby languages. Useful for maintenance, mailing and analytics.

Developers

Ivan (Komun.org). Komun.org

(Tip: create yourself a safe and private Nextcloud account here)

Usage

  • Download this repository in your Nextcloud server
  • Find out the database access details (usually in config/config.php)
  • Install python3 mysql support: sudo apt install python3-mysqldb
  • Create a config.py file with the access parameters or edit them directly in the extract_nextcloud_mails.py
DB_HOST = "localhost"
DB_USERNAME = "nextcloud"
DB_PASSWORD = "db_password"
DB_NAME = "db_name"

Configuring filters

You can leave empty or edit the following filters inside the script

languages_groupby = ['en','es','ca']
last_login_filter_time = timedelta(days=30) #leave as None if you don't want to filter by last_login
groups_filter = ['premium'] #groupnames are case-sensitive, leave as empty list if no filter by groups

The script has 3 ways to filter:

Output

Example of filtering by Spanish, Catalan, English or Others languages

Filtering by groups ['premium']
Filtering by last login time 30 days, 0:00:00
Grouping by language ['en', 'es', 'ca']
-------------------- 
Lang ca
ccccc <[email protected]>
-------------------- 
Lang en
aaaa <[email protected]>
bbbb <[email protected]>
-------------------- 
Lang other
yyyy <[email protected]>
-------------------- 
Lang es
xxxx <[email protected]>
xxx <[email protected]>

Hack it

Send us a pull request, create a Nextcloud plugin based on this, etc.

Feedback

Add bug/feature request in this bug repository.

Help us

Buy us a coffee: https://liberapay.com/bitarkivo/

About

Script to extract and filter out nextcloud mails by lastLogin time, groupnames and groupby languages. Useful for maintenance, mailing and analytics

Resources

License

AGPL-3.0, AGPL-3.0 licenses found

Licenses found

AGPL-3.0
LICENSE
AGPL-3.0
LICENSE.txt

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages