Command line tool to create google groups as mail aliases for google apps
sudo pip install -U google-api-python-client
sudo pip install -U retrying
Usage: galias.py [options] COMMAND
Possible COMMANDS are:
listall
- List all aliaseslist <alias>
- list the specified aliaslist_memberships [addresses]
- list alias memberships for an optional list of addressesadd <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 CONFIRMATIONgetsettings <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
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.
./galias.py listall
./galias.py list [email protected]
Add new alias to forward [email protected] to [email protected]
./galias.py add [email protected] [email protected]
Delete [email protected] from the [email protected] alias
./galias.py delete [email protected] [email protected]