Skip to content

yin1999/auto-delete-email-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

auto delete email

This tool is for auto delete email with imap protocol.

Set up

To work with this tool, you need to set up environment variables.

IMAP_SERVER=imap.example.com:993
IMAP_USER[email protected]
IMAP_PASS=password

# optional
SEEN_BEFORE=7    # delete email that has been seen before 7 days
UNSEEN_BEFORE=15 # delete email that has been unseen before 15 days
KEEP=30          # keep deleted email for 30 days

service

Recommand to use systemd to run this tool.

service file

[Unit]
Description=auto delete email
After=network-online.target

[Service]
DynamicUser=yes
EnvironmentFile=/path/to/auto-delete-email/env
ExecStart=/path/to/auto-delete-email/main
Type=simple

[Install]
WantedBy=multi-user.target

timer file

Run on 4:10:01 every day.

[Unit]
Description=timer for auto delete email

[Timer]
OnCalendar=*-*-* 4:10:01

[Install]
WantedBy=timers.target

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages