ERROR: 400: Custom from requires smtpMsa configuration - invalidArgument

1,471 views
Skip to first unread message

Ronald Lee

unread,
Apr 26, 2021, 6:08:47 PM4/26/21
to GAM for Google Workspace
Hi all,

I had no issues previously running the same GAM Command, but now I get the following error when changing default sendas: 

ERROR: 400: Custom from requires smtpMsa configuration - invalidArgument

The following is the command I'm using (because we have two domains):

gam user ronal...@sevenrooms.co add sendas ronal...@sevenrooms.com "Ronald Lee" replyto ronal...@sevenrooms.com default

I'm not even sure if it's actually running into an error setting it or not.

Thanks,
Ron

Ross Scroggs

unread,
Apr 26, 2021, 6:32:54 PM4/26/21
to google-ap...@googlegroups.com
Ronald,

Are the two domains under the same account?
I don't get errors when the two different domains are under the same account but do get the error when they are not.

Ross

--
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/9320ca5c-e7a9-4053-9964-b9f08ef7433fn%40googlegroups.com.


--

Ronald Lee

unread,
Apr 26, 2021, 6:47:04 PM4/26/21
to google-ap...@googlegroups.com
Hi Ross - yes they are. 

I never got these errors until recently running the same command - not sure if it was a change or something on Google's end.



--

Ronald Lee
Director of Security, Compliance and Risk

SEVENROOMS

Norman Chin

unread,
Mar 4, 2022, 6:54:28 PM3/4/22
to GAM for Google Workspace
This is an old thread but I am getting the same error. I also have 2 domains and I tried to set the default sendas address to our "user alias domain" (not our primary domain) but I get the same invalidArgument error. This use to work but it no longer does. Is there a work around on this?

Thanks.

Dale Courtney

unread,
Oct 12, 2022, 6:00:23 PM10/12/22
to GAM for Google Workspace
I'm running GAMADV-XTD3 6.27.11 

I'm getting the same errors as others.

I have the primary domain emsibg.com and a secondary domain lightcast.io that is verified and Gmail activated. 

I have a user wend...@emsibg.com with the alias wend...@lightcast.io

I used to be able to run the script: 

     gam user wend...@emsibg.com sendas wend...@lightcast.io default

Now I am getting the following error when I didn't used to: 

     Add Failed: Custom from requires smtpMsa configuration

Any advice would be appreciated. 

Best,
Dale

Ross Scroggs

unread,
Oct 12, 2022, 7:27:35 PM10/12/22
to google-ap...@googlegroups.com
Dale,

gam <UserTypeEntity> [create|add] sendas <EmailAddress> <String>

        [(signature|sig|htmlsig <String>)|(file|htmlfile <FileName> [charset <CharSet>])|(gdoc|ghtml <UserGoogleDoc>)

            (replace <Tag> <UserReplacement>)*]

        [html [<Boolean>]] [replyto <EmailAddress>] [default] [treatasalias <Boolean>]

        [smtpmsa.host <SMTPHostName> smtpmsa.port 25|465|587

         smtpmsa.username <UserName> smtpmsa.password <Password>

         [smtpmsa.securitymode none|ssl|starttls]]


You're missing a required field; default is being taken as the name of the sendas.

gam user wend...@emsibg.com sendas wend...@lightcast.io "<String>" default

I'm not sure that this will solve the problem, test it.


Ross

James R

unread,
Oct 13, 2022, 12:32:49 PM10/13/22
to GAM for Google Workspace
I gave this a try but received the same error. Running GAM 6.25

James R

unread,
Oct 13, 2022, 2:04:25 PM10/13/22
to GAM for Google Workspace
I too have started to run into this problem frequently on GAM 6.25. Our automation builds the alias for our secondary, gmail activated domain (g.contoso.com), then tries to set it as the default sendas and reply to using:

gam user 1username sendas 1use...@g.contoso.org "John Doh" replyto 1use...@g.contoso.org default

Now I consistently get ERROR: 400: Custom from requires smtpMsa configuration - invalidArgument from this, haven't changed this process in the last 3 years so I'm curious what changed and how we work around it.

Jay Lee

unread,
Oct 13, 2022, 2:21:04 PM10/13/22
to google-ap...@googlegroups.com
What does:

gam print domains

show for you? I can replicate your error IF the domain I'm adding is not a verified secondary domain.

Jay Lee


--
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.

James R

unread,
Oct 13, 2022, 3:45:55 PM10/13/22
to GAM for Google Workspace
After working with Ross for a while the issue seems to be boiling down to the API not recognizing g.contoso.com as a valid domain for our tenant despite being a valid, verified domain for years.  This seems to be an API issue and not an issue with GAM however it would be nice if more folks who have both their domain contoso.com and a subdomain g.constoso.com in their Gmail domains list to test this themselves.  I tried reaching out to Google support about the API but was told they couldn't help, didn't even mention GAM. 

Hopefully someone else has better luck.

Thanks! 

James R

unread,
Oct 13, 2022, 4:18:35 PM10/13/22
to GAM for Google Workspace
domainName,verified,creationTime,type
****ls.org,True,2017-03-15 14:59:20.587000,primary
g.****ls.org,True,2017-08-14 13:20:01.685000,secondary

On Thursday, October 13, 2022 at 11:21:04 AM UTC-7 jay...@gmail.com wrote:

Ivan Boskovic

unread,
Oct 13, 2022, 4:36:13 PM10/13/22
to GAM for Google Workspace
Hi all,

Actually, what we have found out on this is that there is no issue, except for the propagation delay on Google's systems somewhere.

We are doing quite a lot of data migrations for companies and are using GAMADV for most of the jobs (99% of them when it comes to the Google side of course), and in the last 6 months, we have seen an increase in these errors (this one is the latest, but there were others before it) specifically when adding SendAs (default or not) for users. Always the error went away within 24 hours, or just after. Couldn't tell you why this is happening as we have no access to Google's systems (naturally :-) ), and they can't or won't say why. In any case, just wanted to let you know that the propagation delay after adding aliases to the user's accounts is the issue.
However, you won't have the same issue when you try adding SendAs manually through the user account Gmail settings.

Hope that helps!

Cheers!

James R

unread,
Oct 13, 2022, 4:40:45 PM10/13/22
to GAM for Google Workspace
I will test this over the next few days to see if this error goes away on its own.

Ivan Boskovic

unread,
Oct 14, 2022, 5:14:16 AM10/14/22
to google-ap...@googlegroups.com
Sure thing.
I forgot to mention that I do try to do it every few hours or so and gradually all of them are accepted.
Some faster some slower, but eventually all of them do, as mentioned before or close after the 24 hour mark.

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/BSz-nJVQkcs/unsubscribe.
To unsubscribe from this group and all its topics, 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/bf25f55e-44c0-459f-83de-5e9398ad546an%40googlegroups.com.

James R

unread,
Oct 14, 2022, 3:37:00 PM10/14/22
to GAM for Google Workspace
I have confirmed that I was able to perform the sendas configuration a little over 24 hours since creating the alias.  Is there anything GAM can do to better determine if the API is backed up like this?  The thought of having to wait 24 hours to perform this step of provisioning feels a little egregious.

Jay Lee

unread,
Oct 14, 2022, 3:57:53 PM10/14/22
to google-ap...@googlegroups.com
It can be a lot of if...then...else... work on GAM's part to check all these "maybe it's failing because... scenarios. Is it that common that you are adding new secondary/alias domains?

Jay Lee


Ivan Boskovic

unread,
Oct 14, 2022, 4:08:27 PM10/14/22
to google-ap...@googlegroups.com
Hi Jay,

Yes, it is a very common thing for me to be adding secondary domains to Workspace accounts.
We are always doing the same thing with every migration to Google Workspace we do, as we have nailed down the process for maximum efficiency. We add the domain as secondary and then add the aliases for users, after which we run SendAs. Until about 5-6 months ago all was working well, without issues, then it started throwing diferent kind of errors, but the thing is that regardless of the errors we were always able to add SendAs either within 24 hours or very close after.
This indicates to me that it has nothing to do with GAM as there is only one command that we had run during the last year or so to perform this.

James R

unread,
Oct 14, 2022, 4:09:00 PM10/14/22
to GAM for Google Workspace

In our particular situation it is common and required.  Without this setting we introduce a very complicated forwarding scenario that makes troubleshooting mail flow issues more difficult, but not impossible.   

Dale Courtney

unread,
Oct 25, 2022, 4:39:42 PM10/25/22
to GAM for Google Workspace
Ross: I apologize for the long delay in responding. 

I ran the following: 

     gam user lottes.salter sendas lottes...@lightcast.io "Lottes Salter" default

I received the same error message: 

     User: lottes...@emsibg.com, SendAs Address: lottes...@lightcast.io, Add Failed: Custom from requires smtpMsa configuration

best,
Dale

On Wednesday, October 12, 2022 at 4:27:35 PM UTC-7 Ross Scroggs wrote:
Reply all
Reply to author
Forward
0 new messages