Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: HowTo: make XSane and Gmail play nice

  1. #11
    Join Date
    Dec 2005
    Beans
    89

    Re: HowTo: make XSane and Gmail play nice

    Could be an xinetd bug then.

    Since writing this howto I've jumped ship from Ubuntu, but I've just this minute tested it all again in Debian Squeeze and it all still works fine for me. If you figure out what's breaking it for you, I'd be interested to hear about it.

  2. #12
    Join Date
    Dec 2005
    Beans
    89

    Re: HowTo: make XSane and Gmail play nice

    Just out of interest: what output do you get from the following commands?
    Code:
    openssl version
    sudo xinetd -version
    On Squeeze, I'm currently seeing
    Code:
    stephen@jellyfish:~$ openssl version
    OpenSSL 0.9.8o 01 Jun 2010
    stephen@jellyfish:~$ sudo xinetd -version
    xinetd Version 2.3.14 libwrap loadavg
    stephen@jellyfish:~$

  3. #13
    Join Date
    Aug 2005
    Location
    Ontario, Canada
    Beans
    93

    Re: HowTo: make XSane and Gmail play nice

    Quote Originally Posted by flabdablet View Post
    Just out of interest: what output do you get from the following commands?
    Code:
    openssl version
    sudo xinetd -version
    I get the following:
    Code:
    OpenSSL 0.9.8k 25 Mar 2009
    xinetd Version 2.3.14 libwrap loadavg

  4. #14
    Join Date
    Oct 2008
    Beans
    28

    Re: HowTo: make XSane and Gmail play nice

    After I upgraded to 10.10 (not 100% sure) the OpenSSL process is using 100% cpu at boot.

    Code:
    root      1638 97.5  0.0   4296  2012 ?        R    14:44   4:20 /usr/bin/openssl s_client -connect smtp.gmail.com 465 -quiet
    Any tips?

  5. #15
    Join Date
    Dec 2005
    Beans
    89

    Re: HowTo: make XSane and Gmail play nice

    abandonow, what does
    Code:
    openssl version
    show for you?

    If Ubuntu is still using something earlier than the 0.9.8o version that's currently working fine for me in Debian Squeeze, you might want to try installing a more up to date Debian package into your Ubuntu. Just download the .deb and install it with gdebi or dpkg -i; if it breaks things, uninstalling and reinstalling openssl using synaptic or aptitude should get you your original Ubuntu version back.

  6. #16
    Join Date
    Apr 2008
    Beans
    4

    Re: HowTo: make XSane and Gmail play nice

    I had the problem and it was related to openssl hanging due to a lack of entropy on the system causing openssl to block while waiting for more to be generated. There was no particularly obvious reason it used 100% cpu while doing it though!

    You can check available entropy by cat'ing /proc/sys/kernel/random/entropy_avail (which will itself use some entropy due to the way cat will is spawned so don't do it often - in a script for example; if you want to monitor it use somehting else like munin for example). if you have < 150 bytes of entropy all the time its likely openssl will be blocking.

    You can use audio entropy video entropy and timer entropy daemons (google them) to generate more entropy on a system or use the elegant hardware solution from simtec http://www.entropykey.co.uk/.

    Hope this helps!

  7. #17
    Join Date
    Dec 2005
    Beans
    89

    Re: HowTo: make XSane and Gmail play nice

    Something else people experiencing the hang problem might care to try is including the -bugs and/or -no_ticket options in the openssl s_client command line inside /usr/bin/gmail-smtp. I don't know if these will make any difference but I have seen a couple of other ssl hangs talked about in various fora where they did. For what it's worth, gmail-smtp works fine for me both with and without these options.

  8. #18
    Join Date
    May 2012
    Beans
    1

    Unhappy Re: HowTo: make XSane and Gmail play nice

    Hi,


    I have this mostly working under FreeBSD, yeah, I know it is not ubuntu, or even linux.


    I want to scan documents and email to my msu email account. I created a version of
    the program and setup the inet server correctly. I have added the wrapper to the inet.conf
    and /etc/services files so that when I type "telnet localhost 10025" I get connected to the
    campus email server .I have entered my correct email info into xsane/setup and when I try to send a scanned doc, I get a response from the server "ASMTP authentication failed".


    The file I created is /usr/local/bin/msu-smtp, it is executable and has the following lines.
    #!/bin/sh
    openssl s_client -connect mail.msu.edu:465 -quiet 2>/dev/null



    I can manually connect using the base64 version of my username and password to get into the
    mail server and send myself an email message.


    When I try the same thing in xsane, I get the "ASMTP authentication failed" message.


    I use the same username and password.


    Do you have any suggestions ?


    Thank you,


    Barry

  9. #19
    Join Date
    Dec 2005
    Beans
    89

    Re: HowTo: make XSane and Gmail play nice

    If that were my system, I'd try the following:

    1. Try both "ASMTP Plain" and "ASMTP Login" options in XSane's setup window. I would not expect to have to base64-encode the credentials I gave to XSane; I would expect XSane itself to do that if necessary.

    2. Modify msu-smtp so it logs all input and all output using something like
    Code:
    log=/tmp/msu-smtp-$$.log
    tee -a $log | openssl s_client -connect mail.msu.edu:465 -quiet 2>/dev/null | tee -a $log
    and look for differences between what XSane is doing and what works by hand.

    3. Set up a proper mail client (Thunderbird?) to connect successfully to my email account, then modify its settings to make it go via localhost:10025 with no encryption rather than going directly to mail.msu.edu:465 with encryption; verify that it can still send mails; then look for differences between what gets logged for it and what gets logged for XSane.

    If it turned out not to be possible to make XSane handle the auth procedure required by the mail server, I'd figure out how to make msu-smtp munge the auth stuff on the way through, perhaps to the extent of having msu-smtp handle it fully internally so that XSane could just use plain SMTP.

    I'd be interested to hear how you get on.

  10. #20
    Join Date
    Jun 2007
    Location
    Paraparaumu, New Zealand
    Beans
    Hidden!

    Re: HowTo: make XSane and Gmail play nice

    Thread closed, necromancy.
    Forum DOs and DON'Ts
    Please use CODE tags
    Including your email address in a post is not recommended
    My Blog

Page 2 of 2 FirstFirst 12

Tags for this Thread

Bookmarks

Posting Permissions

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