- General Settings
- Signatures and Away Messages
- Labels and Filters
- Send As, IMAP, POP and Forwarding
- Delegates
- Hiding/Unhiding users from the domain contacts
- User Profile Photos
- Managing User Email
gam user <username>|group <groupname>|ou <ouname>|all users language <language code>
set the display language used for the user. A full list of language codes can be found here. Note that language changes can take several hours to appear in the user's interface and may require the user to log out and log back in.
This example sets the user's language to UK English
gam user jlennon language en-GB
gam user <username>|group <groupname>|ou <ouname>|all users pagesize 25|50|100
determine how many messages a user will see on a web page when viewing their Inbox or other labels.
This example sets the page size to 50 for the user
gam user jhendrix pagesize 50
gam user <username>|group <groupname>|ou <ouname>|all users shortcuts on|off
enable/disable keyboard shortcuts for the given users. List of shortcuts can be found here.
This example turns keyboard shortcuts on for all users
gam all users shortcuts on
gam user <username>|group <groupname>|ou <ouname>|all users arrows on|off
enable/disable personal indicator arrows for the given users. Personal indicator arrows are described here.
This example turns personal indicator arrows off for the user
gam user jamesdean arrows off
gam user <username>|group <groupname>|ou <ouname>|all users snippets on|off
enable/disable message snippets in Inbox and other message lists.
This example turns snippets off for the group newbies
gam group newbies snippets off
gam user <username>|group <groupname>|ou <ouname>|all users utf on|off
turn UTF-8 (Unicode) encoding of outgoing mail on or off.
This example sets UTF-8 outgoing mail encoding on for members of the faculty group
gam group faculty utf on
gam user <username>|group <groupname>|ou <ouname>|all users webclips on|off
enable or disable webclips for the given users. Webclips are described here.
This example disables webclips for all users
gam all users webclips off
gam user <username>|group <groupname>|ou <ouname>|all users [signature <signature text>] [file <signature file>]
sets a email signature for the given users. Use quotes around the signature text if it contains spaces (which it almost certainly will). New lines can be specified with \n. HTML can also be used. An empty string like "" will disable the signature. Use the optional file argument to specify a filename that contains the signature text. This is easier for long, complex signatures.
This example sets all user's signatures to be:
Acme Inc
1321 Main Ave<br>
http://www.acme.com
gam all users signature
"Acme Inc<br>1321 Main Ave<br>http://www.acme.com
This example reads the signature from a file:
gam user [email protected] signature file bobs-html-sig.txt
gam
user <username> | group <groupname>| ou <ouname> | all users show signature [format]
Shows the email signature for the given users. By default, the raw HTML of the signature is shown, the optional argument format
causes the HTML to be interpreted.
This example shows all user's signature
gam all users show signature
gam
user <username> | group <groupname> | ou <ouname> | all users
vacation on|off subject <subject text>
[message <message text>]
[file <message file>]
startdate <YYYY-MM-DD> enddate <YYYY-MM-DD>
[contactsonly] [domainonly]
enable or disable a vacation/away message for the given users. subject will be the away message subject. message will be the message text. Use quotes around subject and message text if they contain spaces (which they probably will). If file is specified instead of message, the message will be read from the given text file. In the message text, \n will be replaced with a new line. The optional startdate and enddate arguments set a start and end date for the vacation message to be enabled. The optional argument contactsonly will only send away messages to persons in the user's Contacts. The optional argument domainonly will prevent vacation messages from going to users outside the Google Apps domain.
This example sets the away message for the user
gam user epresley vacation on subject "Elvis has left the building"
message "I will be on Mars for the next 100 years. I'll get back to you when I return.\n\nElvis"
This example reads the message from a text file:
gam user [email protected] vacation on subject "I am away" file bobs-away-message.txt
gam
user <username> | group <groupname> |ou <ouname> | all users show vacation [format]
Show the given user's vacation message and settings. By default, the plain text or raw HTML of the vacation message is shown, the optional argument format
causes the HTML to be interpreted.
This example shows the vacation settings for jsmith
gam user jsmith show vacation
gam user <username>|group <groupname>|ou <ouname>|all users label <label name>
gam all users label "New Label"
gam user <username>|group <groupname>|ou <ouname>|all users show labels
This example shows the labels for all members of the marketing group
gam group marketing show labels
gam user <username>|group <groupname>|ou <ouname>|all users delete label <label name>
gam all users delete label "Old Label"
gam user <username>|group <groupname>|ou <ouname>|all users filter
from <email>|to <email>|subject <words>|haswords <words>|nowords <words>|musthaveattachment
label <label name>|markread|archive|star|forward <email address>|trash|neverspam
Warning: GAM cannot delete filters because Google has not provided a method for filter deletion in their APIs. Before creating filters for some or all users in your domain, please make sure you absolutely need/want them. The only way to get rid of them once created is to have each user manually delete them.
gam user john filter from [email protected] label Dianne archive
gam user <username>|group <groupname>|ou <ouname>|all users sendas <email address> <name> [default] [replyto <email address>]
Note: the email address must be under the direct control of your Google Apps account, the domain must be your Google Apps primary domain, a secondary domain or a domain alias.
This example will allow the user fjones to send mail as [email protected] by default (it is assumed to [email protected] is already setup as a user, group or nickname in your domain)
gam user fjones sendas [email protected] "Fred Jones" default
gam user <username>|group <groupname>|ou <ouname>|all users show sendas
This example shows the send as settings for gwashington
gam user gwashington show sendas
gam user <username>|group <groupname>|ou <ouname>|all users imap on|off
This example will turn IMAP on for all current users in the domain.
gam all users imap on
gam user <username>|group <groupname>|ou <ouname>|all users show imap
This example shows all user's IMAP status.
gam all users show imap
gam user <username>|group <groupname>|ou <ouname>|all users pop on|off [for allmail|newmail] [action keep|archive|delete]
This example will turn POP on for any users in the group students. All mail in the Inbox will be exposed to the POP client and POPped emails will be kept in the Inbox.
gam group students pop on
This example will turn POP on for Bob but only for new mail he receives. Mail will be archived after it is popped:
gam user [email protected] pop on for newmail action archive
gam user <username>|group <groupname>|ou <ouname>|all users show pop
This example shows the pop settings for the group students
gam group students show pop
gam user <username>|group <groupname>|ou <ouname>|all users forward on|off [email address] [keep|archive|delete]
Warning: Google has recently taken steps to limit what email addresses forwards can be set to via the API (and thus via GAM). See this blog post for details about what domains you can set forwards to. Generally you are limited to forwarding to your primary domain, alias and secondary domains and subdomains of those.
This example sets a forward for the user, messages will be deleted after they are forwarded so they will not show up in the user's account
gam user eclapton forward on [email protected] delete
gam user <username>|group <groupname>|ou <ouname>|all users show forward
This example shows alincoln's forwarding settings.
gam user alincoln show forward
A delegate is someone who has been given access to someone else's email and contacts. The delegator is the one whose email and contacts are accessible by the delegate. Delegate and the delegators must be in the same domain, granting delegate access across multiple domains is currently not possible.
gam user <username>|group <groupname>|ou <ouname>|all users delegate to <delegate email>
Both the Gmail delegator and the delegate:
- Must be active. A 500 error is returned if either user is suspended and disabled.
- Must not require a change of password on the next sign in. A 500 error is returned if either user has this flag enabled in the control panel, or, using the Provisioning API, the changePasswordAtNextLogin attribute is true.
you can confirm these settings using the gam info user command. Both "Account suspended" and "Must change password" should show false for both the delegate and the delegator.
gam user sales delegate to [email protected]
gam user <username>|group <groupname>|ou <ouname>|all users show delegates [csv]
This example shows delegates across the entire domain.
gam all users show delegates
gam user <username>|group <groupname>|ou <ouname>|all users delete delegate <delegate email>
this example takes away deSecretary's access to deBoss's email and contacts.
gam user deBoss delete delegate deSecretary
Individual user profiles can be hidden/unhidden from the domain contacts list (sometimes called the Global Address List or GAL).
Changing a users profile to hidden/unhidden
gam user <username>|group <groupname>|ou <ouname>|all users profile shared|unshared
this example hides all users in the asked-to-be-hidden Google group from email address autocomplete and contact searches.
gam group asked-to-be-hidden profile unshared
Showing users profile hidden/unhidden status
gam user <username>|group <groupname>|ou <ouname>|all users show profile
this example shows the status of all user profiles in the domain.
gam all users show profile
Support for user profile photo management has been added to GAM 2.3. Note that if you get errors about Authsub token invalid, you should delete the existing oauth.txt file and regenerate the OAuth authentication using GAM 2.3 so that the full Contacts API scope is included.
gam user <username>|group <groupname>|ou <ouname>|all users update photo <photo filename>
this example replaces Michael Jones' photo with the one from the employee photo directory
gam user [email protected] update photo h:\employee-photos\mjones.jpg
this example replaces all user's photos with ones stored in c:\photos<user email>.jpg
gam all users update photo c:\photos\#user#.jpg
gam user <username>|group <groupname>|ou <ouname>|all users get photo
This example retrieves photos for all users in Google Apps and saves them to files.
gam all users get photo
gam user <username>|group <groupname>|ou <ouname>|all users delete photo
This example will delete the profile photo for all members of the group named abused-the-system
gam group abused-the-system delete photo
gam user <username>|group <groupname>|ou <ouname>|all users delete|trash messages query <gmail search> [doit] [max_to_delete <number>]
Delete or move to trash messages for a user or group of users. The query parameter is required and uses Gmail search syntax. See the Advanced Gmail Search help article for some tips on complex searches. By default, GAM will not delete/trash any messages for users, it only shows what messages will be deleted. The doit parameter is needed to tell GAM to actually perform the delete/trash operation. By default, GAM will only delete one matching message per a user. If more than one message matches the search query, GAM will refuse to delete ANY messages. The max_to_delete parameter sets the maximum number of messages that GAM should delete per-user. If the search matches more messages than max_to_delete, NO messages will be deleted for that user.
This example gets a count of how many messages a user has with PDF attachments but doesn't actually do anything to them.
gam user [email protected] delete messages query filename:pdf
This example will delete the message that has this exact RFC822 Message ID header for all users. Only one message at most will be deleted for all users (they should have only one copy). This example is useful if an email is sent to a large number of people and you wish to remove it from their mailbox quickly.
gam all users delete messages query rfc822msgid:CAGoYzwvzepSfbHB8mBoOx4VqsiotTmRjvBSFjz8NMg2VXeHTrA@mail.gmail.com doit
This example will trash all messages older than 7 years for members of the group. BE CAREFUL! There is no undo button. This command could be run on a regular basis (once a day or so) in order to ensure messages older than 7 years are trashed for the user.
gam group [email protected] trash messages query older_than:7y doit max_to_delete 999999999