Adding a forwardingaddress with GAM and setting forward on

1,309 views
Skip to first unread message

Andrew Sternick

unread,
Jan 27, 2024, 11:53:51 AM1/27/24
to GAM for Google Workspace
I recently installed a new version of GAM on a new instance, and moved my scripts over. My offboarding script has stopped working in a particular way. I used to set the forwarding address and turn the forwarding on like so:

gam user $username add forwardingaddress sam...@address.com || true
gam user $username forward on sam...@address.com keep

What's happening now is the second command is erroring out with the message "Set Failed: Invalid forwarding address". I've noticed if I go to the destination mailbox and accept the request for forwarding, I am able to run the script successfully. 

Has there been a change in how GAM handles forwardingaddress? And if so, is there a way around this - a way to suppress the requirement for confirmation, or to handle confirmation in the sam...@address.com account via GAM as well?


Andrew Sternick

unread,
Jan 27, 2024, 11:55:56 AM1/27/24
to GAM for Google Workspace
Hmph, I do see this fairly recent post:
https://groups.google.com/g/google-apps-manager/c/11wlQGukVk0/m/lz6BnMLYAwAJ

Oddly, however, this worked until I set up my new instance and installed GAM on it. 

Andrew Sternick

unread,
Jan 27, 2024, 12:02:13 PM1/27/24
to GAM for Google Workspace
I do see another thread about this, but it ended inconclusively:
https://groups.google.com/g/google-apps-manager/c/MsDeq8sssSY/m/N0QvVq-gDgAJ

I've got "Allow users to automatically forward incoming email to another address" in Automatic Forwarding set to ON. So this SHOULD work, but I'm still getting the failure.

Ross Scroggs

unread,
Jan 27, 2024, 12:37:42 PM1/27/24
to google-ap...@googlegroups.com
Send me a Meet/Zoom invitation and I'll help investigate.

Ross
----
Ross Scroggs



--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/f7f75453-0e63-4f35-9b77-46f6e9bb0a6dn%40googlegroups.com.

Steven Flanagan

unread,
Feb 6, 2025, 11:44:46 AMFeb 6
to GAM for Google Workspace
Was this accomplished and if so, may I inquire as to what the command was?
We have a lot of delegated (shared) mailboxes that people don't sign into that are wanting things like this done.

Andrew Sternick

unread,
Feb 6, 2025, 3:53:42 PMFeb 6
to google-ap...@googlegroups.com
My memory of it is quite dim. It might have required a GAM upgrade but you can't quote me on that. I do know that it works now however and I'm still using the command.






The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential or privileged material. Any review, distribution, or other unauthorized use of the information by persons or entities other than the intended recipient is prohibited. If you received this communication in error, please contact the sender and delete the material from any computer.


*** Arvest Confidential ***

--
You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/31EOvuYMI6Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/google-apps-manager/10bd1635-3ea9-4a04-85be-8965fdce4ab8n%40googlegroups.com.


--
Andrew Sternick
Lead, IT Engineer
andrew....@newsela.com

Brandi Groft

unread,
Feb 7, 2025, 3:26:49 PMFeb 7
to GAM for Google Workspace
Steven,
Is the address you want to forward TO within your same domain? If so, it should work to just run these two commands because the verification is automatically done. If the destination email address is outside your domain, someone has to click the verification link there and therefore using solely GAM isn't enough. (This has thrown me off in the past because I got used to being able to enable forwarding completely via gam, and then forgot that it only works for internal forwards when I had an external use case.)

GAM 7.02.03
>gam user us...@institute.edu add forwardingaddress us...@institute.edu
User:   us...@institute.edu, Add 1 Forwarding Address
  User:   us...@institute.edu, Forwarding Address: us...@institute.edu, Added

>gam user  us...@institute.edu info forwardingaddress us...@institute.edu
User:  us...@institute.edu,  Show Info 1 Forwarding Address
  Forwarding Address:  us...@institute.edu , Verification Status: accepted

>gam user  us...@institute.edu  forward on us...@institute.edu  keep
User: us...@institute.edu, Forward Enabled: True, Forwarding Address:  us...@institute.edu , Action: leaveInInbox

Thanks,
Brandi Groft
Whitehead Institute

Steven Flanagan

unread,
Feb 7, 2025, 4:02:59 PMFeb 7
to google-ap...@googlegroups.com
Yes it's to forward within our same domain.
Thank you.

On Fri, Feb 7, 2025 at 2:27 PM 'Brandi Groft' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:
Information Security REMINDER: This is an EXTERNAL EMAIL. Stop and think before RESPONDING or CLICKING a link or OPENING attachments.

Reply all
Reply to author
Forward
0 new messages