1

Topic: Delete junk mails after scan_reported_mails.sh has run

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.5 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? yes
- Linux/BSD distribution name and version: Debian 11
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB(MySQL)
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

hi,

I installed successfull imap_sieve and auto-learn with procedure from iredmail website dovecot.imapsieve.html (no link allowed).

I would like to know if it is possible to delete automatically the junk emails after the scan has been made ?

Thanks.
Regards,

Manu

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Delete junk mails after scan_reported_mails.sh has run

The Plugin creates a copy of the mail, which then gets scanned and deleted afterwards, the original mail in spam folder doesn't get touched

3

Re: Delete junk mails after scan_reported_mails.sh has run

Cthulhu wrote:

The Plugin creates a copy of the mail, which then gets scanned and deleted afterwards, the original mail in spam folder doesn't get touched

Exactly, but is there a way so that the plugin is not copy but moving the original mail in spam folder ?

4

Re: Delete junk mails after scan_reported_mails.sh has run

manuloup wrote:
Cthulhu wrote:

The Plugin creates a copy of the mail, which then gets scanned and deleted afterwards, the original mail in spam folder doesn't get touched

Exactly, but is there a way so that the plugin is not copy but moving the original mail in spam folder ?

I did not find a better way, so I added that line at the end of the script /etc/dovecot/sieve/scan_reported_mails.sh :

find  /var/vmail/vmail1/*/*/*/*/*/Maildir/.Junk/cur -type f -delete

5

Re: Delete junk mails after scan_reported_mails.sh has run

Why in hell would you do that?