🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.privacy.anon-server
Article #209249

Re: JBN (PANTA mod) not performing SMTP authentication

#209249
From: Cyberiade.it Anonymous Remailer
Date: Fri, 25 Aug 2006 22:20
168 lines
7114 bytes
On 25 Aug 2006, bd <anon@comments.header> wrote:
>On 24 Aug 2006 23:06:18 -0000, Anonymous <BigappleRemailer@bigapple.yi.org>
>wrote:
>
>>>> I'm trying to use JBN214 (PANTA mod), STunnel and TOR to send mail via
>>>> Gmail and it's not authenticating the SMTP session.  I've selected
>>>> 'Perform SMTP Authentication' in the Panta Mod window and set the send
>>>> profile names correctly so that they match.  Anyone got any ideas
>>>> about this? 
>>>> 
>>>> Here's the SMTP conversation captured at localhost before it hits
>>>> STunnel and TOR:
>>>> 
>>>> 220 mx.gmail.com ESMTP l38sm4168456nfc
>>>> EHLO 127.0.0.1
>>>> 250-mx.gmail.com at your service, [REMOVED (TOR IP)]
>>>> 250-SIZE 20971520
>>>> 250-8BITMIME
>>>> 250-AUTH LOGIN PLAIN
>>>> 250 ENHANCEDSTATUSCODES
>>>> RSET
>>>> 250 2.1.0 Flushed l38sm4168456nfc
>>>> MAIL FROM:<REMOVED>
>>>> 530 5.5.1 Authentication Required l38sm4168456nfc
>>>> QUIT
>>>> 
>>
>>I just wish I knew *why* JBN wasn't doing the auth - The SMTP responses
>>looks pretty much standard to me

>
>I suggest checking the version of csmtp32.ocx that you have in your
>system32 directory. The version that ships in setup_jbn214.exe is
>3.10.0.3145. Unfortunately, this version only recognises the old style
>advertisement of available auth methods for SMTP servers while gmail
>appears to advertise only the RFC style.
>
>old-style: AUTH=method1 method2 ...
>RFC style: AUTH method1 method2
>
>See http://mail.python.org/pipermail/patches/2002-September/009711.html for
>further information about this.
>
>Panta has a more recent version (3.60.0.3650) of cstmp available for
>download on his website at:
>
>http://www.panta-rhei.eu.org/downloads/Misc/v3.6%20csmtp.rar
>
>This version of the library supports the RFC style advertisement. I know
>that because it solved the same problem for me when using cotse's smtp
>server back in Feb 2005. Panta said to me then that he was going to include
>the new version of csmtp in his mod so that it would be updated when the
>mod was installed. I didn't see it in JBN2-mod-2005-08-17.zip so he either
>had second thoughts or forgot about this.
>
>If this works for you, can you point me in the direction of information on
>setting up stunnel and tor to send mail via gmail? I tried this once before
>a long time ago and couldn't get it to work then i.e. stunnel couldn't
>negotiate a connection to gmail for me.
>
>Thanks,
>bd

Bingo!  That solved it.  Thank you.

To set up STunnel to connect to Gmail, I did this:

Put a copy of openssl in the stunnel directory

(Get a Windows binary here: http://www.slproweb.com/products/Win32OpenSSL.html )

At a command prompt in that directory type: "openssl rand -out rand.bin 2048"

You should see: "Loading 'screen' into random state - done"

This next step connects to Gmail in the clear and not via TOR, you may wish
to set up openssl to run via SOCKScap/TOR before you do this.  I didn't.

Then type: "openssl s_client -connect smtp.gmail.com:465 -showcerts -prexit > gmail.pem"

Edit the resulting gmail.pem file to remove everything except:

-----BEGIN CERTIFICATE-----
MIIDVjCCAr+gAwIBAgIDP97OMA0GCSqGSIb3DQEBBAUAMIHOMQswCQYDVQQGEwJa
QTEVMBMGA1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xHTAb
BgNVBAoTFFRoYXd0ZSBDb25zdWx0aW5nIGNjMSgwJgYDVQQLEx9DZXJ0aWZpY2F0
aW9uIFNlcnZpY2VzIERpdmlzaW9uMSEwHwYDVQQDExhUaGF3dGUgUHJlbWl1bSBT
ZXJ2ZXIgQ0ExKDAmBgkqhkiG9w0BCQEWGXByZW1pdW0tc2VydmVyQHRoYXd0ZS5j
b20wHhcNMDUwOTA1MDg1OTAyWhcNMDYwOTA1MDg1OTAyWjBoMQswCQYDVQQGEwJV
UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzET
MBEGA1UEChMKR29vZ2xlIEluYzEXMBUGA1UEAxMOc210cC5nbWFpbC5jb20wgZ8w
DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAMm+APV2IPBnnqOb5w15LPrpNaCfIDZm
3Z41dg/rmhs7szXCx5oWvW6idYerguXQuw1B0XWKbYLJ9Lbz/kX2k9NpyeNmz0J7
[...]
Qumc3IhN67fNinoOoMa+/KZAYaoBPI8n6t/JR1/q30/rCZ64xKfnqYRf
-----END CERTIFICATE-----

That's the certificate I got from Gmail, so if you're the trusting sort you
could just copy/paste that into a new file named 'gmail.pem'

(You should probably verify that the cert you get is actually from Gmail,
but I don't know how to do this properly.)

Add/replace the following entries in stunnel.conf:

socket = l:TCP_NODELAY=1
socket = r:TCP_NODELAY=1

options = all

CAfile = gmail.pem

RNDbytes = 2048
RNDfile = rand.bin
RNDoverwrite = yes

client = yes

; Service-level configuration
[gmail_tls_smtp]
accept = 4650
connect = smtp.gmail.com:465
delay = no

[gmail_tls_pop3]
accept = 9950
connect = pop.gmail.com:995
delay = no


That's STunnel done, now for piping it into TOR.  You'll need a copy of SOCKScap for this.

http://www.socks.permeo.com/Download/SocksCapDownload/index.asp

Once it's installed, run it and select File -> New

Browse to stunnel.exe and select/open it, and then hit OK

Go to File -> Settings.  On the SOCKS settings page enter 127.0.0.1 as the
server and 9050 as the port (assuming that you have TOR running on the
default port).  Also select 'SOCKS Version 5' and 'Resolve all names
remotely'.  On the 'Direct Connections' tab, click Add under Direct
Connections and add localhost/127.0.0.1/your-machine's-IP. Not sure if this
is needed, but I have all three and it works for me.

Drag the STunnel icon from the SOCKScap window onto your desktop.


And that's about it...  I think.


Start 'STunnel + SocksCap' from the desktop icon you just created (or
select 'Run Socksified' from within SOCKScap).

Point your mail client at localhost:4650 for SMTP and
localhost.gmail.com:9950 and it should work.

If you want to see whether the connection is working, add 'debug = 7' to
your stunnel.conf.  You'll then be able to see the status in the STunnel
log window/file.

HTH, and Good Luck.

-=- Sorry if this ends up being double-posted but
-=- it hadn't shown after more than eight hours  so
-=- I reposted .  Maybe I'm impatient, but messages
-=- posted later than that have shown already
Technical Details
Message-ID: <9ba5d93eb3adb4b3c15abb9b7e200c92@remailer.cyberiade.it>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!news-out.newsgroups.com!propagator4-sterling.newsfeeds.com!news-in1.newsgroups.com!news2.arglkargh.de!news.dizum.com!sewer-output!mail2news
References: <EEGA8X8038953.4406134259@anonymous> <Xns98297EE4F7336thirdtreerootmiddlee@127.0.0.1> <RM5GAZC338953.7960416667@anonymous> <9Z1A8KWL38954.3937615741@twistycreek.com>

Show Full Headers
Complete Article Headers
Message-ID: <9ba5d93eb3adb4b3c15abb9b7e200c92@remailer.cyberiade.it>
Subject: Re: JBN (PANTA mod) not performing SMTP authentication
Date: Fri, 25 Aug 2006 22:20:25 +0000
From: Cyberiade.it Anonymous Remailer <anonymous@remailer.cyberiade.it>
References: <EEGA8X8038953.4406134259@anonymous> <Xns98297EE4F7336thirdtreerootmiddlee@127.0.0.1> <RM5GAZC338953.7960416667@anonymous> <9Z1A8KWL38954.3937615741@twistycreek.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.privacy.anon-server.20141023.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshub.sdsu.edu!elnk-nf2-pas!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!shaw.ca!news-out.newsgroups.com!propagator4-sterling.newsfeeds.com!news-in1.newsgroups.com!news2.arglkargh.de!news.dizum.com!sewer-output!mail2news
Lines: 179
Organization: mail2news@dizum.com
Newsgroups: alt.privacy.anon-server
Mail-To-News-Contact: abuse@dizum.com