Archive for March, 2010

This patch is indented for people who run QMail for personal mail hosting and want to route all outgoing mail through there ISP smtp server. The reason to route outgoing mail through you ISP is that some smtp servers won’t accept mail from dynamic ip addresses. To do this in QMail you configure smtproutes control file to direct all outgoing mail to your ISP’s smtp server (see man qmail-remote(8)). However, some ISPs require SMTP authentication for outing mail which qmail doesn’t support. This patch provides support for SMTP authetication.


  • Apply the patch to the code.
  • Follow the normal build process for making QMail.
  • If the same qmail verision is already installed via a package you can copy over just the qmail-route binary, you won’t need to install the complete built version


smtpauth – create this file in your control directory and put you ISP’s username in it. The username must be base64 encoded. To do this you can use this website to get the base64 encode string. Enter you username and click encode. Copy the result to this file

smtppasswd – create this file in your control directory and put you ISP’s password in it. The password must be base64 encoded. To do this you can use this website to get the base64 encode string. Enter you password and click encode. Copy the result to this file


  • There a know issues that the smtpauth file must exist. If it doesn’t qmail-route will file

MythFlix is a MythTV plug-in for managing your Netflix queue from MythTV. It currently supports the ability to view your queue and add movies to your queue. The browse feature is based on the Netflix RSS feeds. This plug in is not very mature, which means things might not work right and/or it might break other things.



MythFlix has been incorporate into the MythTV project. This site no longer contains the most recent code. To get the most recent version you must check out the last source from the MythTV project


  • Crypt:SSLeay Perl Library


To browse movies MythFlix uses the RSS feeds from NetFlix, no screen scrapping. To select which RSS feeds you want, go to the configuration page. A list of available RSS feeds are presented. Select the ones you want. Then select “Browse” from the main MythFlix menu to see the avaliable movies. When you see a movie you want press ‘Enter’. This will add the movie to your queue. To view your queue select “Queue” from the main MythFlix menu.


This work was derived from MythNews.

Integrating Spring and Hibernate would seem like a no brainier. Spring comes with a plethora of support for hibernate and the combination is very popular.  However, I’ve struggled every time to figure out how to best integrate the two technologies.  I’ve searched Google and found as many different solutions as new questions.

The problem seems to stem from the different patterns available to intergrate spring and hibernate. The complexity of your application will help determine which pattern works best.  For most web based application session-per-request pattern is sufficient.  A session-per-request is a single hibernate session for each http request.  Spring provides a servlet filter for this, OpenSessionInViewFilter.  This filter binds a hibernate session to thread local when the filter processes the request.

To set up the OpenSessionInViewFilter add the following to the web.xml file.


Next configure the session factory in the spring context.

<bean id="sessionFactory"
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<prop key="hibernate.transaction.factory_class">
<prop key="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</prop>
<!-- this will show us all sql statements -->
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.show_type">false</prop>
<prop key="hibernate.format_sql">false</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.EhCacheProvider</prop>
<prop key="hibernate.hibernate.cache.use_query_cache">true</prop>
<!-- Set schema here so we can vary it -->
<prop key="hibernate.default_schema">cms</prop>
<property name="annotatedClasses">

Now inject the session factory configured previously into you data access classes. It’s important to call currentSession() on the session factory when a session is needed and not store the session. The session returned by currentSession() will be the session bound to thread local when the filter processed the request.

<bean id="companyService" 
<property name="sessionFactory" ref="sessionFactory"></property>

Good luck!