Gmail POP3 with openssl command line: hangs while RETR-ing

235

I had a similar problem when testing an SSL connection to GMail's SMTP server.

The AUTH and MAIL FROM commands worked fine but when I tried the RCPT TO the server returned the RENEGOTIATING response.

After searching for quite a bit I finally found a site that explained what was going on.

Apparently the uppercase R at the start of the command (RCPT TO for SMTP and RETR for POP3) causes the s_client tool to renegotiate with the server.

The man page for s_client has some info in the "CONNECTED COMMANDS" section.

I managed to get my SMTP test working by using lowercase commands (rcpt to). I've just tried a test with GMail's POP3 server and using retr 1 works well.

Share:
235

Related videos on Youtube

desicreatioNZ
Author by

desicreatioNZ

Updated on September 17, 2022

Comments

  • desicreatioNZ
    desicreatioNZ over 1 year

    I am using this to display profile picture on every page on the system but only works with few pages.

    <g:if test="${userAccount?.photo != null  && !(userAccount?.photo.empty)}" >
          <g:link controller="userAccount" action="myInfo" id="${userAccount.id}">
            <img id="profile_photo" src="${createLink(controller:'image', action:'profilePhoto', id:userAccount.photo, params:[maxWidth:190.0,maxHeight:190.0])}" alt="${userAccount.photo}" title="${userAccount.displayName()}" />
          </g:link>
        </g:if>
        <g:else>
          <g:link controller="userAccount" action="myInfo" id="${userAccount.id}">
            <img id="profile_photo" src="${resource(dir:'images', file:'no_image_blue.gif')}" alt="No Image" width="200" height="200"/>
          </g:link>  
        </g:else>
    

    I am also using 2 layouts and Spring security plugin for this project. Could anyone please help me out here to make an image gets displayed on entire system.

    **

    I simply need to know how can i store users Photo varaible to session so i can access it anywhere in the application.

    **

  • Admin
    Admin over 13 years
    Thanks that helped me a lot Kevin. the retr worked (lower case was correct!)
  • desicreatioNZ
    desicreatioNZ over 11 years
    I am already doing.. Its not passing my userAccount params(vars) to places where i use custom layouts instead session user details are available but photo is linked with userAccount not sessionUser.
  • coderLMN
    coderLMN over 11 years
    If your problem is about image width and height, move params:[maxWidth:190.0,maxHeight:190.0] out of createLink tag and put it as part of <img> tag, like: <img .... style="maxWidth:190px;maxHeight:190px;">
  • desicreatioNZ
    desicreatioNZ over 11 years
    Thanks but my problem is displaying dynamic image of sessions user across the entire application at the moment it is displaying only on 1 page and that is profile user page.
  • desicreatioNZ
    desicreatioNZ over 11 years
    "photo" variable of UserAccount is not available on everyother page on the system I dnt know how to access it really but session user is available but it doesn't have photo property linked to it. Do i need to write a new action or function for displaying profile image across the system? or do i need some sort of syntex to make the userAccount or user Instance available?
  • desicreatioNZ
    desicreatioNZ over 11 years
    at the moment my profile image action is something like this: def profilePhoto = { response.setContentType('image/jpeg') response.setHeader('Cache-control', 'no-cache') def userId = session.selectedUser.id if(params.userId){ userId = params.userId } if(params?.id != null && !(params?.id.empty)){ params.maxWidth?: 190.00 params.maxHeight?: 190.00 response.outputStream << imageProxyService.loadThumbnailImage(params.id, securityService.passwordEncoder(userId.toString())) } }
  • coderLMN
    coderLMN over 11 years
    userAccount should be passed from all other controller actions to the views, otherwise all the reference to it in the layout gsp won't work. Do you use some security framework like spring security? If it is the case you can use its helper tags. Or just put it in session or cookies.
  • desicreatioNZ
    desicreatioNZ over 11 years
    Yes I do use spring security.. could you please give me an example how to go by? I have page import script on every page but i guess I will have to add the photo property to session or use helper tags as you adviced... but not sure how to do so...
  • coderLMN
    coderLMN over 11 years
    you can use something like <g:set var="photo" value="${sec.loggedInUserInfo([field:'photo'])}"/> to get your currentUser's properties. I'll update my answer later.
  • desicreatioNZ
    desicreatioNZ over 11 years
    Thanks I am fairly close to solve this problem as based on your advice I am starting to get this '<img id="profile_photo" src="/IwiOra/image/profilePhoto?maxWidth=190.0&maxHeight=190‌​.0" alt=""/>'
  • desicreatioNZ
    desicreatioNZ over 11 years
    Jinzhao- When setting photo <g:set var="photo" value="${sec.loggedInUserInfo([field:'photo'])}"/> gives me an error of null value. I simply need to know how can i store users Photo varaible to session so i can access it anywhere in the application.
  • coderLMN
    coderLMN over 11 years
    Do you have a photo property defined in your User domain? Post your User class definition please.
  • desicreatioNZ
    desicreatioNZ over 11 years
    Yes I have photo property in User domain. Its just that I need to save or store value from userAccount.photo to session properties then I can access users photo property anywhere on the system.
  • coderLMN
    coderLMN over 11 years
    If you put my code in layout, you already have it in all your gsp views, but if you really want to do that, you can follow stackoverflow.com/questions/13757368/… to put photo property into session after a user login.
  • desicreatioNZ
    desicreatioNZ over 11 years
    If I do it your way It gives me an error message because userAccount is only accessible to main page. for instance: I have two views inner and profile and photo template which lies at the base of the view. so from homepage/home(uses inner layout) I call photo template and it works but if i use profile layout instead it doesn't work because it cannot locate userAccount and its properties. I have no idea whats going on here. I am new to advanced grails and someone else wrote most of this program for me.
  • desicreatioNZ
    desicreatioNZ over 11 years
    I believe I am using the same code but removed few unrelated things. but still I will check it again to make sure and get back to you. by the way could you show me a syntex which stores the value of a variable.
  • desicreatioNZ
    desicreatioNZ over 11 years
    I have checked it and despite using the same code on both layouts its not working on one layout.. probably non-working layout has been used in different pages. I think I should go with session way of doing it. so could you suggest me how to store user info into sessions. Thanks
  • coderLMN
    coderLMN over 11 years