iCoreTech Research Labs Just a placeholder

15Sep/092

Reminder: empty email subjects in Snow Leopard server’s postfix

By default Snow Leopard server doesn't allow sending emails with blank subjects.

In order to change this behaviour open:

/etc/postfix/custom_header_checks

and comment the:

/^subject: *$/ REJECT empty subject header

line by prepending a # , so it reads:

#/^subject: *$/ REJECT empty subject header

Restart the mail service.

15Sep/092

Reminder: Outlook vs. Snow Leopard server’s postfix

Snow Leopard server implements some good anti-spam measures, on top of all Greylisting.

But there's a subtle issue with sending emails from Outlook, many users will get an error on the lines of:

helo command rejected: need fully-qualified hostname

In order to solve this open up:

sudo nano /etc/postfix/main.cf

Find this line:

smtpd_helo_restrictions = reject_invalid_helo_hostname reject_non_fqdn_helo_hostname

and change it to:

smtpd_helo_restrictions = permit_sasl_authenticated permit_mynetworks reject_invalid_helo_hostname reject_non_fqdn_helo_hostname

Restart the mail service.

11Sep/090

do_sqlite3 on Snow Leopard

If you have encountered architecture issues installing the do_sqlite3 gem on Snow Leopard I resolved running the following:

sudo env ARCHFLAGS="-arch x86_64" gem install do_sqlite3
7Sep/093

Xslimmer review on Snow Leopard

XslimmerLogo
There are times when you want to optimize your system, probably because you are starting to notice slowdowns or for the sake of saying "my OS is uber clean now".

Whatever reason you are up to, you may want to check out Xslimmer.

Xslimmer is one of the utilities that can strip out unneeded files from your applications.

For example, before Snow Leopard we have seen what Universal binaries are.
A Universal binary (also called "fat binary") contains code for two architectures: PPC and Intel, so, through Rosetta, a Mac OS X was able to run the code for the proper platform; the "problem" lies in the disk space usage.

Now we can see that universal binaries are expanded with other code: PowerPC, Intel, Intel 64, etc., along with language files; every bit of this stuff takes up disk space, and this is where Xslimmer comes into play, by stripping what your architecture/language doesn't need.
It recovers valuable disk space and boost application startup.

Xslimmer have a built-in blacklist, which contains applications' names that are dangerous to slim, so it will automatically skip them.

Xslimmer main interface

Be careful what you strip stuff in Snow Leopard though, and always make backups preferably on another disk, since there's no point of having megabytes of backed up stuff lying on the same disk if your mission is to recover disk space, because when using the backup feature you are up to remove data from a source only to move it to another point on disk.

Another feature of Xslimmer is that it handles the new HFS+ compression introduced in Snow Leopard.

In Snow Leopard applications are in compressed state, decompressed on the fly when the user requests them.

There was a bug in version 1.7.1 that actually skipped the recompression, but, developers told me, was out only for one day.

The application does the job promised, and I can recommend it for curious, SSD or power users; however in those times disk space and performance is abundant, tampering with files this way can be not advisable on a critical platform, therefore always make a backup.

A word about performance before and after slimming applications: for me it starts to be noticeable on:
- slow computers
- starting up very big applications

Xslimmer features also a slick interface and support seems to be very cordial and fast.

$14.95, trialware, download here.

5Sep/090

Last.fm loved tracks to iTunes

Update: now includes experimental Windows support.

I wrote a little (raw) ruby script that imports your loved last.fm tracks into iTunes in a discrete playlist.

Download the script here.

30Aug/090

4 hours of downtime

I apologize for the downtime icoretech.org has experienced, my ISP suddently knocked out icoretech's public ip address from their router for no know reason.

Meanwhile I switched the site to another ip address, DNS servers are catching up with this change.

Thanks for the patience, remember that you can follow me on Twitter.

29Aug/095

Bowtie doesn’t scrobble to last.fm, solution

Schermata 2009-08-29 a 21.10.32
Apparently there are some issues with Bowtie when using the last.fm integration.
Remember I'm using Snow Leopard.

Bowtie is a valid freeware alternative to CoverSutra for managing iTunes, showing cover art, current song, etc.

Using version 1.0b2 I found out two things:

  • if you open the preference pane, Last.fm and check "Enabled", the checkbox goes automatically away
  • it doesn't scrobble

A workaround to fix the first problem is to leave the checkbox alone and instead enable last.fm integration by right clicking the icon in the upper tray and selecting "Enable Last.fm".

The solution to the fact that isn't scrobbling is to capitalize your last.fm username in preferences, so for example if my username is "kain82" I will write "Kain82".

With those settings in place it does seem working, however I'll keep this post as reference for future updates on the matter.

Oh, and if you're into metal, add me to your friends over last.fm ;)

29Aug/090

Snow Leopard server wallpaper

SL_server

Just a small post, I would like to share the HUE-modified version of the default wallpaper in Snow Leopard, applied currently to the server version.

29Aug/090

Install Passenger (mod_rails) in Snow Leopard 64 bit

Update: passenger 2.2.5 release notes states that there are know issues with Snow Leopard, but developers didn't had chance to test them out yet. I personally found no problems on 2.2.4. To upgrade simply run:

sudo gem install passenger
sudo passenger-install-apache2-module

and change apache config according to new version. Follow me on twitter for up to date info.


The installation works out as usual and it's pretty straightforward, version 2.2.4 2.2.5 and using stock Apache which comes with Snow Leopard as default.

Install Xcode from Snow Leopard DVD, and it would be also wise to upgrade rubygems before doing this operation, search older posts.

Install the gem:

sudo gem install passenger
sudo passenger-install-apache2-module
sudo mate /etc/apache2/other/passenger.conf

passenger.conf doesn't exists on a vanilla installation (of course), therefore create it or look below. I'm also using the "mate" command, which fires up TextMate, replace "mate " with your preferred text editor, like vi, nano, etc.

If you want to use your personal configuration file instead of passenger.conf:

sudo mate /etc/apache2/users/username.conf

Replace username with your username in Snow Leopard.

Paste those lines in:

LoadModule passenger_module /Library/Ruby/Gems/1.8/gems/passenger-2.2.5/ext/apache2/mod_passenger.so
PassengerRoot /Library/Ruby/Gems/1.8/gems/passenger-2.2.5
PassengerRuby /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
 
RailsEnv development # or production, but anyway production it's the default value if you don't specify.

Now edit the main file:

sudo mate /etc/apache2/httpd.conf

Around line 465 you will find the commented line:

465
#Include /private/etc/apache2/extra/httpd-vhosts.conf

Remove the # and save the file, this will make Apache pickup extra vhost configuration file.

Open up your Control Panel, go into Shares (Condivisione in Italian), Web share, toggle the checkbox and leave it enabled to reboot Apache and let it pickup those changes.

I'm refraining from installing the complementary PassengerPane at this time since it still uses RubyCocoa instead of MacRuby and its last update is dated 2008, therefore open up:

sudo mate /etc/apache2/extra/httpd-vhosts.conf

and paste a similar code to deploy your rails application:

<Virtualhost *:80>
   ServerName www.yourhost.com
   DocumentRoot /somewhere/public    # < -- be sure to point to 'public'!
</VirtualHost>

Reboot again Apache as described above, as an extra as usual you can edit /etc/hosts to add your ServerName mapped to 0.0.0.0 or 127.0.0.1 or what you prefer by writing a simple line:

127.0.0.1 www.yourhost.com

There's another method of adding custom hostnames by not tampering with /etc/hosts, but I'll leave it for another blog post.

29Aug/093

Glimmerblocker: block ads in Safari 64 bit mode on Snow Leopard

GlimmerBlocker
Safari AdBlock worked quite well, however since Input Managers are finally totally discontinued in Snow Leopard we can't use it in Safari running 64 bit mode.

In fact, as the developer states, a new version of Safari Adblock is out in the wild but requires you to run Safari in 32 bit mode, by checking the appropriate flag in Get Info window of Safari.

But since I'm running a 64 bit operating system, kernel and application, I took a step further and began hunting for the appropriate tool and seems that I found it.

GlimmerBlocker doesn't hack Safari, instead it runs a local proxy to filter ads, pretty neat if you ask me.

And for this reason after the installation you won't find preferences directly in Safari, instead you'll find them in your Control Panel, directly in 64 bit mode (PrefPanels that are still 32 bit requires you to reopen the whole Control Panel in 32 bit mode).

The only thing is that when blocking an ads, Adblock removed visually the ads, without leaving empty spaces, meanwhile GlimmerBlocker does (depends on the site you are visiting); however this doesn't change the fact that it's an excellent replacement.

There are also other solid features, ranging from creating your own lists, hacking with javascript to let a page behave like you want and showing youtube download links. By running a customizable proxy transparently like this possibilities are infinite, like using it with other browsers and other native applications which uses http. You can even setup your iPod or iPhone to filter ads when over WiFi.

Thumbs up for this software.