Thursday, April 4, 2013

Dovecot, Amavis-new, Auto subscribe

I have followed the excellent tutorial located here http://workaround.org/ispmail/squeeze/content-scanning-amavis and I have setup an email server on Debian. Everything was up and running with a few differences (I have my users in a different server but wanted the mail stored on the localhost).

The only issue I had was when an email client was connecting, and a spam email came to dovecot, the sieve would work as in the tutorial but the headers would not be added to the message itself. After a lot of searching I figured out that if the folder did not exist, then dovecot would just deliver the email to the inbox.  So to create the default folders for every user just edit /etc/dovecot/dovecot.conf and add the following:


Now to figure out how to install Horde Groupware 5 on this server...

Wednesday, June 20, 2012

FreeNAS, OpenFiler or Ubuntu Server

Lately, I have been thinking that I will digitize everything in the house and I researched for a while on what to do and what to use.

First, the media front. I read the Roku, Boxee Box, etc reviews, but they were not for me. SO I decided to go with XBMC. I am very familiar with Ubuntu and most plugins are Ubuntu native in XBMC but unfortunately the new version of Ubuntu comes with Unity. I went against my hatred for the new layout and stupid desktop environment and since I could not be bothered to remove Unity for another environment...what the hell, I said I'll try it.

The hardware was pretty simple:

I installed Ubuntu 11.10 with OpenSHH server, then XBMC. As soon as XBMC was up and running, I installed the extra repositories. Addons installed include Pandora for XBMC, Swiss Army Knife, mythtv for XBMC. Then I installed MythTV and configured the TVTuner Card. Very buggy and does not work properly.

So now I am ripping my DVD collection, arranging my pictures and fixing my music files. Now comes the time to figure out what to do for disk space. I looked at Synology, Promise, QNap which are the more respectable names in NAS boxes. Then I remembered that I installed and configured FreeNAS a long time ago so I started reading about FreeNAS and OpenFiler. A lot of people recommend the former than the latter and that reminded me why I had chosen it as well so long ago. 

The decision was made and I dug some hardware I had in the closet, bought some hard drives and started building. The hardware is a bit ridiculous but they used to belong in a former gaming rig.
  • Asus A8N32-SLI Deluxe Motherboard
  • AMD FX-55
  • I could not use the 8800GTX (too much power) so I just got a $20 video card
  • 1 80 GB drive I found lying around and 3x2TB
  • 4 GB of RAM
I read a lot about ZFS file system and I was intrigued so I installed freeNAS and I created a RAIDZ array. I could not change the configuration and it kept crashing all the time so I removed it and installed openFiler. Even worse...

So I saw that ZFS is natively supported in Ubuntu. I installed Ubuntu 11.10 server, added the ZFS repository, installed ZFS, created a RAIDZ array and everything was good to go. Then I wanted a time machine backup for my laptop and I came across a huge article on how to install netatalk(TODO) . That did not work. All you have to do is sudo apt-get install netatalk and add 2 configuration lines. After that was done, I installed and configured SAMBA.

Time Machine backup, Windows Backup, reliable NAS storage for any OS. Now why would people not choose this?
[Update]
Eventually I had to remove Unity and use Xfce because the video was very choppy and there was a line in the middle of the TV. 

Friday, February 17, 2012

HTML5 Canvas Drawing Library

This library will allow you to create as many Canvas elements as you wish on a single page. It does not matter if you have the canvas element inside multiple elements or if the page is too long (scrollable).

There are  a few tutorials online on how to create a canvas drawing app but most assume that you are placing them on a regular HTML page. I tried most of them but since I wanted to use it in my AJAX web application where I load everything inside DIV elements the mouse positioning was always off when the container scrolled up or down.

This is also compatible with mobile browsers. I have tested it on iOS and Android browsers. It will detect a touch event or a mouse event based on the client. This was built to be unobtrusive but the only drawback is that you need jQuery to run this. You do not need to know anything about jQuery jus thow to include it.

The following is the HTML that you need to create 2 canvases. Place this in the body tag of your document.


What you need to make sure is that the ID of the container is pallete_"CANVASID", the ID of the canvas element itself should be the CANVASID and when the object is created it needs to be with CANVASID.
Now for the Javascript:
jQuery is only used to get the position of the cursor in this function getCoords(e)
I had previously used this function but it does not work if the container is scrollable.

Canvas is a very powerful element with a huge potential and I cannot wait for the day that we will reminisce and say "Remember that really buggy application that drove everyone crazy? It did not work on Linux, Mac and had so many security issues in Windows....What was it called? Ah, yes Flash."

My Blog List