Koozali.org: home of the SME Server

Contribs.org Forums => Koozali SME Server 10.x => Topic started by: magwm on November 02, 2021, 06:22:02 PM

Title: email - forward to other inbox on keyword match
Post by: magwm on November 02, 2021, 06:22:02 PM
goodday to all,
I have a fully updated sme10 vm working as email server. I use the maillog to keep a backup of all messages.
Now I have had the request to forward all messages with 'complaint' in subject or message test to the inbox of quality assurance.
I have read that dovecot-extras / sieve can do this, but at a performance penalty.
 https://wiki.koozali.org/Mailsorting#Sieve_compatibility

however, in https://wiki.koozali.org/Dovecot-extras there it is also written that
Quote
When Sieve is enabled, dovecot-lda is used to deliver mail in mailboxes (so it can apply sieve scripts) instead of qmail. Dovecot-lda is more ressources intensives than qmail, so you may have performance penalty when users receive a lot of mails (for example, when you use the Bcc qpsmtpd's plugin to copy every mail in one mailbox)

and I am a bit hesitant to change the fast and working qmail setup.   :smile:
Furthermore, it writes that this text is for sme9 only.

So, I wanted to ask if the same is possible with the standard qmail setup: for only a few users, forward a copy of all messages with some keywords in the mail text (not necessarily only in the subject) to another user.

I will happily try out some options, open bugs, write the results in the wiki (if it is possible to revert settings, as this system is in production).

thank you for maintaining this fine piece of software,
Michel
Title: Re: email - forward to other inbox on keyword match
Post by: Jean-Philippe Pialasse on November 02, 2021, 10:35:18 PM
you could probably simply use maildrop or procmail and not sieve for the maillog box.


procmail can easily filter by regex a subject and send a copy to an external box on matche.
Title: Re: email - forward to other inbox on keyword match
Post by: TerryF on November 02, 2021, 10:59:46 PM
Not sure but would the contrib https://wiki.koozali.org/Mailsorting do the job?