Public mailboxes

NethServer Version: 7.9.2009
Module: Email 2.31.5

Dear All, I try to use the Public mailboxes. They work fine ! But i have to generate a more complex “Folder-Structure” within the Public Folders. I want to have a Subfolder per Domain and then different MailsAliases to be lead to the subfolders. Is that possible with the way Nethserver is working together with dovecot.



Thanks in Advance

There could be issues with server manager not recognizing your custom folders:

Here’s an example of configuring folders with custom templates:

Thanks for this Articles, i read through it but dont find the soulution.

Maybe i was not detailed or understandable what i want to do is that incomming Mails are delivered to sub sub folders of the Public folder not only to the sub folder like in this grafic

its like a Proces / Kanban aproach with folders instead of using tikets and so on … they are working very efficent with this aproach for 15 Jears now and dont want to loose it …

best would be all subfolder not only main/subfolders will be shown in the list

its although fine to define it by hand / database but dont find how to doit in a correct way …

is this possible ?
thanks in adavance

do you mean have email address like info@DomainA.tld and have it’s inbox as a public folder for user@DomainA.tld

Yes, but its not a one to one … lets say there are different brands that will be managed by a several Teams. A Office Team, a Billing team, a Support team, an some lets call them managers :wink:

al brands have there info@ billing@ support@ mailadresses … they all should be connected to a different public folder. but they should be structured in folders on the purpose of the mail

info@A → Public → general → A -->Inbox
info@B → Public → general → B -->Inbox
info@C → Public → general → C -->Inbox

support@A → Public → support–> A -->Inbox
support@B → Public → support → B -->Inbox
support@C → Public → support → C -->Inbox

so the Office will only see Public → General &Public -->Billing but not Support …

1 Like

thats doable with creating public mailboxes and groups then set the right acls

theres a few ways to do this but the easiest IMHO is this

step 1. make groups in (users and groups) lets call them billinga, supporta and publica (since you mentioned abc simply make three sets of the three groups changing a to b and c)

step2. add all people in site “a” to have access to email publica to group publica same with site b and c.
step 3.then add all who should have access to billing to billinga,b,c etc and same with support

step 4. then in email go to mailboxes and then public mailboxes create info@a.domain.tld and set acl to groups publica do this for b and c as well

then create billing@a.domain.tld set acl to groups billinga do this for b and c as well

then create support@a.domain.tld set acl to groups supporta do this for b and c as well

1 Like

i found that topic, but only for having the inboxes on root level of public … like

what i need ist
Public–>what ever folder–>what ever nextfolder->inbox(
so i want to lead the inboxes to sub-sub-folders not to the sub folder

i understand but i think the easiest way to acheive this is by setting the ussers in three setts of three groups then set the groups individualy as acl ie billing@sitea can be accessed by users in group billinga and info@sitea can be accessed by users in group publica then for people in billinga group add them to public as well and add users in supporta to publica so users in billinga can see billing@sitea and info@sitea and users in supporta can see support@sitea and info@sitea


group billinga →,
group supporta →,

and same for sites b and c

unless you want to have an folder for billing and separate for support you have to realise that yes the mailboxes are essentialy folders they need to be bound by a seperate uri so in that case you would have to have and

hope that makes sense

Thanks for takeing the Time to read and Help.

i understand the workaround but i realy ned the freedom to set what ever mailadress to what ever needed Public subfolder because of real complex structure in Public folders … i just tried to explain it as simpe as i can

think about a mailadress per Project …

Public → Projects → Department → ProjectA …

e.g. if you have about 100 projcts that leads to 100 entrys in the root level of public … that isn’t managebal … so you need subfolders

oh now i get you sorry ignore that then ill try to find an answer for you


ok so would work like this you follow what i mentioned but when you go to public mailboxes (i was thinking interms of email not mailboxes for some reason)

when you create group publica it assigns but the email can be ignored same with billing and support now what you do is
create the groups publica billinga supporta and assign users appropriately
Users & Groups -

you set public mailbox billinga and another for supporta and a third for publica acls to info billing and support

and then go to addresses and add address heres an example for billing
Email -sss

do the same for and

then it should appear to users who are included in the acls for the public mailbox billinga


now this would be alot of manual setting if as i beleive your setting up multiple sets this could be scripted (i feel like i should get a t-shirt saying something like nah ill just make bash do it :grin: )

the way i would envision that is you have a script to automate the group creation have user group assigned (if it’s a long list) by data from a list (cvs maybe) then have the script setup mailbox and assign acl and then add the address to point to the mailbox i mean if this is something you will be creating and maybe adding people to on a regular bassis it could be set to automaite and you could just feed it a cvs to import users have the same data set pulled again to assign groups and ofcourse the other domains ie and c depending howfar you want to go you could have the script automate the adding of domains if you realy wanted

1 Like

Sorry but the subfolders are missing …

maybe it is more understandable wen i use a table view

and i need every subfolder to be existing in the Public folder structure

1 Like

ok in that case maybe we would need to use sieve scripting then

ill try to comeup with some code for you when i have time in the meantime check out

might be of some help

can i ask why (if you dont mind),
is it so mass email can be sent to one email address and be received by everyone regardless of domain if thats the reason then you could have a catchall email that sends to everyone.

but (and i mean no offense and I’m sure there would be reasons I’m just not seeing any other reason that would require this) if you want to have say office a seing email for info and billing but not support and hence would be setup by acl would be redundant


sorry for late response, i was bussy the whole week.

at moment on the raw implementation is like this:

/etc/postfix/virtual shop_a


shop_a:"|/usr/local/bin/maildir /srv/mail/pubfolder/Maildir/"


#copyright (c) 2000, Len Budney. See COPYING for details.
umask u=rwx,g=rwx,o=
exec \
/usr/bin/safecat "$1"/tmp "$1"/new

with the aliases entry you can direct the mail input to whatever folder you want

with the the Postfix virtual you can manage different incomming mailadresses to the local alias

1 Like

The usage at the end is they use Public Folders like an Kanbanboard. the Backlog is the incomming folder thenn they have different subfolders like swimlanes, to some swimlanes it is allowed to write direktly and you dont need to use the Backlog folder.

what tey are dooing is Electronics, Cables, Devellopment,Shipping and Sales … they have diferent Brands and a Matrix organisation behind. from the Backlog a Groupleader is dropping mails to the swimlanes, so he has the right (ACL) to see all of them some user se only theire swim lane some can see a subset of swimlanes …

I know it is a kind of sufisticated use of public folders and sometimes it would be better to have a tiketsystem behind (we tryed it several times, doesent work vor them ) the public folder structure works vor them since years …

1 Like

If that works for them fair enough