Koozali.org: home of the SME Server

email - forward to other inbox on keyword match

Offline magwm

  • *
  • 157
  • +0/-0
  • SmeLover
    • Gadis Tourist Service Italia SRL
email - forward to other inbox on keyword match
« 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.

however, in https://wiki.koozali.org/Dovecot-extras there it is also written that
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,

Offline Jean-Philippe Pialasse

  • *
  • 2,712
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: email - forward to other inbox on keyword match
« Reply #1 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.

Offline TerryF

  • grumpy old man
  • *
  • 1,820
  • +6/-0
Re: email - forward to other inbox on keyword match
« Reply #2 on: November 02, 2021, 10:59:46 PM »
Not sure but would the contrib https://wiki.koozali.org/Mailsorting do the job?
qui scribit bis legit