Kalkun: Inbox multipart support
There are some user complaining with Kalkun behavior with multipart/long messages in the inbox, the message is split up and it’s quite hard to read it.
I quite believe gammu-smsd already handle it, since the TextDecoded field on inbox table become text, not varchar(160). But, somehow it’s not running as expected. The multipart/long message record split up each other, have different ID, but the key is on the UDH. This is how we managed to merge the message and it’s implemented on commit #1204938
But, it’s not highly tested, you can download the latest code via snapshot or directly on github and help with the test.
Cheers.
Koneksi SSH melalui SOCKS Proxy
Misalkan Anda mempunyai sebuah server di internet, katakanlah Host A, yang menjalankan servis SSH server pada port standar 22. Pada kondisi normal, Anda bisa bebas melakukan koneksi SSH ke Host A, tapi suatu ketika Anda sampai pada suatu keadaan dimana koneksi SSH tidak diperbolehkan dalam suatu jaringan tertentu (katakanlah di kampus), sang admin hanya memperbolehkan koneksi melalui HTTP Proxy dan beberapa servis lain (seperti SMTP, POP3, dan IMAP). Tapi disini saya tidak akan membahas koneksi SSH melalui HTTP Proxy (sudah banyak artikel yang membahas hal ini).
Sebelumnya saya sudah mencoba koneksi SSH melalui HTTP Proxy, tapi sepertinya sang admin tidak memperbolehkan method CONNECT yang dibutuhkan untuk membuat koneksi TCP. Kejam sekali adminnya, tapi saya belum menyerah
Yang akan kita bahas adalah bagaimana melakukan koneksi SSH melalui SOCKS Proxy. Tapi sebelumnya apa itu SOCKS Proxy?
Dari Wikipedia:
SOCKS is an Internet protocol that facilitates the routing of network packets between client–server applications via a proxy server. SOCKS performs at Layer 5 of the OSI model—the session layer (an intermediate layer between the presentation layer and the transport layer). Port 1080 is the registered port designated for the SOCKS server.
Disitu juga diberikan contoh kasus:
Bill wishes to communicate with Jane over the internet, but a firewall exists on his network between them and Bill is not authorized to communicate through it himself. Therefore, he connects to the SOCKS proxy on his network and sends to it information about the connection he wishes to make to Jane. The SOCKS proxy opens a connection through the firewall and facilitates the communication between Bill and Jane. For more information on the technical specifics of the SOCKS protocol, see the sections below.
Yang kurang lebih maksudnya adalah kita menggunakan perantara untuk melakukan koneksi, karena koneksi langsung tidak diperbolehkan. Misal: A dan B sebagai host client dan server yang ingin melakukan koneksi, dan C adalah SOCKS proxy. Tapi koneksi dari A ke B tidak diperbolehkan, sedangkan koneksi C ke B diperbolehkan. Nah, kita bisa menumpang koneksi dari C ke B, sehingga A bisa terhubung ke B.
OK, langsung saja kita praktekkan. Pertama-tama kita melakukan koneksi dari A ke C, dalam hal ini kita akan membuat SOCKS proxy menggunakan openSSH.
$ ssh -p993 -D localhost:4321 -l user hostC
Dalam hai ini saya melakukan SSH ke Host C melalui port 993, bukan port standar 22 karena memang di blok oleh admin, port 993 sebenarnya adalah servis IMAP, yang diperbolehkan oleh admin, jadi sebelumnya pastikan SSH server di Host C berjalan di port 993 atau bisa dual port 22 dan 993. Sebenarnya ini hanya akal-akalan saya untuk mengelabui admin saja
Sekarang kita mempunyai SOCKS Proxy di localhost port 4321. Tapi tunggu dulu, kenapa localhost? Bukankah SOCKS Proxy adalah Host C? Ya, lagi-lagi ini adalah akal-akalan saya, Anda tentu saja bisa menggunakan koneksi langsung ke Host C, tanpa melakukan binding/tunnel SSH terlebih dahulu, tapi yang menjadi masalah disini adalah saya juga tidak bisa melakukan koneksi SOCKS dari A ke C, lihat di atas, SOCKS Proxy menggunakan port 1080, yang tentu saja di blok oleh admin.
Selanjutnya tinggal menggunakan SOCKS Proxy tersebut untuk melakukan koneksi ke Host B. Tapi, untuk melakukan koneksi SSH melalui SOCKS Proxy kita membutuhkan bantuan program lain. Dalam hal ini yang sudah saya cobakan adalah nc dan connect, alternatif lain adalah connect-proxy, corkscrew tidak bisa digunakan karena belum/tidak mendukung SOCKS Proxy, hanya HTTP(s) Proxy.
$ ssh -o “ProxyCommand /usr/bin/nc -x localhost:4321 %h %p” -l user hostB
atau jika menggunakan program connect:
$ ssh -o “ProxyCommand /usr/bin/connect -S localhost:4321 %h %p” -l user hostB
Selamat ber-SSH ria
.
Referensi:
- Menggunakan nc: http://blog.gidley.co.uk/2009/03/tunnelling-ssh-over-socks-proxy.html
- Menggunakan connect: http://www.bartbusschots.ie/blog/?p=184
- Menggunakan connect-proxy: http://blog.paulbetts.org/index.php/2008/04/08/getting-ssh-to-connect-through-a-socks-proxy/
Kalkun: New demo server and contribute page
After a long time looking for hosting provider that support git, finally there is some help by idforge (part of id-x project), kudos for them, especially Mr. Akhmat Safruddin for the quick response.
Now, the demo consist of 2 part, the latest released version and latest development version. The latest released version is the stable version that have been released to public. And the latest development version is contain code from git repository and it’s updated every midnight, so it contains latest code that we working on.
For more information about the demo you can visit Kalkun demo page.
I’ve also made the server to make code snapshot, which run every midnight that contain latest code from git repository. User who don’t have git on their system can easily use this snapshot to test the latest code.
Last, i’ve add Contribute Page on Kalkun homepage to get more feedback from more user/developer.
Kalkun: Russian translation added
Just added Russian translation on commit #3a722c87046e0edd0d9e
Thanks to Denis Polkovnikov for the effort.
So, there is now 5 language available, English, Bahasa, Czech, Portuguese, and Russian. Way to go! ![]()
If you want to add your language, it’s very easy, everyone is welcome, what the instruction how to add translation.
Mem-POP email Yahoo! tanpa Mail Plus
Sebenarnya sudah lama ingin menutup akun email di Yahoo!, tapi mengingat masih banyaknya registrasi website yang menggunakan email ini membuat saya mengurungkan niat untuk menutup akun di Yahoo!. Salah satu yang membuat saya ingin hengkang adalah web interface-nya yang bisa dibilang kurang “user friendly”, terutama saat membalas dan mem-forward email (selalu top post dan susah untuk men-quote), belum lagi masalah cara menampilkan email yang satu-per-satu, tidak seperti gmail yang bisa conversation.
Akhirnya saya berpikir untuk mengambil saja email dari server Yahoo! dengan menggunakan mail client (Mail di Mac OS), dimana saya sudah mulai terbiasa menggunakannya. Tapi lagi-lagi Yahoo! “ngajak ribut” karena akun free tidak bisa mengambil email melalui POP maupun IMAP, berbeda dengan gmail yang membebaskan pengguna untuk melakukannya. Agar bisa mengambil email, kita diharuskan membayar kira-kira $20 per tahun, tidak terlalu mahal sih, tapi saya sudah terlanjur kecewa dengan Yahoo!, jadi saya memutuskan mencari cara lain.
Setelah melakukan googling, saya menemukan beberapa cara:
Yang pertama, dengan mengubah settingan lokasi di akun Yahoo! ke Yahoo! Asia, tapi sayang sekali cara ini tidak berlaku lagi alias sudah di blok oleh Yahoo!.
Yang kedua, menggunakan aplikasi YPOPs!, tapi sayang sekali hanya untuk Windows family.
Terakhir, ketemu dengan FreePOPs, yang support Windows, Linux, Mac OS, bahkan BeOS.
Setelah googling lebih lanjut, beruntung saya menemukan yang namanya MacFreePOPs, dimana sudah ada GUI yang tentunya memudahkan pemakaian. Perlu diketahui juga bahwa MacFreePOPs ini juga sudah menyediakan FreePOPs didalamnya, jadi tidak perlu install satu persatu.
Pertama, tentu saja download aplikasi MacFreePOPs, saya menggunakan versi 2.6 dimana versi FreePOPs nya adalah 0.2.9.
Install seperti biasa, tidak ada yang aneh-aneh. Setelah install, aplikasi FreePOPs akan berada di ~/Library/Application\ Support/MacFreePOPs/, sedangkan MacFreePOPs.app silahkan di salin ke /Applications.
Sebelum menjalankan MacFreePOPs ada sedikit penyesuaian yang perlu dilakukan, perlu diketahui FreePOPs menggunakan script LUA untuk mengambil email dari server, dan script-script tersebut ada di ~/Library/Application\ Support/MacFreePOPs/src/lua/. Dalam hal ini, jika kita menggunakan Yahoo! maka script yang dipakai adalah yahoo.lua. Tapi sayang sekali ada sedikit masalah di script ini saat melakukan koneksi ke server Yahoo! (Catatan: script yahoo.lua ini terakhir kali di update pada tahun 2009), untungnya ada seseorang yang berhasil meng-update script ini. Update script tersebut bisa di download di http://freepops.diludovico.it/showthread.php?p=56170#post56170, sayangnya butuh registrasi terlebih dahulu, bagi yang tidak mau registrasi silahkan download di sini (rename jadi zip). Catatan: script update ini dibuat pada tahun 2010.
Letakkan script update tersebut (yahoo.lua) di ~/Library/Application\ Support/MacFreePOPs/src/lua_updates/.
Selanjutnya, tinggal jalankan aplikasi MacFreePOPs dan jalankan service freepopsd, ini adalah daemon yang berfungsi mengambil email dari server melalui HTTP dan menjadikannya bisa diakses melalui POP, default port nya adalah 2000.
Sekarang tinggal melakukan konfigurasi di mail client, dalam hal ini saya menggunakan Mail di Mac OS X 10.5.
Lakukan Add Account seperti biasa, Type yang digunakan adalah POP, dan Incoming Mail Server adalah 127.0.0.1 dan port yang digunakan adalah 2000 dan pastikan Anda tidak menggunakan SSL.
Selamat mendowload email
Kalkun 0.2.9 is released
This is testing version before we release the 0.3.
Full list of changes:
- Add SQLite3 support – http://wp.me/poYBa-g7
- New installation method (remove gammu database schema) – http://wp.me/poYBa-gb
- Simple autoreply, (Input manually) support multiple number on compose – http://wp.me/poYBa-fn
- Import contact feature – http://wp.me/poYBa-fc
- Update translation (Czech, Portuguese), @username bug fixes – http://wp.me/poYBa-f7
- Unicode support – http://wp.me/poYBa-eR
- Add cURL example to use with other app - http://wp.me/poYBa-c1
If you upgrading from previous version (0.2.1), just need to delete install folder and change database column names:
- pbk.id_pbk become pbk.ID
- pbk_groups.GroupName become pbk_groups.Name
IMPORTANT: Since this version. you have to configure “daemon” that manage inbox and autoreply, you also have to configure gammu-smsd with runonreceive directive. For more detail read Kalkun Installation, especially the Configure Daemon section.
Using Kalkun and gammu-smsd with SQLite3
It’s been a long time ago since i’ve started to thinking adding other database backend support besides MySQL. The problem is CodeIgniter (Kalkun is developed using CodeIgniter) and gammu-smsd both must support the database engine used, for example if CodeIgniter support PostgreSQL, than gammu-smsd must support PostgreSQL too, and so on. To make this dream comes true, i’ll have to “convert” all native SQL query to Codeigniter Active Record to make the query independent to all database engine because it’s handled by database driver.
Imagine that you want to install a software, but you only have SQLite3/PostgreSQL on your server, installing MySQL just for that can be huge problem. That’s the basic idea to support all database engine.
OK, for the first time, i’ve added SQLite3 support to Kalkun. But, it’s not as easy as i imagine to implement it. First, CodeIgniter doesn’t have official support for SQLite3, the driver only compatible with SQLite2, fortunately there’s community contribution that add SQLite3 through PDO (PHP Data Objects). So, you need pdo_sqlite extension on your PHP installation. Second, gammu-smsd also doesn’t have native support for sqlite3, otherwise it use libdbi.
Now let’s configure gammu-smsd to works with SQLite3 first. FYI, i’m using Mac OS X and gammu 1.29.0. Let’s install SQLite3 and libdbi drivers, i’m installing it using MacPorts.
$ sudo port install sqlite3
$ sudo port install libdbi
$ sudo port install libdbi-drivers
Next, compiling gammu with libdbi support. Make sure you get “Found libdbi: …” when running configure otherwise you can’t run gammu-smsd with SQLite3.
Create Kalkun database and import gammu database schema
Because of Kalkun New Installation, gammu database schema is not included on Kalkun source, now you’ve to import gammu database schema on your own (it’s included on gammu source eg. docs/sql/sqlite.sql). You can do the import using sqlite3 console:
$ sqlite3 kalkun.sqlite < docs/sql/sqlite.sql
or, if somehow it’s throw error “Error: near “/”: syntax error“, use this:
$ cat docs/sql/sqlite.sql | sqlite3 kalkun.sqlite
Or you can the import using SQLite3 client with GUI. I’m using SQLite Manager Firefox add-ons, off course you can use other SQLite client.
Next is import Kalkun database schema to the database, you can import it using your SQLite3 client or by Kalkun Installation. I’ll show you how to import using Kalkun installation. But before that you have to config the database first (it’s located on /application/config/database.php)
$db['default']['username'] = “”;
$db['default']['password'] = “”;
$db['default']['database'] = “sqlite:/path/to/database/kalkun.sqlite”;
$db['default']['dbdriver'] = “pdo”;
You only need to change the database path, SQLite doesn’t need username and password, and the driver should be pdo. It’s recommended to place your SQLite3 database outside your web root folder because of security issue.
Setting database permission, before launch Kalkun installation make sure the database is writable by web server user, you can give it world writable.
$ chmod 666 /path/to/sqlite3_db/
$ chmod 666 kalkun.sqlite
Next fire up Kalkun installation and choose SQLite3 on Database Setup.
Next, let’s configure gammu-smsd, open up your gammu-smsd configuration file a.k.a smsdrc
Service = SQL
Driver = sqlite3
database = kalkun.sqlite
dbdir = /path/to/sqlite3_db/
That’s all, now run your gammu-smsd, check logs and see if it’s working (no error). You can try sending SMS using gammu-smsd-inject:
$ gammu-smsd-inject TEXT 123456 -text “Hi, this is gammu sending using sqlite3″
Next, try sending SMS using Kalkun
..
PS: SQLite is famously knows for it’s liteness, but it’s may slower with network access and lots of activity/user using the same resource. So make sure you know what are you doing before using it.
Implemented on commit #fa845a4





Recent Comments