Options in FreeBSD ports

some useful options :

  • make config
  • make showconfig
  • make rmconfig

make rmconfig will remove old options saved.

If not work try to clean first :-)

Also useful switch in portupgrade :

  • portupgrade -aFrR (will download all required file without install)
  • -i, need your decision.

Migrating email accomplished (postfix+mysql+dovecot)

Fiuh, finally migrating email task is clear.

Almost 3500++ email account from vmailmgr based system moved to postfix with mysql backend and dovecot support.

thanks to Bendiken script that convert things magically :-)

Generally the steps are :

1. Rsync email to new server

2. Change to dovecot style with migration script, make it in looping.

Just combined with little script like this :



ls /email/domain.com/users | while read u1;

do /home/rasyid/tools/courier2dovecot.sh "/email/domain.com/users/$u1/" ;


write in one line and chmod +x to make it executeable.

3. Change ownership of email folder to postfix and symlink it to real place.


I’ve try roundcube mail and working fine for me. But since more user complain about some feature that not working well (perhaps browser issue) I change webmail back to squirrelmail 😉

back to epsbed report.


ERROR 2003: Can’t connect to MySQL server

I Need to add remote user for add, select, update and delete in mysql.

grant select,insert,update,delete on postfix.* to "postfix_rc"@"%" identified by "postfix_xxxxyyy" with grant option;

try to access :

-bash-2.05b$ mysql -upostfix_rc -p -h
Enter password:
ERROR 2003: Can’t connect to MySQL server on ‘’ (61)

according to this, that means no tcp/ip support.

checking firewall. OK.

after check for mysql

jedimaster# ps -ax | grep mysql
  739 con- I      0:00.01 /bin/sh /usr/local/bin/mysqld_safe –defaults-extra-file=/var/db/mysql/my.cnf –user=mysql –datadi
  834 con- S      0:04.86 /usr/local/libexec/mysqld –defaults-extra-file=/var/db/mysql/my.cnf –basedir=/usr/local –datadir
59745  p1  I      0:00.01 /bin/sh /usr/local/bin/mysqld_safe –defaults-extra-file=/var/db/mysql/my.cnf –user=mysql –datadi
59769  p1  S      0:04.98 /usr/local/libexec/mysqld –defaults-extra-file=/var/db/mysql/my.cnf –basedir=/usr/local –datadir
jedimaster# ee /var/db/mysql/my.cnf

check  this line :


removing # will add security as connection only allowed from localhost but in my case I need tcp/ip so I put # back.

try again :

-bash-2.05b$ mysql -upostfix_rc -p -h
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 414 to server version: 5.0.45-log

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.


make sure minimum mysql client : mysql-client-4.1.21 Multithreaded SQL database (client)

If I use from other server :

$ mysql -upostfix_rc -p -h
Enter password:
ERROR 1251: Client does not support authentication protocol requested by server; consider upgrading MySQL client

I use mysql 4.0.27 client :-)

got new mysql error :-). My old friend is 127 error heheheheehehe.

Using Sanesecurity Signatures for pdf email

A lot of pdf mail arrive in mailbox and maia can’t detect that. After googling I found in howtoforge about Filtering PDF-/XLS-/Image-Spam With ClamAV (And ISPConfig) On Debian/Ubuntu.

I wanna try it for FreeBSD, after red last section I try to update the scripts.

Changing two lines as suggested based on clamav installation on FreeBSD 6.2



run the script :

jedimaster# sh ss-msrbl.sh
SaneSecurity SCAM Database Update

curl: not found

my bad, Installing curl first :-)

jedimaster# cd /usr/ports/ftp/curl && make install

jedimaster# whereis curl
curl: /usr/local/bin/curl /usr/local/man/man1/curl.1.gz /usr/ports/ftp/curl
read more »