Hi,
First, I am very new to using Pigeonhole/Sieve with Dovecot and I am struggling with a problem which could be easy to solve but is just a lack of understanding on my end...
We use a simple system for routing emails to different email users by postfixing the addresses with the actual user: xxxJohn@domain; yyyJohn@domain etc all will be delivered to user John. (This way John can invent a new email address on-the-fly and that will be delivered to his email box.) Delivering these emails to the right mailbox is easy: if address :contains "to" "John" ... All mail not matched will go to the general (catchall) mail box.
The problem occurs when the email is sent to more addresses at the same domain. Eg. if an email is sent to xxxJohn@domain, zzzAlex@domain and info@domain Either, all emails also end up in the catch-all, or the email is delivered to the first matching rule only.
I do not understand how to use the different TO addresses in the match rules. How can I determine that there are recipients other than xxxJohn or zzzAlex?
Any help in pointing me in the right direction is appreciated!
Robert