Email attachment downloader

ok so i am new to casaos. so far looks cool. i have been using a mini pc with windows 10 on it for years and i am wanting to upgrade that pc with casaos which i have done. I used windows to manage my qbittorrent client, as well as a jellyfin server. i wrote a couple quick scripts to move files around after qbittorrent downloads the files so they are where they belong for jellyfin. I have been using a free for personal use app called “mail attachment downloader” by Gearmage. I would browse torrent sites, download torrents on my phone/tablet/laptop and then email those .torrent files to a dedicated gmail address. “mail attachment downloader” would check that email address every 15 minutes and download the .torrent files to a specific dir/folder. qbittorrent monitors that dir/folder and starts the torrent download upon finding the .torrent file. when qbittorrent is done downloading the file(s) then it would run a script to move finished files to one of three directories so jellyfin-server could ‘see’ them. and then i could play them on my tv/laptop/tablet with the jellyfin client.

all of this works great and has for years. now i would like to set up my casaos to do same thing. while i figure out the ins and outs of qbittorrent and jellyfin on linux, i am looking for a way to automagically download those .torrent files from that same dedicated gmail address.

I have googled for hours trying to find a way to do this with no luck. it would seem that most mail attacment downloader apps for linux are either dead or didnt work in the first place. i have installed a couple CLI email clients and run thru the settings/configs but i havent been able to locate any clients that will download attachments specifically. some smtp or pop email clients will download emails but they download EVERYTHING and i would really only like the .torrent files downloaded ONLY. i could set up a bash script after the files are downloaded to move/copy the .torrent files to the appropriate monitored qbittorrent directory, LATER.

does anyone know of such an app that would do the attachment downloading? would be super nice to have this as an app in the ‘app store’. but i would be okay with a CLI version as long as the config stage is not overy complicated. I am afterall new to all things linux.

thanks in advance, -Lurch