Skip to content

Command line tool to create google groups as mail aliases for google apps

License

Notifications You must be signed in to change notification settings

burningmantech/galias

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

galias

Command line tool to create google groups as mail aliases for google apps

Requires the google python API client

sudo pip install -U google-api-python-client

Requires the retrying package

sudo pip install -U retrying

Usage

Usage: galias.py [options] COMMAND

Possible COMMANDS are:

  • listall - List all aliases
  • list <alias> - list the specified alias
  • list_memberships [addresses] - list alias memberships for an optional list of addresses
  • add <alias> <destination> - add the <destination> to the <alias>
  • delete <alias> <destination> - delete the <destination> from the <alias>
  • addfromfile <group> <filen> <owner,manager> - add the emails listed in <file> to <group> optionally as <owner> or <manager>
  • owner <group> <destination> - set <destination> to an owner of <group>
  • manager <group> <destination> - set <destination> to a manager of <group>
  • member <group> <destination> - set <destination> to member of <group>
  • create <group> <type> - create <group> where <type> can be [alias, announce, discuss]
  • groupdelete <group> - delete whole <group> WITHOUT CONFIRMATION
  • getsettings <group> - output the settings for <group>
  • updatesettings <group> <type> - update the settings of <group> to <type>

Options:

  • -h, --help show this help message and exit
  • -d DOMAIN, --domain=DOMAIN

Config

The domain to administer is required. If it is not given, the program will prompt for it. For faster use you can pass it on the command line with the above option or copy example_galias.ini to galias.ini and edit it with your information.

In addition, the script must be registered in the Google Developer console for your domain, and the client_secrets.json file must be present.

Examples

List all aliases

./galias.py listall

List specific alias

./galias.py list [email protected]

Add new alias to forward [email protected] to [email protected]

./galias.py add [email protected] [email protected]

./galias.py delete [email protected] [email protected]

About

Command line tool to create google groups as mail aliases for google apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%