Freitag Feb 27, 2009

postfix and no worthy mechs found

Today I configured postfix on my unbutu machine to test some improvements sending out mails to a smtp mail server.

I followed this introductions: 

http://wiki.ubuntuusers.de/Postfix

My smtp server / relayhost needs an authentification. So I configured my main.cf with the following smtp params:

smtp_sasl_auth_enable = yes
# noplaintext weglassen, wenn Passwörter im Klartext übertragen werden müssen:
# (nicht empfohlen, nur wenn's anders nicht funktioniert)
smtp_sasl_security_options = noplaintext noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password

But now I received the following error message on my mail.log

Feb 28 00:25:44 xxx postfix/smtp[8756]: warning: SASL authentication failure: No worthy mechs found
Feb 28 00:25:44 xxx postfix/smtp[8756]: 2794717E510: to=<xxa@xx.com>, relay=www.xxx.com[xxxxxxx]:25, delay=21, delays=0.05/0.01/21/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server xxx[xxx]: no mechanism available)

To solve this problem I found this thread:

http://www.zimbra.com/forums/installation/1240-cannot-sasl-authenticate-server.html

So the solution for me was to set the following two smtp params to an empty string:

smtp_sasl_security_options =
smtp_sasl_mechanism_filter =
smtp_use_tls = no

Now postfix works fine and is able to send out mails to my relayhost.

Montag Nov 17, 2008

Ubuntu - MySQL - Glassfish

To install MySQL on Ubuntu to be used in a Glassfish JEE App is very easy. 

You can download and install MySQL Server using the Synaptic Tool in Ubuntu. During Setup you will be asked for a root password. this is a password for the user "root" inside the mySQL Server. So its not your Linux root password.

After intalling mysql server you can easily start and stop it with

 > sudo /etc/init.d/mysql start

 > sudo /etc/init.d/mysql stop

To get into the mysql console use

 >mysql -u root -p

There you will be ask for the mysql root password.

To create a new database use the following command form the mysql console:

mysql> create database my_database;

Now you can setup the JDBC Pool inside Glassfish server.

First download the JDBC Driver form mysql download page and put the 'mysql-connecto-java-5.1.x.jar' into glassfish/domains/domain1/lib/ext

use the following Class Name to configure you JDBC Pool:  com.mysql.jdbc.jdbc2.optional.MysqlDataSource

Use the additional params:

  • databaseName : [you_database_name]
  • user: root
  • password : [you mysql admin password]