jabber.class.php - cjphp.netflint.net/
procmail
jabber server or acount on xmmp server ( i using it on non ssl connection, with ssl jabber.class.php crashed )
php cmd installed
Let's start :
First create files in your home directory like below:
.forward
| /usr/bin/procmail
.procmailrc
:0 c
| $HOME/mail2jabber.sh
mail2jabber.sh
#!/bin/bash
(cat - | formail -X From: -X Subject:
echo .
echo quit
) | /usr/bin/php mail2jabber.php
mail2jabber.php
require("class.jabber.php");
?>
$JABBER = new Jabber;
?>
$JABBER->server = "your server name ( example: chrome.pl)";
$JABBER->port = "5222";
$JABBER->username = "username";
$JABBER->password = "password";
$JABBER->resource = "ClassJabberPHP";
$JABBER->enable_logging = FALSE;
//$JABBER->log_filename = "logfile.txt";
?>
$JABBER->Connect() or die("Couldn't connect!");
$JABBER->SendAuth() or die("Couldn't authenticate!");
$JABBER->SendPresence(NULL, NULL, "online");
$JABBER->SendMessage("where send a message ex. adm@chrome.pl",
"normal",
NULL,
array( // body, thread... whatever
"body" => "You have a new messages on „email account name” ! log in and
check on "mail www interface" or use favourite mail client "
)
);
$JABBER->Disconnect();
?>
Then:
copy class.jabber.php
chmod 755 mail2jabber.sh
enjoy
Thursday, June 28, 2007
jabberd 2.1.4 on SunOs 5.10 (Solaris) / instalacja jabberd 2.1.4 na SunOs 5.10 (Solaris)
instalacja jabberd 2.1.4 na SunOs 5.10 (Solaris)
./configure “parameters”
comment out in config.h this line "#define HAVE_VSYSLOG"
This is likely due to the fact that Solaris doesn't accept NULL values passed to vsnprintf and related functions. jabberd2 has implemented some workounds specific to vsnprintf, but left out vsyslog, which uses the system vsnprintf under the hood.
cd /sm
edit Makefile
find in /sm/Makefile
sm_LDFLAGS = -Wl,-export-dynamic
and replace with:
sm_LDFLAGS = -Wl -B dynamic
make
make install
without this change sm_LDFLAGS = -Wl -B dynamic
jabberd don't compile , error was in sm without change in config.h c2s just died after the starting jabberd maybe its just a one of lot solution, really i don't know
./configure “parameters”
comment out in config.h this line "#define HAVE_VSYSLOG"
This is likely due to the fact that Solaris doesn't accept NULL values passed to vsnprintf and related functions. jabberd2 has implemented some workounds specific to vsnprintf, but left out vsyslog, which uses the system vsnprintf under the hood.
cd /sm
edit Makefile
find in /sm/Makefile
sm_LDFLAGS = -Wl,-export-dynamic
and replace with:
sm_LDFLAGS = -Wl -B dynamic
make
make install
without this change sm_LDFLAGS = -Wl -B dynamic
jabberd don't compile , error was in sm without change in config.h c2s just died after the starting jabberd maybe its just a one of lot solution, really i don't know
multiple domain on jabberd2 / wiele domen na jabberd2
if you have properly configured and running server
usualy config files are in /etc/jabberd
copy sm.xml to other file example sm.domain2.xml
change:
<>
<>to your second domain example: domain2.com< /id >
optionaly:
<>
<>server< /category > >
<>im< /type >
<>domain2.com server < /name >
< /identity >
change pid file example:
/usr/local/var/jabberd/pid/sm.domain2.pid
add line to jabberd.cfg
sm /usr/local/etc/jabberd/sm.domain2.xml
add line to c2s.xml
< enable="'true'">domain2.com< /id >
to set up multiple domain support you need to run separate sm proceses i will show you a simple way to do it
locate sm executable file, usually it is on /usr/local/bin
cp sm sm.domain2
then
edit jabber run script
locate line:
progs="router resolver sm c2s s2s"
and replace with
progs="router resolver sm sm.domain2 c2s s2s"
in this way you dont need to make a new startup scripts
So you need too to setup corectly your jabber SRV record in DNS server for your new/next domain enjoy
usualy config files are in /etc/jabberd
copy sm.xml to other file example sm.domain2.xml
change:
<>
<>to your second domain example: domain2.com< /id >
optionaly:
<>
<>server< /category > >
<>im< /type >
<>domain2.com server < /name >
< /identity >
change pid file example:
add line to jabberd.cfg
sm /usr/local/etc/jabberd/sm.domain2.xml
add line to c2s.xml
< enable="'true'">domain2.com< /id >
to set up multiple domain support you need to run separate sm proceses i will show you a simple way to do it
locate sm executable file, usually it is on /usr/local/bin
cp sm sm.domain2
then
edit jabber run script
locate line:
progs="router resolver sm c2s s2s"
and replace with
progs="router resolver sm sm.domain2 c2s s2s"
in this way you dont need to make a new startup scripts
So you need too to setup corectly your jabber SRV record in DNS server for your new/next domain enjoy
Subscribe to:
Posts (Atom)