Looking for Advanced Email Rules and Scripts

Currently I use Gmail for mail, it has great filters. I have also written a Google Apps script which will move email from one folder into another 3 times a day. I do this because I only want to receive email 3 times a day. I cannot rely on my mail client for this, because clicking Send and Receive overrides it all.

Recently GMail seem to be blocking email from customers a lot. I have had this setup for years, and now the past week email to me from my main server forwarded to Gmail is blocked. So I want to stop using GMail. But I like my filters and my script.

Anyway, the point is I have no idea if being able to replicate this in the email in Webmin is possible.

Does anyone know where I could obtain some advanced email scripts or filters for the mail that comes with webmin, or know of any other great email services I can install on the server that will allow this?

Thanks a lot

Actually I just wrote a bash script to move mail from one folder to another and setup a cron to do it 9am, 12pm and 4pm, so thats got that covered (mail addict you see :slight_smile: )

But still be good to get some advanced knowledge on email filters and scripts.

Can a folder be hidden from IMAP? The folder I created to move all mail into (called Hold) can be seen in IMAP, but I dont want it to.

Wanted to pursue this further with more information my side… I have a few issues…

  1. Basically Usermin filters to be quite basic. I cannot see how to create AND/OR rules in the conditions. This is why I would like more advanced techniques for Usermin filters, so I can create it. So is this possible, if so where can I find documentation? At the moment if I wanted to say filter 10 email addresses I need 10 rules! Surely there must be a way to have OR checks in the one rule. I have not tried using OR or || or | in the rules, I wanted to find documentation before guesswork. But the main reason I have not tried it is because I also want to need a rule to check if the “Subject contains xxx” OR “the FROM contains YYY”. So two different checks in one rule.

Perhaps I need to use the based on Header Other with some regular expressions, but cant find any info on how to use it.

  1. I need to add multiple actions too. So if I mail meets a condition, not only move it to a folder, but mark it as read. I dont think I should create multiple rules to implement multiple actions.

  2. The above is straightforward in sieve filter manages in Roundcube, but we are using Procmail and I cant find any plugins to manage Procmail filters in Roundcube for users to create such advanced rules (to be honest I dont think conditional checks are advanced!).

I may have other questions, but I think those are the most important.

Thanks

I have setup most filters now, its nearly working, but the one that is not working is where I need to check for multiple emails.

Please can someone point me in the right direction…

I would like:
Header To must contain emailone@email.com|emailtwo@email.com

You can see the pipe character, so header to contain either one of these emails (I have a lot to filter).

I just cant get it working. I have tried escaping the dots, putting in brackets, trying to use procmail regex expressions online, none work.

Please can someone point me in the right direction, I cannot find any help on regular expressions in Usermin.

Thanks

I have figured it out. By entering rules into the .procmail file then viewing how it looks in Usermin, this is what I need to enter in the Header

email1@email.com|^To:.*email2@email.com|^To:.*email3@email.com

Because this field adds in the first ^To:.* required in the procmail file, then the rest are not so they are added in this line.

I expect we could enter multiple checks (To, From etc) but not tried it yet