Results 1 to 8 of 8

Thread: email login timeout in 20mins?

  1. #1
    Join Date
    Jun 2011
    Posts
    10

    Default email login timeout in 20mins?

    I use the inbound-channel-adapter(spring-integration-2.0) to get emails, when I start a pop3 email receiver for about 20 mins then it throws IllegalStateException because of http440, login timeout. My OS is windowsXP, and the mailbox server is Microsoft Exchange.How can I solve this issue? Thank you.

  2. #2
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    Could you please post your configuration?
    Also, could you please upgrade to 2.0.4. Tere were a lot of fixes and improvements done to the mail module and before addressing it let's establish the base.

  3. #3
    Join Date
    Jun 2011
    Posts
    10

    Default

    Thanks, here is the configuration, I will upgrade to 2.0.4.

    <si:channel id="emailChannel" />
    <int-mail:inbound-channel-adapter
    should-delete-messages="true" channel="emailChannel" store-uri="${email.uri}"
    java-mail-properties="javaMailProperties">
    <sioller fixed-rate="${email.pooltime}"></sioller>
    </int-mail:inbound-channel-adapter>
    <utilroperties id="javaMailProperties">
    <prop key="mail.pop3.ssl.enable">true</prop>
    </utilroperties>

  4. #4
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    I would also suggest to look at our mail sample http://git.springsource.org/spring-i...ter/basic/mail
    It has both IDLE and POP3 sample
    Let us know

  5. #5
    Join Date
    Jun 2011
    Posts
    10

    Default

    Thanks, but I still get the same error in 20mins after starting the application.

    I upgrade spring integration to 2.0.4 and here is the configuration
    <si:channel id="emailChannel" />
    <int-mail:inbound-channel-adapter
    should-delete-messages="true" channel="emailChannel" store-uri="${email.uri}"
    java-mail-properties="javaMailProperties">
    <si:poller fixed-rate="20000"></si:poller>
    </int-mail:inbound-channel-adapter>
    <util:properties id="javaMailProperties">
    <prop key="mail.pop3.ssl.enable">true</prop>
    <prop key="mail.pop3.socketFactory.fallback">false</prop>
    <prop key="mail.debug">true</prop>
    <prop key="mail.pop3.port">995</prop>
    <prop key="mail.pop3.socketFactory.class">javax.net.ssl. SSLSocketFactory</prop>
    <prop key="mail.pop3.socketFactory.port">995</prop>
    </util:properties>

  6. #6
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    I don't have access to the exchange server so its hard for me to test and even if I did, i would have to make sure that it is configured the same way as yours.
    But from your description it appears as you can't even log on and I wonder why. Have you talked to your exchange administrators to see if they see anything on their end?
    Also, have you tried to just simply write a Java code using Java Mail API directly (outside of Spring Integration)? If you had a working code than we'd be able to identify the problem.
    I see you have mail.debug set to true. Anything strange in the mail logs?
    As I said, the best thing would be if you had a plain working Java Mail code.
    Let me know

  7. #7
    Join Date
    Jun 2011
    Posts
    10

    Default

    Sorry, I didn't mean that the inbound-channel-adapter doesn't work for exchange server. it works very well in the beginning. I can get emails in the Message object's payload in the first 20mins. But after that it starts throwing exceptions. It seems the session is expired after 20mins. But I don't know whether I can restart the inbound-channel-adapter programmatically after it crashes.

  8. #8
    Join Date
    Jan 2008
    Location
    Mohnton, PA USA (that's near Philadelphia)
    Posts
    2,148

    Default

    I see. Could you please open JIRA issue explaining everything and attaching this forum and also if there is any stack trace please attach that as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •