Re: mozilla-mail damage [was Re: [PATCH] Update toDocumentation/ramdisk.txt - take 2]

From: Paul Jackson
Date: Sat Oct 23 2004 - 02:44:32 EST


> However, sendpatchset doesn't work with SMTP authentication, which my ISP uses,

The underlying Python smtplib module has authentication support.

You could probably hack your private copy of sendpatchset by adding
something like the following line with hardcoded strings to call the
python smtp login() method with your ISP user id and password:


try:
s=smtplib.SMTP(smtpserver)
except:
print "%s: Oops - Cant connect to SMTP Server <%s>" % (cmd, smtpserver)
sys.exit(1)

s.set_debuglevel(0)
+ s.login("james4765@xxxxxxxxxxx", "my_not_so_secret_password")
if not actually_send_message:


The above change is untested speculation - good luck.

A proper solution might involve adding an optional user login id string
to the sendpatchset control file entry for the SMTP server:

SMTP: <smtp_server_ipaddr> [<authenticated_smtp_user_login_id>]

and if this extra field was present, interactively collecting the
password during use and making the above "s.login()" call.

You'd want to somehow avoid collecting the password more than once per
sendpatchset session. Since the current code reconnects many times
to the smtp server (twice per patch. first to verify and then to
actually send the message), either rearrange the smtp connection
handling in the current code to reuse a single connection, or collect
the password once and remember it in a python variable to use for each
reconnect during an entire sendpatchset session.

Since I don't happen to need this, I'm at little risk for adding this
anytime soon. If someone else wants to send me a nice pretty solution,
I'd update my master copy if I found the solution to my liking.

--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@xxxxxxx> 1.650.933.1373
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/