Tomcat Debugging

I use cygwin on my windows box at work to run tomcat.  I wanted to be able to debug tomcat from eclipse but everything I found on google talked about adding environment variables and seemed over complicated.  Based on the apache wiki it’s really simple.  In cygwin find your Tomcat’s bin directory and run the following:

catalina.sh jpda start
catalina.sh jpda stop

It’ll start the debugger on port 8000.  Go into eclipse and create a “Remote Java Application” debug configuration and connect to that port on localhost.  Why so much fuss?

Adding Email Accounts to Mail Server

Recently I setup dovecot and postfix to handle email for my multiple domains.  I configured MySQL in order to manage the many accounts I plan to create.  Below is a cheat sheet on how to add domains and accounts.

Adding Virtual Domains to the mail server:

INSERT INTO `mailserver`.`virtual_domains`
  (`id` ,`name`)
VALUES
  ('1', 'example.com'),
  ('2', 'hostname.example.com'),
  ('3', 'hostname'),
  ('4', 'localhost.example.com');

Adding Email Accounts:

INSERT INTO `mailserver`.`virtual_users`
  (`id`, `domain_id`, `password` , `email`)
VALUES
  ('1', '1', ENCRYPT('firstpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email1@example.com'),
  ('2', '1', ENCRYPT('secondpassword', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'email2@example.com');

Adding Aliases for Email Accounts:

INSERT INTO `mailserver`.`virtual_aliases`
  (`id`, `domain_id`, `source`, `destination`)
VALUES
  ('1', '1', 'alias@example.com', 'email1@example.com');

From this setup tutorial

Cheeonk! Alpha

I’ve been talking about creating a web chat client, similar to gchat, for probably 4 years.  The project was dormant for probably about 3 of those years due to laziness and life.  Over the past couple months I’ve made an effort to bring it back.  Welcome cheeonk.com in alpha.  There are a bunch of features missing.  The overall design needs a major face lift and it’s no where near my vision – but all in good time.  Cheeonk uses the GWT framework, smack, gin, guice, hibernate, gwt-dispatch, maven, git, code-splitting, and annotated validations.  It’s running on a ubuntu linode with tomcat as the application server.  Interested in joining in?  Message me.