PyMailt

0 views
Skip to first unread message

Vishal

unread,
May 6, 2008, 12:55:37 PM5/6/08
to py-transports
Hi Norman

Am trying to get PyMailt working. I initiate mail.py and get the
following error:

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\PyMailt>mail.py
Invalid debugflag given: always
Invalid debugflag given: nodebuilder
DEBUG:
DEBUG: Debug created for C:\PyMailt\xmpp\client.py
DEBUG: flags defined: always,nodebuilder
Traceback (most recent call last):
File "C:\PyMailt\mail.py", line 241, in ?
transport = Transport(connection)
File "C:\PyMailt\mail.py", line 21, in __init__
self.watchdir = self.watchdir.replace('~', os.environ['HOME'])
File "C:\Python23\Lib\os.py", line 417, in __getitem__
return self.data[key.upper()]
KeyError: 'HOME'

C:\PyMailt>

Kindly let me know

Thanks
Vishal

Norman Rasmussen

unread,
May 7, 2008, 5:29:33 AM5/7/08
to py-tra...@googlegroups.com
On Tue, May 6, 2008 at 6:55 PM, Vishal <sms...@gmail.com> wrote:
> Am trying to get PyMailt working. I initiate mail.py and get the
> following error:
> KeyError: 'HOME'

You need to set the watchDir in the config to the location of the mail
drop folder. I'm not sure which server you're using on windows, but
I'd guess that you might be able to point it to \inetpub\smtproot\drop
(or whatever that folder is called). PyMailt _requires_ the use of a
mail server that drops one-file-per-message into a dedicated folder.
(like the *nix maildir format, or I _think_ iis's drop folder)

--
- Norman Rasmussen
- Email: nor...@rasmussen.co.za
- Home page: http://norman.rasmussen.co.za/

Vishal

unread,
May 7, 2008, 7:51:59 AM5/7/08
to py-transports
Hi Norman

Thanks for your reply. Got a windows 2003 server. the drop folder on
this server comes to c:\Inetpub\mailroot\Drop. have put that in the
watchDir

That error is resolved..domain.com and mail.domain.com are poiting to
the same IP and on this IP jabber sever is hosted.

now getting the following:

C:\PyMailt>mail.py
Invalid debugflag given: always
Invalid debugflag given: nodebuilder
DEBUG:
DEBUG: Debug created for C:\PyMailt\xmpp\client.py
DEBUG: flags defined: always,nodebuilder
DEBUG: socket start Plugging <xmpp.transports.TCPsocket instance
at 0x00C2
F6C0> into <xmpp.client.Component instance at 0x00C2F288>
DEBUG: socket start Successfully connected to remote host
('domain.com',
'5347')
DEBUG: dispatcher start Plugging <xmpp.dispatcher.Dispatcher
instance at 0x00C
2F698> into <xmpp.client.Component instance at 0x00C2F288>
DEBUG: dispatcher info Registering namespace "unknown"
DEBUG: dispatcher info Registering protocol "unknown" as
xmpp.protocol.Protoc
ol(unknown)
DEBUG: dispatcher info Registering protocol "default" as
xmpp.protocol.Protoc
ol(unknown)
DEBUG: dispatcher info Registering namespace "http://
etherx.jabber.org/stream
s"
DEBUG: dispatcher info Registering protocol "unknown" as
xmpp.protocol.Protoc
ol(http://etherx.jabber.org/streams)
DEBUG: dispatcher info Registering protocol "default" as
xmpp.protocol.Protoc
ol(http://etherx.jabber.org/streams)
DEBUG: dispatcher info Registering namespace
"jabber:component:accept"
DEBUG: dispatcher info Registering protocol "unknown" as
xmpp.protocol.Protoc
ol(jabber:component:accept)
DEBUG: dispatcher info Registering protocol "default" as
xmpp.protocol.Protoc
ol(jabber:component:accept)
DEBUG: dispatcher info Registering protocol "iq" as
xmpp.protocol.Iq(jabber:c
omponent:accept)
DEBUG: dispatcher info Registering protocol "presence" as
xmpp.protocol.Prese
nce(jabber:component:accept)
DEBUG: dispatcher info Registering protocol "message" as
xmpp.protocol.Messag
e(jabber:component:accept)
DEBUG: dispatcher info Registering handler <bound method
Dispatcher.streamErr
orHandler of <xmpp.dispatcher.Dispatcher instance at 0x00C2F698>> for
"error" ty
pe-> ns->(http://etherx.jabber.org/streams)
DEBUG: dispatcher warn Registering protocol "error" as
xmpp.protocol.Protocol
(http://etherx.jabber.org/streams)
DEBUG: socket sent <?xml version='1.0'?>
<stream:stream xmlns="jabber:component:accept" to="mail.domain.com"
version="1.0"
xmlns:stream="http://etherx.jabber.org/streams" >
DEBUG: socket got <host-unknown/>
Traceback (most recent call last):
File "C:\PyMailt\mail.py", line 242, in ?
if not transport.xmpp_connect():
File "C:\PyMailt\mail.py", line 174, in xmpp_connect
connected = self.jabber.connect((config.mainServer,config.port))
File "C:\PyMailt\xmpp\client.py", line 280, in connect
CommonClient.connect(self,server=server,proxy=proxy)
File "C:\PyMailt\xmpp\client.py", line 184, in connect
if not self.Process(1): return
File "C:\PyMailt\xmpp\dispatcher.py", line 122, in Process
self.Stream.Parse(data)
File "C:\PyMailt\xmpp\simplexml.py", line 343, in starttag
self.stream_header_received(ns, name, attrs)
File "C:\PyMailt\xmpp\dispatcher.py", line 104, in
_check_stream_start
raise ValueError('Incorrect stream start: (%s,%s). Terminating.'%
(tag,ns))
ValueError: Incorrect stream start: (host-unknown,). Terminating.

C:\PyMailt>

Kinldy let me know
Thanks
Vishal

Norman Rasmussen

unread,
May 7, 2008, 10:48:46 AM5/7/08
to py-tra...@googlegroups.com
On Wed, May 7, 2008 at 1:51 PM, Vishal <sms...@gmail.com> wrote:
Thanks for your reply. Got a windows 2003 server. the drop folder on
this server comes to c:\Inetpub\mailroot\Drop. have put that in the
watchDir
 
I can't remember how iis's smtp servers works, but as long as each incoming message is just dumped into a new file in this folder, it'll be fine.

That error is resolved..domain.com and mail.domain.com are poiting to
the same IP and on this IP jabber sever is hosted.
now getting the following:

ValueError: Incorrect stream start: (host-unknown,). Terminating.

you either need to tell jabberd2 about mail.domain.com, or tell pymailt to use componentBinding and saslUsername (use the same settings as you did for pyirct)

Vishal

unread,
May 16, 2008, 10:32:04 AM5/16/08
to py-transports
Hi Norman

Working perfectly fine. jabber users can send emails to email domains
and vice versa.

One thing wanted to confirm as I am not clear on this. Does PyMailT
offer an option to register? Does Pymailt require to register?I mean I
tried registing on the Mail Transport but didnt work out.

Thanks for your help on this.

Vishal

Norman Rasmussen

unread,
May 16, 2008, 11:11:05 AM5/16/08
to py-tra...@googlegroups.com
On Fri, May 16, 2008 at 4:32 PM, Vishal <sms...@gmail.com> wrote:
Working perfectly fine. jabber users can send emails to email domains
and vice versa.

awesome
 
One thing wanted to confirm as I am not clear on this. Does PyMailT
offer an option to register? Does Pymailt require to register?I mean I
tried registing on the Mail Transport but didnt work out.

Nope, no registration required.  This is meant to be a 'local-only' transport so there doesn't seem to be any point in registering.  (There is a plan to make it a publicly usable gateway too, but I haven't added that part yet - also it might attract spammers, so would require a lot of work to lock that down)

Vishal

unread,
May 16, 2008, 11:49:59 AM5/16/08
to py-transports
Hi Norman

Thanks for your time on this. Appreciate that.

Vishal
Reply all
Reply to author
Forward
0 new messages