Armin Schindler
2020-Feb-15 09:43 UTC
shared folder name or public folder with mail address
On 14.02.2020 11:44, Tobias Kirchhofer wrote:> On 14 Feb 2020, at 11:06, Armin Schindler wrote:...> > The sorting in the according public folder happens in a global sieve > script before user scripts are fireing. It is combined with the ?+? > notation in postfix for sub addresses and an special ?listadm? user > > postfix: > | > listadm+Verteiler/info@$DOMAIN > | > > The sieve script is then reading the generated address and delivers it > into the according public folder. We learned a lot about sieve scripting > with this task :-) > > |sieve_before = /var/vmail/sieve/global/global-before.sieve [?] | > > More details would be to much here. > > To be honest, we needed some time to get it done properly. It is a > combination of features and A LOT OF testing and analysing the behaviour > of postfix/dovecot/public-folder/sieve/acl.the sieve part seems to be very tricky. My test is now working with a public folder and I have a "sieve_before" script in place which works for rules of the private namespace. But when the rule shall "fileinto" a public folder, the mail isn't filtered (moved) and syslog says dovecot: lmtp(.): Error ... sieve...: Mailbox doesn't exist. After some tests I found out it always looks in the private (or shared) namespace for that specfied folder. Do I miss a config option to let dovecot sieve "fileinto" a public namespace folder? I use dovecot version 2.2.13. Armin -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2900 bytes Desc: S/MIME Cryptographic Signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20200215/89e7c7ac/attachment.p7s>
Tobias Kirchhofer
2020-Feb-15 11:16 UTC
shared folder name or public folder with mail address
On 15 Feb 2020, at 10:43, Armin Schindler wrote:> On 14.02.2020 11:44, Tobias Kirchhofer wrote: >> On 14 Feb 2020, at 11:06, Armin Schindler wrote: > ... >> >> The sorting in the according public folder happens in a global sieve >> script before user scripts are fireing. It is combined with the >> ?+? >> notation in postfix for sub addresses and an special ?listadm? >> user >> >> postfix: >> | >> listadm+Verteiler/info@$DOMAIN >> | >> >> The sieve script is then reading the generated address and delivers >> it >> into the according public folder. We learned a lot about sieve >> scripting >> with this task :-) >> >> |sieve_before = /var/vmail/sieve/global/global-before.sieve [?] | >> >> More details would be to much here. >> >> To be honest, we needed some time to get it done properly. It is a >> combination of features and A LOT OF testing and analysing the >> behaviour >> of postfix/dovecot/public-folder/sieve/acl. > > the sieve part seems to be very tricky. > My test is now working with a public folder and I have a > "sieve_before" script in place which works for rules of the > private namespace. > > But when the rule shall "fileinto" a public folder, the mail isn't > filtered (moved) and syslog says > dovecot: lmtp(.): Error ... sieve...: Mailbox doesn't exist. > > After some tests I found out it always looks in the private (or > shared) > namespace for that specfied folder. > Do I miss a config option to let dovecot sieve "fileinto" a public > namespace folder? > I use dovecot version 2.2.13.We ?fileinto? in this manner : ``` fileinto ?Namespace/folder?; ``` The procedure in our setup is like this: 1. Virtual alias for each public-Folder email address within postfix: Pattern: folder at domain.tld listadm+Namespace/folder at domain.tld Example: info at domain.tld listadm+Verteiler/info at domain.tld Verteiler is the namespace, info the mailbox. listadm is a pseudo user in this context which holds the ACL for fileinto the resulting mailbox with proper permissions. 2. Disassemble the virtual alias address with sieve: Excerpt of the script. It is actually more code because we sort out spam for public folder. German comments, sorry. ``` # Hat Subadresse? if envelope :matches :detail "to" "*" { # Adressaufbau: listadm+Namespace/liste@ # ${liste} wird Namespace/box set "liste" "${1}"; } [?] fileinto "${liste}"; ``` I can send you the whole script if you need. Greetings! Tobias -- collect at shift.agency -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20200215/f6635231/attachment.html>
Armin Schindler
2020-Feb-15 11:27 UTC
shared folder name or public folder with mail address
On 15.02.2020 12:16, Tobias Kirchhofer wrote: ...> the sieve part seems to be very tricky. > My test is now working with a public folder and I have a > "sieve_before" script in place which works for rules of the > private namespace. > > But when the rule shall "fileinto" a public folder, the mail isn't > filtered (moved) and syslog says > dovecot: lmtp(.): Error ... sieve...: Mailbox doesn't exist. > > After some tests I found out it always looks in the private (or shared) > namespace for that specfied folder. > Do I miss a config option to let dovecot sieve "fileinto" a public > namespace folder? > I use dovecot version 2.2.13. > > We ?fileinto? in this manner : > > |fileinto ?Namespace/folder?; |This is what is not working for me. Your procedure below is good and maybe I will use parts of it, thank you. But this part is working for already. The incoming mail is sent to dovecot (postfix virtual alias working) and the match in sieve script is correct too. The problem is that dovecot (sieve) refuses to fileinto "Namespace/folder" because it seems it wants to store the mail in private namespace with "folder1/folder2" instead. The first part of the fileinto path isn't used as namespace name. Is there a config option for this behaviour? Armin> The procedure in our setup is like this: > > 1. Virtual alias for each public-Folder email address within postfix: > > Pattern: > folder at domain.tld <mailto:folder at domain.tld> > listadm+Namespace/folder at domain.tld <mailto:folder at domain.tld> > Example: > info at domain.tld <mailto:info at domain.tld> > listadm+Verteiler/info at domain.tld <mailto:info at domain.tld> > > Verteiler is the namespace, info the mailbox. listadm is a pseudo user > in this context which holds the ACL for fileinto the resulting mailbox > with proper permissions. > > 2. Disassemble the virtual alias address with sieve: > > Excerpt of the script. It is actually more code because we sort out spam > for public folder. German comments, sorry. > > |# Hat Subadresse? if envelope :matches :detail "to" "*" { # > Adressaufbau: listadm+Namespace/liste@ # ${liste} wird Namespace/box set > "liste" "${1}"; } [?] fileinto "${liste}"; | > > I can send you the whole script if you need.-------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2900 bytes Desc: S/MIME Cryptographic Signature URL: <https://dovecot.org/pipermail/dovecot/attachments/20200215/892dd94b/attachment-0001.p7s>
Reasonably Related Threads
- shared folder name or public folder with mail address
- shared folder name or public folder with mail address
- shared folder name or public folder with mail address
- shared folder name or public folder with mail address
- shared folder name or public folder with mail address