E-mail groups in OS X Snow Leopard

5,532

Solution 1

Ok guys,

Its actually much simpler then everything above...

Go back to linux mail basics... and use forwarding :)

Simply open Server Preferences,

Click on Users Add a new user - lets say: contact enable only the Mail service

Then save and close Server Preferences...

Goto Workgroup Manager Under Accounts, select the username Click on Mail You have 3 options, none/enabled/forward

Select Forward In the Forward To field, enter all the email addresses you want to forward to separated by commas

This will forward all emails to the users you specify...

Solution 2

On the Mail server, if you open up Server Admin, click on the Mail service and then click on the Mailing Lists tab you'll notice a checkbox for "Enable Server Group Mailing Lists". This is supposed to enable just that feature and automatically update the aliases every 10 minutes by default. In practice I've not found it working as of 10.6.1. The address would be then be group_shortname@domain (eg. [email protected]). (Page 42 of the Mail Service Admin PDF)

On Apple's Discussion Forums some users have had success by appending -wiki to the email address and then making a postfix alias for the group's shortname to groupshortname-wiki

=====

Another alternative is to use postfix itself manually:

Unfortunately postfix aliases are not a feature that you can edit in Server Admin or Workgroup Manager, and as such any group memberships done in Workgroup Manager won't help us out here.

However adding such an alias is rather simple:

You need to edit /etc/postfix/alias in a text editor and add a line in the format of alias:localaddress1, localaddress2.

eg. sales:jack, jill, bob, sarah (where jack, jill, bob and sarah are all usernames are your domain.)

After editing the file you need to run postalias /etc/postfix/aliases (hash the file for faster access) and then newaliases (reload alias database).

(For more check page 78 of the Mail Service Admin Manual from Apple's Mac OS X Server Documentation). Or you can check out man aliases (eg. how to include different text files with the memberships instead of just having it in one file.)

The word of warning; if the group names become public they provide a very quick way for spammers to spam everyone. (You may want to look into postfix spam protection configuration changes if this occurs - namely adding the groups to recipient_access and rejecting any mail not locally to them. Source)

Solution 3

I dug deeper into the issue thanks to the information given by Chealion. While it is true that the manual do imply that the checkbox to Enable Server Group Mailing Lists should work to solve this issue, it became quite apparent after a while that Apple decided to not have mailing list administration as part of the open directory.

As far as I can tell, the reason is to avoid having to need administrator access to the server to set up such a thing as a distribution group. Also, if I understand correctly, the connection with the Wiki is in order to provide further collaboration tools. In fact, the collaboration framework is actually quite nice. The wiki provides a one stop shop for gathering semi-permanent information, while also enabling the addition of a blog service, calendaring as well as the infamous mailing list. This quite neatly gathers many of the aspects of digital information flow required in a modern project environment. The interface is easy to use even for non-technical people and while there aren't a ton of features, most of the fundamental features are readily available.

However, while the system is quite nice, there's still the matter of the weird e-mail suffix: -wiki. For some reason, Apple chose to append said suffix to the shortname of the group (wiki, som discrepency in their naming scheme there). However, upon investigation, I noticed that the suffix is little more than an arbitrary naming scheme with very little impact on the actual functionality of the system. I assume this was done for some odd reason such as not confusing the name of the wiki mailing list with a proper user or mailman mailing list, but that kind of reasoning is so far fetched that I must say that I honestly just don't know.

In any case, it's quite easy to patch the wiki to get rid of the suffix. There are two files that need to be edited in order to make this work.

/usr/share/wikid/lib/python/apple_utilities/MailUtilities.py

Change line 263 to look like the following code:

mailAddress = entity.shortName

Change line 465 to look like the following code

groupMailingAddress = u"%(groupName)s@%(hostname)s" % {'groupName': groupName, 'hostname': hostname}

/usr/share/wikid/lib/python/apple_utilities/MailBundler.py (possibly optional)

Change line 55 to look like the following code:

group = group.replace('-wiki', '')

You then need to remove MailUtilities.pyc and MailBundler.pyc (found in the same directory) and compile new ones using the following command (don't forget the dot at the end):

python -mcompileall .

After doing these edits, restart the wiki and the -wiki suffix should be gone. I had to go into each wiki and make some a change to the permissions (any change will do, remove and re-add a user for instance, it's just to enable the save button), then save the changes to force a regeneration of the postfix aliases file. Any subsequent changes however, addition of wikis, removal, permission changes etc works just fine. The great part about this hack is that it actually both give you friendly e-mail addresses for your mailing list, and it also works with the online mailing list feature in the wiki web interface.

Hope this helps anyone!

Share:
5,532

Related videos on Youtube

aqua
Author by

aqua

Updated on September 17, 2022

Comments

  • aqua
    aqua almost 2 years

    I've been trying to figure out how to do simple e-mail distribution groups in OS X Server 10.6 now for a few hours and I can't seem to figure it out. Basically I want to be able to e-mail multiple people by e-mailing a group that they are a part of. Trying to e-mail the short name of the group doesn't work at all, infact, the SMTP server won't even try to send it.

    I'm not interested in the mailing list management features, I just need very simple distribution groups. Is it possible to do this from the Server Admin or Workgroup Manager front ends or must I edit some configuration files? I don't mind editing text files and if push comes to shove... But unfortunately, my collegues don't fare too well with editing configuration files (hence the purchase of a OS X server) and so a GUI frontend solution is preferred. Any takers?

  • aqua
    aqua over 14 years
    That works, thanks! However, this'll be difficult to maintain as the list grows. Is it possible to connect this with the open directory service somehow? Since I don't know anything about postfix (and very little about open directory), the only idea that comes to my mind is creating a cron job that updates the aliases file but that seems hack-ish.
  • aqua
    aqua over 14 years
    On page 42 in the Mail Service Admin Manual it describes how to set up a wiki-based mailing list (which essentially looks like what I'm after), however just as you noted this doesn't seem to work at all with 10.6. I've googled it for a while but haven't come up with anything useful, strange how it doesn't seem to be a widespread issue. That or my google fu is just not up to snuff.
  • aqua
    aqua over 14 years
    Just added an answer of my own, I managed to solve all my issues. Thanks for the help, I hadn't figured this one out on my own!
  • aqua
    aqua over 14 years
    I guess this should really be a seperate question, but yeah I don't think it's possible to invite members of a wiki unfortunately. But you can definately create an OD group with the same name, giving you what you want.
  • aqua
    aqua over 14 years
    I was a bit unclear. Obviously you can invite individual members of the wiki, but what I meant was that you can't invite the wiki itself since it's just an entry in the aliases file and not an actual group in the OD. Because of this it's safe to create a group in the OD with the same name, they won't collide in any way that I know of.
  • aqua
    aqua about 13 years
    Agreed, this is the simple way to go. Thanks Mike.