{"id":26714840,"url":"https://github.com/timothydodd/mailzort","last_synced_at":"2025-08-09T08:08:49.161Z","repository":{"id":201100850,"uuid":"706954991","full_name":"timothydodd/MailZort","owner":"timothydodd","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-11T20:49:44.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-11T21:33:55.897Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timothydodd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-18T23:47:51.000Z","updated_at":"2025-03-11T20:48:14.000Z","dependencies_parsed_at":"2025-02-22T03:20:20.463Z","dependency_job_id":"84266ff9-012c-455c-b04d-2be4ef1296a1","html_url":"https://github.com/timothydodd/MailZort","commit_stats":null,"previous_names":["timothydodd/mailzort"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothydodd%2FMailZort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothydodd%2FMailZort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothydodd%2FMailZort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timothydodd%2FMailZort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timothydodd","download_url":"https://codeload.github.com/timothydodd/MailZort/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858872,"owners_count":20684057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-27T13:51:13.121Z","updated_at":"2025-03-27T13:51:13.671Z","avatar_url":"https://github.com/timothydodd.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MailZort\n\nMailZort is a .NET 9 worker project designed to run in a Docker container, functioning as a scheduled job. It connects to a configured email folder and sorts incoming mail based on user-defined rules. I use it with Kubernetes cron jobs Manifest below,\n\n## Notes\n- Emails get cached in an SQLite database thats put in the `data` folder in execution directory\n- Appsetting.json file in the project gets copied to `data` folder in execution directory\n\n## Features\n\n- Automatically sorts incoming emails based on a flexible configuration.\n- Runs as a .NET 9 worker project in a Docker container.\n- Ideal for handling email categorization and organization tasks.\n\n\n## Configuration\n\nMailZort requires a configuration file named appSettings.json. Here's an example of a configuration file:\n\n``` json\n{\n    \"EmailSettings\": {\n        //Email Server - Host\n         \"Server\": \"mymail.com\",\n        //Email Server - Port\n        \"Port\": 993,\n         //Email Server - UserName\n        \"UserName\": \"myuser\",\n        //Email Server - Password\n        \"Password\": \"apassword\",\n        //Email Server - Should we use SSL\n        \"UseSsl\": true,\n        // Determines whether MailZort should pull all emails or use the email cache\n        \"PullMails\": true,\n        // The folder where deleted messages will be moved to.\n        \"Trash\": \"Deleted Messages\",\n        \"TestMode\": false,\n        // When we pull messages , how many should we pull: \"all\", \"not-seen\", \"recent\"\n        \"SearchMode\": \"recent\"\n    },\n    \"rules\": [\n        {\n            \"Name\": \"bills\",\n            // What folder to look in\n            \"Folder\": \"Inbox\",\n            // How old a message should be before moving it\n             \"DaysOld\": 1,\n            // Folder to move matches too\n            \"MoveTo\": \"Bills\",\n            // What areas should we look for a value\n            // Options: \"All,\" \"Subject,\" \"Body,\" \"Sender,\" \"Recipient,\" \"SenderEmail\"\n            \"LookIn\": 3,\n             // Determines the type of expression to match values.\n            // Options: \"Contains,\" \"DoesNotContain,\" \"Is,\" \"IsNot,\" \"StartsWith,\" \"EndsWith,\" \"MatchesRegex,\" \"DoesNotMatchRegex\"\n            \"ExpressionType\": 0,\n             // Values to match in the email content.\n            \"Values\": [\n                \"AT\u0026T\",\n                \"Amazon\",\n                \"Steam\"\n            }\n        },\n        // Add more rules here...\n    ]\n}\n\n\n\n```\n\n## Kubernetes\n\nK3 Manifest\n``` yaml\n\napiVersion: batch/v1\nkind: CronJob\nmetadata:\n  name: mailzort\nspec:\n  schedule: \"*/5 * * * *\" # Runs every 5 minutes\n  concurrencyPolicy: Forbid\n  failedJobsHistoryLimit: 1\n  successfulJobsHistoryLimit: 5\n  jobTemplate:\n    spec:\n      template:\n        spec:\n          containers:\n            - name: mailzort\n              image: timdoddcool/mailzort:1.0\n              imagePullPolicy: IfNotPresent\n              volumeMounts:\n                - name: mailzort-volume\n                  mountPath: /app/data\n              env:\n                - name: EmailSettings__Server\n                  value: \"myserver\"\n                - name: EmailSettings__Port\n                  value: \"993\"\n                - name: EmailSettings__UserName\n                  value: myuser\n                - name: EmailSettings__Password\n                  valueFrom:\n                    secretKeyRef:\n                      name: mysecretref\n                      key: password\n                - name: EmailSettings__UseSsl\n                  value: \"true\"\n          restartPolicy: Never\n          imagePullSecrets:\n            - name: mysecretref\n          volumes:\n            - name: mailzort-volume\n              nfs:\n                server: 192.168.1.51\n                path: /volume1/docker/mailzort\n                readOnly: no\n```\n\n## notes\n```bash \ndocker build -t mail-zort -f Dockerfile.arm64 .\ndocker tag mail-zort timdoddcool/mailzort:v3-arm64\ndocker push timdoddcool/mailzort:v3-arm64\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothydodd%2Fmailzort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimothydodd%2Fmailzort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimothydodd%2Fmailzort/lists"}