%% This is an example on how to define an external service/transport: {5347, ejabberd_service, [{access, all}, {host, "icq.example.net", [{password, "secret"}]}]}, {5351, ejabberd_service, [{access, all}, {host, "msn.example.net", [{password, "secret"}]}]},
]}.
теперь pymsn-t
<pymsnt> <!-- This file contains options to be configured by the server administrator. --> <!-- Please read through all the options in this file -->
<!-- The JabberID of the transport --> <jid>msn.sibnsk.net</jid> <!-- The public IP or DNS name of the machine the transport is running on --> <!-- This is needed for file transfer!! --> <!--<host>xx.xx.xx.xx</host> --> <!-- The component JID of the transport. Unless you're doing clustering, leave this alone --> <!-- <compjid>msn1</compjid> --> <!-- The name of the transport in the service discovery list. --> <discoName>MSN Transport</discoName>
<!-- The location of the spool directory.. if relative, relative to the PyMSNt dir. Do not include the jid of the transport --> <spooldir>/var/spool/pymsn</spooldir> <!-- The location of the PID file, relative to the PyMSNt directory --> <pid>/var/run/pymsn/PyMSNt.pid</pid> <!-- If set, the transport will background itself when run --> <background/> <!-- The Twisted reactor to choose. Pick poll or epoll on Linux, kqueue on BSD. Or leave as default (best found) --> <!-- <reactor>poll</reactor> -->
<!-- The IP address of the main Jabber server to connect to --> <mainServer>xx.xx.xx.xx</mainServer> <!-- The TCP port to connect to the Jabber server on (this is the default for Jabberd2) --> <port>5351</port> <!-- The authentication token to use when connecting to the Jabber server --> <secret>secret</secret> <!-- Use Jabber.com's XCP component protocol extensions. --> <!-- <useXCP/> -->
<!-- The default language to use --> <lang>ru</lang> <!-- The website of the Jabber service --> <website>http://www.example.net</website>
<!-- Comment out the following options to disable them, or uncomment them to enable them --> <!-- Send email notification messages to users --> <mailNotifications/> <!-- Send greeting on login --> <!-- <sessionGreeting>You have just started a session with PyMSNt</sessionGreeting> --> <!--Send message on successful registration --> <registerMessage>Поздравляем с успешной регистрацией на транспорте MSN</registerMessage> <!-- Allow users to register with this transport --> <allowRegister/> <!-- Get all avatars. If this is set to true then avatars are grabbed for all your contacts immediately. If false then avatars are only grabbed when you're in a chat with a contact --> <getAllAvatars/> <!-- The amount of time a user has to join a groupchat they are invited to before the transport makes them leave the room. (MSN protocol requires autojoining of groupchats) --> <!-- <groupchatTimeout>120</groupchatTimeout> -->
<!-- File transfer settings --> <!-- The maximum size of a file transfer (in bytes). For unlimited, comment out, or set to 0 --> <!-- <ftSizeLimit>524288</ftSizeLimit> --> <!-- The maximum rate for file transfer (in bytes). For unlimited, comment out, or set to 0 --> <!--<ftRateLimit>2048</ftRateLimit> --> <!-- Please give the port to listen for Jabber socks5 transfers on. --> <!--<ftJabberPort>8010</ftJabberPort> --> <!-- Please give the port to listen for HTTP GETs here (Used in old-style OOB file transfers. Best to leave this disabled unless you know you need it.) --> <!--<ftOOBPort>8011</ftOOBPort>--> <!-- Please give the root URL the transport should send to clients. (You can use an Apache reverse proxy to put this on your ordinary website) --> <!-- Eg, the transport will listen on port 8011 for HTTP GETs to /RANDOM_FILE.ext. You can set apache to forward any requests to http://yourhost.com:80/msn/files/RANDOM_FILE.ext to http://yourhost.com:8011/RANDOM_FILE.ext. This saves you from opening extra ports. --> <!--<ftOOBRoot>http://host.com/msn/files/</ftOOBRoot>-->
<!-- You can choose which users you wish to have as administrators. These users can perform some tasks with Ad-Hoc commands that others cannot --> <admins> <jid>admin@example.net</jid> </admins>
<!-- Log settings -->
<!-- The logging level 0 -> No logging 1 -> Log tracebacks 2 -> Log tracebacks, warnings and errors 3 -> Log all sorts of informational (mostly useless stuff) 4 -> Log the MSN protocol code sent --> <!-- <debugLevel>0</debugLevel> -->
<!-- The file to log to. Leave this disabled for stdout --> <!-- <debugFile>debug.log</debugFile> -->
</pymsnt>
и еще pyicq
<pyicqt> <!-- The JabberID of the transport. --> <jid>icq.example.net</jid>
<!-- The component JID of the transport. Unless you're doing clustering, leave this alone --> <!-- <compjid>icq1</compjid> -->
<!-- The location of the spool directory.. if relative, relative to --> <!-- this directory. Do not include the jid of the transport. --> <spooldir>/var/spool/pyicq</spooldir>
<!-- The location of the PID file.. if relative, relative to this dir. --> <!-- Comment out if you do not want a pid file --> <pid>/var/run/pyicq/PyICQt.pid</pid>
<!-- The IP address of the main Jabberd server --> <mainServer>xx.xx.xx.xx</mainServer>
<!-- The JID of the main Jabber server --> <mainServerJID>/var/spool/pyicq/PyICQ.pid</mainServerJID>
<!-- The website of the Jabber service --> <website>http://www.example.net/</website>
<!-- The TCP port to connect to the Jabber server on --> <!-- (this is the default for Jabberd2) --> <port>5347</port>
<!-- The TCP port that the web admin interface will answer on --> <!-- (uncomment to enable) --> <!-- <webport>12345</webport> -->
<!-- The authentication token to use when connecting to the Jabber server --> <secret>nfylth,thl16vjpbkk</secret>
<!-- The default language to use (for error/status messages) --> <lang>ru</lang>
<!-- Default message encoding to use --> <encoding>windows-1251</encoding>
<!-- The hostname of the ICQ server you wish to connect to --> <icqServer>login.icq.com</icqServer>
<!-- The port of the ICQ server you wish to connect to --> <icqPort>5190</icqPort>
<!-- The name of Socks Proxy if connecting thru a proxy --> <!-- <socksProxyServer>im-proxy2</socksProxyServer> -->
<!-- The Socks Proxy port to use when connecting thru a proxy --> <!-- <socksProxyPort>1080</socksProxyPort> -->
<!-- Send greeting on login (enter text to be sent to users here) --> <!-- <sessionGreeting>enter message here</sessionGreeting> -->
<!-- Send message on successful registration --> <!-- <registerMessage>You have successfully registered with PyICQt</registerMessage> -->
<!-- Allow users of ICQ gateway to chat with AIM users --> <!-- (uncomment to enable) --> <!-- <crossChat/> -->
<!-- Disable registration with the transport --> <!-- (uncomment to disable) --> <!-- <disableRegister/> -->
<!-- Enable automatic invitation to reconnect on restart --> <!-- (uncomment to enable) --> <!-- <enableAutoInvite/> -->
<!-- Disable xhtml support (messages with fonts and colors) --> <!-- (uncomment to disable) --> <!-- <disableXHTML/> -->
<!-- Disable mail notifications --> <!-- (uncomment to disable) --> <!-- <disableMailNotifications/> -->
<!-- Disable use of default avatar if none is specified --> <!-- (uncomment to disable) --> <!-- <disableDefaultAvatar/> -->
<!-- Disable use of iq-based avatars (JEP-0008) --> <!-- (uncomment to disable) --> <!-- <disableIQAvatars/> -->
<!-- Disable use of vcard-based avatars (JEP-0153) --> <!-- (uncomment to disable) --> <!-- <disableVCardAvatars/> -->
<!-- Disable use of PEP-based avatars (JEP-0084) --> <!-- (uncomment to disable) --> <!-- NOT IMPLEMENTED YET --> <!-- <disablePEPAvatars/> -->
<!-- You can choose which users you wish to have as administrators. These users can perform some tasks with Ad-Hoc commands that others cannot --> <admins> <jid>amphee@sibnsk.net</jid> </admins>
<!-- You can select which event loop PyAIMt will use. It's probably safe to leave this as the default -->
<!-- Use epoll for high-load Linux servers running kernel 2.6 or above --> <!--<reactor>epoll</reactor>-->
<!-- Use kqueue for high-load FreeBSD servers --> <!--<reactor>kqueue</reactor>-->
<!-- Use poll for high-load Unix servers --> <!--<reactor>poll</reactor>-->
<!-- You can select which spool storage method you wish to use --> <!-- Available methods are: --> <!-- xmlfiles: single xml files in the spool directory in hashed dirs (default)--> <!-- legacyaimtransport: compatible with c-based aim transport, less functionality --> <!-- legacyjittransport: compatible with JIT transport, less functionality --> <!-- mysql: registration information stored in a MySQL database --> <!--<xdbDriver>xmlfiles</xdbDriver>-->
<!-- For MySQL --> <!--<xdbDriver>mysql</xdbDriver>--> <!--<xdbDriver_mysql>--> <!--<username>pyicqt</username>--> <!--<password>pyicqt</password>--> <!--<database>pyicqt</database>--> <!--<server>localhost</server>--> <!--<format>encrypted</format>--> <!-- Enable encryption of passwords --> <!--</xdbDriver_mysql>-->
<!-- For XMLFiles --> <!--<xdbDriver>xmlfiles</xdbDriver>--> <!--<xdbDriver_xmlfiles>--> <!--<format>encrypted</format>--> <!-- Enable encryption of passwords --> <!--</xdbDriver_xmlfiles>-->
<!-- Only grab avatars when a chat is initiated. --> <!-- <avatarsOnlyOnChat/> -->
<!-- Disable all avatar functionality. Might be necessary if you --> <!-- do not have PIL installed. --> <!-- <disableAvatars/> -->
<!-- Enable web presence indicator. This can increase ICQ spam. --> <!-- <enableWebPresence/> -->
<!-- Disable automatic send (via im) of away message when away set. --> <!-- Note that away messages are -in addition to- the away status --> <!-- message. --> <!-- <disableAwayMessage/> -->
<!-- SASL username used to bind to Jabber server. --> <!-- secret, above, is used for sasl password --> <!-- NOTE: This does not work with Twisted > 2.2.0. --> <!-- <saslUsername>username</saslUsername> -->
<!-- Use external component binding. --> <!-- This dodges the need to manually configure all jids that talk to this transport. --> <!-- Jabberd2 requires saslUsername and useRouteWrap for this to work. --> <!-- Wildfire as of 2.6.0 requires just this. --> <!-- <useComponentBinding/> -->
<!-- Wrap stanzas in <route> stanza. --> <!-- Jabberd2 requires this for useComponentBinding. --> <!-- <useRouteWrap/> -->
<!-- JID of message archive service --> <!-- <messageArchiveJID>datasink.example.org</messageArchiveJID> -->
<!-- If registration authentication is used, enter the method --> <!-- Auth configs often require additional options to be specified. --> <!-- See associated config entries per authRegister example. --> <!-- NOTE: limited to LDAP for now -->
<!-- THIS IS UNTESTED AS OF YET --> <!-- <authRegister>LDAP</authRegister> --> <!-- For LDAP auth, make sure to uncomment <authRegister_LDAP> --> <!-- and </authRegister_LDAP> and fill out the options in between. --> <!-- <authRegister_LDAP> --> <!-- The fqdn or ip address of the LDAP server --> <!-- <server>ldap.example.org</server> --> <!-- The Root DN to be used to perform LDAP searches --> <!-- <rootDN>CN=Administrator,CN=Users,DC=example,DC=org</rootDN> --> <!-- The password for the Root DN --> <!-- <password>SECRET</password> --> <!-- The Base DN to search for users --> <!-- <baseDN>DC=example,DC=org</baseDN> --> <!-- The attribute to search for the user ID. --> <!-- 'samAccountname' in Windows, 'uid' on most other systems --> <!-- <uidAttr>samAccountname</uidAttr> --> <!-- </authRegister_LDAP> --> </pyicqt>
ejabberd стартует спокойно, я логинюсь и болтаю.
затем я стартую pymsn
sapphire# cd ******/transports/MSN/ sapphire# ./PyMSNt.py sapphire#
Вот тут, ничего не сообщив, pymsn как бы захлопывается, хотя если судить о топе, питон от нее висит.
я не знаток БСД но када я делал тоже с gentoo то стартовал и каталога с pyicq-t, от правильного юзера примерно так:
python ./pyicq-t.py -b -c /etc/jabber/pyicq-t.xml -l /var/log/jabber/pyicq-t.log
это из скрипта, а для дебага я вроде стартовал
python ./pyicq-t.py -c /etc/jabber/pyicq-t.xml -d
вроде в папке с сырцами от pyicq-t есть примеры скриптов.
я не знаток БСД
я не знаток БСД но када я делал тоже с gentoo то стартовал и каталога с pyicq-t, от правильного юзера примерно так:
python ./pyicq-t.py -b -c /etc/jabber/pyicq-t.xml -l /var/log/jabber/pyicq-t.log
это из скрипта, а для дебага я вроде стартовал
python ./pyicq-t.py -c /etc/jabber/pyicq-t.xml -d
вроде в папке с сырцами от pyicq-t есть примеры скриптов.
Имена узлов
Имена узлов сервисов из конфига ёжика не совпадают с именами узлов сервисов из конфигов этих сервисов.
ну с PyICQt всё
ну с PyICQt всё понятно - не совпадает пароль. В конфиге джаббера у тебя написано:
{5347, ejabberd_service, [{access, all}, {host, "icq.example.net", [{password, "secret"}]}]},
Так вот, вместо secret должен быть пароль из конфига это самой письки:
<!-- The authentication token to use when connecting to the Jabber server -- >
<secret>nfylth,thl16vjpbkk</secret>
А в MSN JID-ы не
А в MSN JID-ы не совпадают...