DistributionList modes

Use this forum if you want to discuss a problem or ask a question related to a hMailServer beta release.
Post Reply
User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

DistributionList modes

Post by RvdH » 2021-09-10 19:45

Today a had to setup a distribution list for a client, and they asked if it was possible to allow anyone in their domain to send to the list (not being all members)
So i browsed through the code and noticed there are a few more distribution list modes listed in hMailServer.idl

Code: Select all

typedef
[uuid(90745436-4C3F-11D9-AD17-A0BCEA20CD06),
	helpstring("Distribution list mode")] 
	enum 
{
	[helpstring("Anyone can send messages to this distribution list.")] 
	eLMPublic = 0,

	[helpstring("Only members of the distribution list can send to the list.")] 
	eLMMembership = 1,

	[helpstring("List is only for announcements.")] 
	eLMAnnouncement = 2,

	[helpstring("Anyone in the domain can send to the list.")] 
	eLMDomainMembers = 3,

	[helpstring("Anyone with an account on the server can send to the list.")] 
	eLMServerMembers = 4,

} eDistributionListMode;
RecipientParser.cpp however doesn't contain those additional distribution list modes, the way i see it the mode listed as DomainMembers distribution list mode would fit this clients needs.
I think i fairly easy can add this DomainMembers mode

What do you guys think, can this be a valuable addition?


Other possibility would be to alter the Announcement distribution list mode to accept wildcard addresses *@domain.com
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: DistributionList modes

Post by katip » 2021-09-10 21:16

with the option "Require SMTP Auth" checked, i think #4 is already covered, no?
#3 might be useful. kinda restricted #4. i'd use it.
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: DistributionList modes

Post by RvdH » 2021-09-10 21:19

katip wrote:
2021-09-10 21:16
with the option "Require SMTP Auth" checked, i think #4 is already covered, no?
#3 might be useful. kinda restricted #4. i'd use it.
Yup, i mainly am interested in the DomainMembers

DomainMembers + Require SMTP Auth checked, behaves like only real accounts in the domain can send to the list (i think)
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DistributionList modes

Post by mattg » 2021-09-11 01:50

Domain members would absolutely make this useful

Especially if members of the group were auto-populated, or we could use *@example.com (or perhaps 'all@example.com') to send to all addresses in that domain.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: DistributionList modes

Post by RvdH » 2021-09-11 01:54

@mattg
Not entirely sure if you understand the mode, this is a extra Security Mode, eg: who's allowed to send to the list

https://github.com/hmailserver/hmailserver/pull/392 (also works for domain alias :wink: )
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DistributionList modes

Post by mattg » 2021-09-11 02:14

Yes I get that

To be really useful, it ALSO would be good to have the recipients - members auto-populate with all accounts/ aliases from the domain.

Thinking a work situation

OHS@example.com for all employees to use to report Health and Safety issues>> Members only the OHS Officer(s) What you have found will work here

management@example.com for all employees (who know the address) to use to raise issues with management... >> members of the management team What you have found will work here

notices@example.com for all employees to use to say "owner of the mouldy cheese in the staff fridge - please remove it) to everyone in the entire company >>> THIS IS WHERE THE all@example.com would be useful
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: DistributionList modes

Post by RvdH » 2021-09-11 02:22

mattg wrote:
2021-09-11 02:14
Yes I get that

To be really useful, it ALSO would be good to have the recipients - members auto-populate with all accounts/ aliases from the domain.

Thinking a work situation

OHS@example.com for all employees to use to report Health and Safety issues>> Members only the OHS Officer(s) What you have found will work here

management@example.com for all employees (who know the address) to use to raise issues with management... >> members of the management team What you have found will work here

notices@example.com for all employees to use to say "owner of the mouldy cheese in the staff fridge - please remove it) to everyone in the entire company >>> THIS IS WHERE THE all@example.com would be useful
auto-populate, i don't want the sysadmin to end up without work, and you can do that by script :mrgreen:
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: DistributionList modes

Post by katip » 2021-09-11 06:12

not directly related with the topic, but while you set a hand on it...
deletion of an account should remove it also from all distro lists where it was a member.
we use many local distro lists and most users are members of multiple lists. albeit i do this by script (send a mail with subject "purge user@local.com" which triggers the function) this should be a natural result of an account deletion. or you have to know who is member of which list and do it by hand one by one.
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
RvdH
Senior user
Senior user
Posts: 3231
Joined: 2008-06-27 14:42
Location: The Netherlands

Re: DistributionList modes

Post by RvdH » 2021-09-11 10:52

katip wrote:
2021-09-11 06:12
not directly related with the topic, but while you set a hand on it...
deletion of an account should remove it also from all distro lists where it was a member.
we use many local distro lists and most users are members of multiple lists. albeit i do this by script (send a mail with subject "purge user@local.com" which triggers the function) this should be a natural result of an account deletion. or you have to know who is member of which list and do it by hand one by one.
viewforum.php?f=2 :lol:

Automatically purging is a complicated task i think, especially when users don't use their account names in distribution list but for example use a alias instead (we have a few client with domain permissions, it is really unbelievable the mess they make)
CIDR to RegEx: d-fault.nl/cidrtoregex
DNS Lookup: d-fault.nl/dnstools
DKIM Generator: d-fault.nl/dkimgenerator
DNSBL Lookup: d-fault.nl/dnsbllookup
GEOIP Lookup: d-fault.nl/geoiplookup

User avatar
katip
Senior user
Senior user
Posts: 1158
Joined: 2006-12-22 07:58
Location: Istanbul

Re: DistributionList modes

Post by katip » 2021-09-11 13:21

RvdH wrote:
2021-09-11 10:52
Automatically purging is a complicated task i think, especially when users don't use their account names in distribution list but for example use a alias instead (we have a few client with domain permissions, it is really unbelievable the mess they make)
yes i see... luckily i'm the only domain/server admin and put only account addresses in lists :lol:
in fact after an account deletion exclusive aliases (name.surname@...) should also be removed, but generic aliases (sales2@...) should stay (or better reset temporarily to admin/postmaster account??) , and yes it's complicated.
maybe, manually entering a new recipient could be restricted only to non-local addresses (anyone@external.tld), and any local recipient would have to be selected from drop list (real accounts) only. that would give some integrity.
Katip
--
HMS 5.7, MariaDB 10.4.10, SA 4.0.0, ClamAV 0.103.8

User avatar
mattg
Moderator
Moderator
Posts: 22435
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: DistributionList modes

Post by mattg » 2021-09-12 01:08

The problem is for domains that are partially hosted externally, some here - some there
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply