IMAP login to Gmail server via CLI fails












1















I am trying to log into my Gmail account manually using OpenSSL in my terminal. But for some reason, Gmail doesn't authorize my login even if the password is correct.
Here's a rundown of my terminal:



openssl s_client -crlf -connect imap.googlemail.com:993
CONNECTED(00000003)
.......
# Some stuff displayed here
.......
* OK Gimap ready for requests from <my-ip> f75mb26659817ybg
01 login username@gmail.com password
01 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)


Why does it fail? Also, I am a beginner with this and am very curious about doing this, therefore a few article suggestions regarding this would be great.




I tried searching for related articles myself but was unable to do so even after pages of searching.











share|improve this question


















  • 1





    I was able to achieve my goal using Gmail API and OAuth2 authorization. Took quite some bash scripting. Here are the results: My Reddit post. I'm still not solving this question as marked because the solution I've found is just a workaround.

    – Utkarsh Verma
    Jan 20 at 14:06






  • 1





    how about adding the solution specifics you found from that post as an answer with more and precise detail? I think that'd be much better than this comment with just the link and you saying "check the answer here" and then a year down the road that link gets trashed, etc. If you post the content and the link as an answer, it will be much much better and helpful to that that also need that same answer but quicker if you share the specifics that are to the point about the solution you potentially found. Choo Choo!!!

    – Pimp Juice IT
    Jan 26 at 4:17











  • Second that. Workarounds are completely acceptable answers, especially when a direct solution is not available.

    – Twisty Impersonator
    Jan 26 at 14:03











  • @TwistyImpersonator It's been quite some time and I have provided my own workaround below since this question would have had received an answer if it was meant to by now. Please have a read and tell me if I need to add something more.

    – Utkarsh Verma
    Jan 26 at 15:20











  • @PimpJuiceIT I've added the workaround as an answer. Please have a read and tell me if it needs something more.

    – Utkarsh Verma
    Jan 26 at 15:21
















1















I am trying to log into my Gmail account manually using OpenSSL in my terminal. But for some reason, Gmail doesn't authorize my login even if the password is correct.
Here's a rundown of my terminal:



openssl s_client -crlf -connect imap.googlemail.com:993
CONNECTED(00000003)
.......
# Some stuff displayed here
.......
* OK Gimap ready for requests from <my-ip> f75mb26659817ybg
01 login username@gmail.com password
01 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)


Why does it fail? Also, I am a beginner with this and am very curious about doing this, therefore a few article suggestions regarding this would be great.




I tried searching for related articles myself but was unable to do so even after pages of searching.











share|improve this question


















  • 1





    I was able to achieve my goal using Gmail API and OAuth2 authorization. Took quite some bash scripting. Here are the results: My Reddit post. I'm still not solving this question as marked because the solution I've found is just a workaround.

    – Utkarsh Verma
    Jan 20 at 14:06






  • 1





    how about adding the solution specifics you found from that post as an answer with more and precise detail? I think that'd be much better than this comment with just the link and you saying "check the answer here" and then a year down the road that link gets trashed, etc. If you post the content and the link as an answer, it will be much much better and helpful to that that also need that same answer but quicker if you share the specifics that are to the point about the solution you potentially found. Choo Choo!!!

    – Pimp Juice IT
    Jan 26 at 4:17











  • Second that. Workarounds are completely acceptable answers, especially when a direct solution is not available.

    – Twisty Impersonator
    Jan 26 at 14:03











  • @TwistyImpersonator It's been quite some time and I have provided my own workaround below since this question would have had received an answer if it was meant to by now. Please have a read and tell me if I need to add something more.

    – Utkarsh Verma
    Jan 26 at 15:20











  • @PimpJuiceIT I've added the workaround as an answer. Please have a read and tell me if it needs something more.

    – Utkarsh Verma
    Jan 26 at 15:21














1












1








1








I am trying to log into my Gmail account manually using OpenSSL in my terminal. But for some reason, Gmail doesn't authorize my login even if the password is correct.
Here's a rundown of my terminal:



openssl s_client -crlf -connect imap.googlemail.com:993
CONNECTED(00000003)
.......
# Some stuff displayed here
.......
* OK Gimap ready for requests from <my-ip> f75mb26659817ybg
01 login username@gmail.com password
01 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)


Why does it fail? Also, I am a beginner with this and am very curious about doing this, therefore a few article suggestions regarding this would be great.




I tried searching for related articles myself but was unable to do so even after pages of searching.











share|improve this question














I am trying to log into my Gmail account manually using OpenSSL in my terminal. But for some reason, Gmail doesn't authorize my login even if the password is correct.
Here's a rundown of my terminal:



openssl s_client -crlf -connect imap.googlemail.com:993
CONNECTED(00000003)
.......
# Some stuff displayed here
.......
* OK Gimap ready for requests from <my-ip> f75mb26659817ybg
01 login username@gmail.com password
01 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)


Why does it fail? Also, I am a beginner with this and am very curious about doing this, therefore a few article suggestions regarding this would be great.




I tried searching for related articles myself but was unable to do so even after pages of searching.








command-line ssl imap gmail-imap






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jan 19 at 8:57









Utkarsh VermaUtkarsh Verma

365




365








  • 1





    I was able to achieve my goal using Gmail API and OAuth2 authorization. Took quite some bash scripting. Here are the results: My Reddit post. I'm still not solving this question as marked because the solution I've found is just a workaround.

    – Utkarsh Verma
    Jan 20 at 14:06






  • 1





    how about adding the solution specifics you found from that post as an answer with more and precise detail? I think that'd be much better than this comment with just the link and you saying "check the answer here" and then a year down the road that link gets trashed, etc. If you post the content and the link as an answer, it will be much much better and helpful to that that also need that same answer but quicker if you share the specifics that are to the point about the solution you potentially found. Choo Choo!!!

    – Pimp Juice IT
    Jan 26 at 4:17











  • Second that. Workarounds are completely acceptable answers, especially when a direct solution is not available.

    – Twisty Impersonator
    Jan 26 at 14:03











  • @TwistyImpersonator It's been quite some time and I have provided my own workaround below since this question would have had received an answer if it was meant to by now. Please have a read and tell me if I need to add something more.

    – Utkarsh Verma
    Jan 26 at 15:20











  • @PimpJuiceIT I've added the workaround as an answer. Please have a read and tell me if it needs something more.

    – Utkarsh Verma
    Jan 26 at 15:21














  • 1





    I was able to achieve my goal using Gmail API and OAuth2 authorization. Took quite some bash scripting. Here are the results: My Reddit post. I'm still not solving this question as marked because the solution I've found is just a workaround.

    – Utkarsh Verma
    Jan 20 at 14:06






  • 1





    how about adding the solution specifics you found from that post as an answer with more and precise detail? I think that'd be much better than this comment with just the link and you saying "check the answer here" and then a year down the road that link gets trashed, etc. If you post the content and the link as an answer, it will be much much better and helpful to that that also need that same answer but quicker if you share the specifics that are to the point about the solution you potentially found. Choo Choo!!!

    – Pimp Juice IT
    Jan 26 at 4:17











  • Second that. Workarounds are completely acceptable answers, especially when a direct solution is not available.

    – Twisty Impersonator
    Jan 26 at 14:03











  • @TwistyImpersonator It's been quite some time and I have provided my own workaround below since this question would have had received an answer if it was meant to by now. Please have a read and tell me if I need to add something more.

    – Utkarsh Verma
    Jan 26 at 15:20











  • @PimpJuiceIT I've added the workaround as an answer. Please have a read and tell me if it needs something more.

    – Utkarsh Verma
    Jan 26 at 15:21








1




1





I was able to achieve my goal using Gmail API and OAuth2 authorization. Took quite some bash scripting. Here are the results: My Reddit post. I'm still not solving this question as marked because the solution I've found is just a workaround.

– Utkarsh Verma
Jan 20 at 14:06





I was able to achieve my goal using Gmail API and OAuth2 authorization. Took quite some bash scripting. Here are the results: My Reddit post. I'm still not solving this question as marked because the solution I've found is just a workaround.

– Utkarsh Verma
Jan 20 at 14:06




1




1





how about adding the solution specifics you found from that post as an answer with more and precise detail? I think that'd be much better than this comment with just the link and you saying "check the answer here" and then a year down the road that link gets trashed, etc. If you post the content and the link as an answer, it will be much much better and helpful to that that also need that same answer but quicker if you share the specifics that are to the point about the solution you potentially found. Choo Choo!!!

– Pimp Juice IT
Jan 26 at 4:17





how about adding the solution specifics you found from that post as an answer with more and precise detail? I think that'd be much better than this comment with just the link and you saying "check the answer here" and then a year down the road that link gets trashed, etc. If you post the content and the link as an answer, it will be much much better and helpful to that that also need that same answer but quicker if you share the specifics that are to the point about the solution you potentially found. Choo Choo!!!

– Pimp Juice IT
Jan 26 at 4:17













Second that. Workarounds are completely acceptable answers, especially when a direct solution is not available.

– Twisty Impersonator
Jan 26 at 14:03





Second that. Workarounds are completely acceptable answers, especially when a direct solution is not available.

– Twisty Impersonator
Jan 26 at 14:03













@TwistyImpersonator It's been quite some time and I have provided my own workaround below since this question would have had received an answer if it was meant to by now. Please have a read and tell me if I need to add something more.

– Utkarsh Verma
Jan 26 at 15:20





@TwistyImpersonator It's been quite some time and I have provided my own workaround below since this question would have had received an answer if it was meant to by now. Please have a read and tell me if I need to add something more.

– Utkarsh Verma
Jan 26 at 15:20













@PimpJuiceIT I've added the workaround as an answer. Please have a read and tell me if it needs something more.

– Utkarsh Verma
Jan 26 at 15:21





@PimpJuiceIT I've added the workaround as an answer. Please have a read and tell me if it needs something more.

– Utkarsh Verma
Jan 26 at 15:21










2 Answers
2






active

oldest

votes


















2














After several tries, it seemed to me that Gmail has dropped support for basic IMAP login as it is "less secure". So I ended up using OAuth2 for the authentication process. I also found that my goal, to fetch unread email count, could also be achieved using Gmail API afterwards. To implement it, I wrote a script in bash.



Here's what the script does in summary:




  • Create credentials for a client with access to the Gmail API and necessary scopes set.



  • Use those credentials to generate an authorization code for the user's account.




    During this, the terminal opens a user consent webpage which asks the user if he/she authorizes the client or not. Once authorized, the OAuth2 authorization code is sent to localhost at the specified port(I used 5000) which is then caught by the TCP listener, which the script runs in background temporarily, and stored.




  • Once the authorization code is stored, generate the API access token and store it somewhere for use.



  • Make curl requests like this to access the API:



    curl -H "Authorization: Bearer <the access token>" <the request>



Here are the relevant links:





  • Gmail Unread Mail Counter Script: This script uses the refresh token stored in a file to access the API through a new access token generated using the refresh token.


  • OAuth Access Token Generator Script: This generates an access token and refresh token and stores them in a file locally.

  • Their Documentation






share|improve this answer



















  • 1





    Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

    – Pimp Juice IT
    Jan 26 at 15:30











  • @PimpJuiceIT Thanks!

    – Utkarsh Verma
    Jan 26 at 17:22



















0














Works for me. Make sure to Let less secure apps access your account though since otherwise plain login (user + password) might not work.






share|improve this answer
























  • Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

    – Utkarsh Verma
    Jan 19 at 9:21













  • @UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

    – Steffen Ullrich
    Jan 19 at 9:51













  • That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

    – Utkarsh Verma
    Jan 19 at 9:57











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1396025%2fimap-login-to-gmail-server-via-cli-fails%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























2 Answers
2






active

oldest

votes








2 Answers
2






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














After several tries, it seemed to me that Gmail has dropped support for basic IMAP login as it is "less secure". So I ended up using OAuth2 for the authentication process. I also found that my goal, to fetch unread email count, could also be achieved using Gmail API afterwards. To implement it, I wrote a script in bash.



Here's what the script does in summary:




  • Create credentials for a client with access to the Gmail API and necessary scopes set.



  • Use those credentials to generate an authorization code for the user's account.




    During this, the terminal opens a user consent webpage which asks the user if he/she authorizes the client or not. Once authorized, the OAuth2 authorization code is sent to localhost at the specified port(I used 5000) which is then caught by the TCP listener, which the script runs in background temporarily, and stored.




  • Once the authorization code is stored, generate the API access token and store it somewhere for use.



  • Make curl requests like this to access the API:



    curl -H "Authorization: Bearer <the access token>" <the request>



Here are the relevant links:





  • Gmail Unread Mail Counter Script: This script uses the refresh token stored in a file to access the API through a new access token generated using the refresh token.


  • OAuth Access Token Generator Script: This generates an access token and refresh token and stores them in a file locally.

  • Their Documentation






share|improve this answer



















  • 1





    Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

    – Pimp Juice IT
    Jan 26 at 15:30











  • @PimpJuiceIT Thanks!

    – Utkarsh Verma
    Jan 26 at 17:22
















2














After several tries, it seemed to me that Gmail has dropped support for basic IMAP login as it is "less secure". So I ended up using OAuth2 for the authentication process. I also found that my goal, to fetch unread email count, could also be achieved using Gmail API afterwards. To implement it, I wrote a script in bash.



Here's what the script does in summary:




  • Create credentials for a client with access to the Gmail API and necessary scopes set.



  • Use those credentials to generate an authorization code for the user's account.




    During this, the terminal opens a user consent webpage which asks the user if he/she authorizes the client or not. Once authorized, the OAuth2 authorization code is sent to localhost at the specified port(I used 5000) which is then caught by the TCP listener, which the script runs in background temporarily, and stored.




  • Once the authorization code is stored, generate the API access token and store it somewhere for use.



  • Make curl requests like this to access the API:



    curl -H "Authorization: Bearer <the access token>" <the request>



Here are the relevant links:





  • Gmail Unread Mail Counter Script: This script uses the refresh token stored in a file to access the API through a new access token generated using the refresh token.


  • OAuth Access Token Generator Script: This generates an access token and refresh token and stores them in a file locally.

  • Their Documentation






share|improve this answer



















  • 1





    Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

    – Pimp Juice IT
    Jan 26 at 15:30











  • @PimpJuiceIT Thanks!

    – Utkarsh Verma
    Jan 26 at 17:22














2












2








2







After several tries, it seemed to me that Gmail has dropped support for basic IMAP login as it is "less secure". So I ended up using OAuth2 for the authentication process. I also found that my goal, to fetch unread email count, could also be achieved using Gmail API afterwards. To implement it, I wrote a script in bash.



Here's what the script does in summary:




  • Create credentials for a client with access to the Gmail API and necessary scopes set.



  • Use those credentials to generate an authorization code for the user's account.




    During this, the terminal opens a user consent webpage which asks the user if he/she authorizes the client or not. Once authorized, the OAuth2 authorization code is sent to localhost at the specified port(I used 5000) which is then caught by the TCP listener, which the script runs in background temporarily, and stored.




  • Once the authorization code is stored, generate the API access token and store it somewhere for use.



  • Make curl requests like this to access the API:



    curl -H "Authorization: Bearer <the access token>" <the request>



Here are the relevant links:





  • Gmail Unread Mail Counter Script: This script uses the refresh token stored in a file to access the API through a new access token generated using the refresh token.


  • OAuth Access Token Generator Script: This generates an access token and refresh token and stores them in a file locally.

  • Their Documentation






share|improve this answer













After several tries, it seemed to me that Gmail has dropped support for basic IMAP login as it is "less secure". So I ended up using OAuth2 for the authentication process. I also found that my goal, to fetch unread email count, could also be achieved using Gmail API afterwards. To implement it, I wrote a script in bash.



Here's what the script does in summary:




  • Create credentials for a client with access to the Gmail API and necessary scopes set.



  • Use those credentials to generate an authorization code for the user's account.




    During this, the terminal opens a user consent webpage which asks the user if he/she authorizes the client or not. Once authorized, the OAuth2 authorization code is sent to localhost at the specified port(I used 5000) which is then caught by the TCP listener, which the script runs in background temporarily, and stored.




  • Once the authorization code is stored, generate the API access token and store it somewhere for use.



  • Make curl requests like this to access the API:



    curl -H "Authorization: Bearer <the access token>" <the request>



Here are the relevant links:





  • Gmail Unread Mail Counter Script: This script uses the refresh token stored in a file to access the API through a new access token generated using the refresh token.


  • OAuth Access Token Generator Script: This generates an access token and refresh token and stores them in a file locally.

  • Their Documentation







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 26 at 15:16









Utkarsh VermaUtkarsh Verma

365




365








  • 1





    Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

    – Pimp Juice IT
    Jan 26 at 15:30











  • @PimpJuiceIT Thanks!

    – Utkarsh Verma
    Jan 26 at 17:22














  • 1





    Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

    – Pimp Juice IT
    Jan 26 at 15:30











  • @PimpJuiceIT Thanks!

    – Utkarsh Verma
    Jan 26 at 17:22








1




1





Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

– Pimp Juice IT
Jan 26 at 15:30





Now this is the way you are supposed to write an answer and keep it clear and concise and with clear links plus the nice formatting as well. Nice answer!! Keep up the good work!! +1

– Pimp Juice IT
Jan 26 at 15:30













@PimpJuiceIT Thanks!

– Utkarsh Verma
Jan 26 at 17:22





@PimpJuiceIT Thanks!

– Utkarsh Verma
Jan 26 at 17:22













0














Works for me. Make sure to Let less secure apps access your account though since otherwise plain login (user + password) might not work.






share|improve this answer
























  • Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

    – Utkarsh Verma
    Jan 19 at 9:21













  • @UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

    – Steffen Ullrich
    Jan 19 at 9:51













  • That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

    – Utkarsh Verma
    Jan 19 at 9:57
















0














Works for me. Make sure to Let less secure apps access your account though since otherwise plain login (user + password) might not work.






share|improve this answer
























  • Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

    – Utkarsh Verma
    Jan 19 at 9:21













  • @UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

    – Steffen Ullrich
    Jan 19 at 9:51













  • That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

    – Utkarsh Verma
    Jan 19 at 9:57














0












0








0







Works for me. Make sure to Let less secure apps access your account though since otherwise plain login (user + password) might not work.






share|improve this answer













Works for me. Make sure to Let less secure apps access your account though since otherwise plain login (user + password) might not work.







share|improve this answer












share|improve this answer



share|improve this answer










answered Jan 19 at 9:18









Steffen UllrichSteffen Ullrich

3,093714




3,093714













  • Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

    – Utkarsh Verma
    Jan 19 at 9:21













  • @UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

    – Steffen Ullrich
    Jan 19 at 9:51













  • That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

    – Utkarsh Verma
    Jan 19 at 9:57



















  • Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

    – Utkarsh Verma
    Jan 19 at 9:21













  • @UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

    – Steffen Ullrich
    Jan 19 at 9:51













  • That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

    – Utkarsh Verma
    Jan 19 at 9:57

















Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

– Utkarsh Verma
Jan 19 at 9:21







Isn't there some way to make this approach more secure instead of making my account more vulnerable by allowing access to less secure apps? Saying this because I don't have a GSuite account and hence can't enable less secure apps to log in.

– Utkarsh Verma
Jan 19 at 9:21















@UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

– Steffen Ullrich
Jan 19 at 9:51







@UtkarshVerma: sure, you can use the more secure authentication method: SASL XOAUTH2. But this means that you will not be able to just use login user pass in IMAP but that the process is more complex (and more secure). See the documentation for details. You might also use application specific passwords.

– Steffen Ullrich
Jan 19 at 9:51















That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

– Utkarsh Verma
Jan 19 at 9:57





That's what I was looking for. I don't mind complexity since it gives me the opportunity to get to know more. I'll go over it and post my updates here once done.

– Utkarsh Verma
Jan 19 at 9:57


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1396025%2fimap-login-to-gmail-server-via-cli-fails%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕