Category Archives: Unix

Unix

Problem with file(1) and maia mailguard solved

I just install new FreeBSD server using 7.0 release.

In this stage I found file(1) problem not detected by maia mailguard properly.

mail# /var/amavisd/maia/scripts/configtest.pl

Application/Module      Version   Status
========================================================================
Perl                 :    5.8.8 : OK
file(1)              :      N/A : NOT INSTALLED (required by Maia Mailguard)
Archive::Tar         :     1.38 : OK
Archive::Zip         :     1.23 : OK

Trying to find out if file already installed.

mail# file -v

file-4.23
magic file from /usr/share/misc/magic

mail# ls -l /usr/local/bin | grep file

-r-xr-xr-x  1 root  wheel    11372 Apr  9 09:24 file
-r-xr-xr-x  1 root  wheel     5344 Apr  1 13:58 pamfile
lrwxr-xr-x  1 root  wheel        7 Apr  1 13:58 pnmfile -> pamfile

mail# whereis file
file: /usr/bin/file /usr/share/man/man1/file.1.gz /usr/src/usr.bin/file

Seem that file reading from /usr/local/bin

Making symlink

mail# ln -s /usr/bin/file /usr/local/bin/file

mail# /var/amavisd/maia/scripts/configtest.pl

Application/Module      Version   Status
========================================================================
Perl                 :    5.8.8 : OK
file(1)              :      N/A : NOT INSTALLED (required by Maia Mailguard)

Hehehehe, still not work. Trying to move file in /usr/bin

mail# mv /usr/bin/file /usr/bin/file_old

mail# cd /usr/ports/sysutils/file

mail# file -v

file-4.21
magic file from /usr/local/share/file/magic

Detect file installed from ports.

Trying again to detect.

mail# /var/amavisd/maia/scripts/configtest.pl

Application/Module      Version   Status
========================================================================
Perl                 :    5.8.8 : OK
file(1)              :     4.21 : OK
Archive::Tar         :     1.38 : OK

It works now, continue now icon wink Problem with file(1) and maia mailguard solved

Unix

file(1) : N/A : NOT INSTALLED (required by Maia Mailguard)

I’ve found my maia-mailguard not working, I run configtest to find out :

mail# /var/amavisd/maia/scripts/configtest.pl

MAIA MAILGUARD CONFIGURATION TEST

This script checks for the presence of applications and Perl modules
required by amavisd-maia, SpamAssassin, and Maia Mailguard’s maintenance
scripts.  Version numbers are also checked, and if a newer version of
a component is recommended, you should consider upgrading to at least
the minimum recommended version.

If you have already configured your Maia Mailguard database, the script
will also test the connection to that database.

Remember also to run the configtest.php script on your web server to
perform similar tests of your web, PHP, and PEAR environment.

Application/Module      Version   Status
========================================================================
Perl                 :    5.8.8 : OK
file(1)              :      N/A : NOT INSTALLED (required by Maia Mailguard)

Googling around and get little clue about what file(1) is .

from : http://www.sfr-fresh.com/unix/misc/

get more info file-4.24.tar.gz (28 Mar 19:21, 567196 Bytes)
Determine file type (via magic file)

Hmm…

Looking p5 equivalent ports.

mail# whereis p5-File-Type
p5-File-Type: /usr/ports/devel/p5-File-Type

I decide to give this port a try :

mail# cd /usr/ports/devel/p5-File-Type && make install

Application/Module      Version   Status
========================================================================
Perl                 :    5.8.8 : OK
file(1)              :      N/A : NOT INSTALLED (required by Maia Mailguard)

sighhh…

Try another hint :

mail# wget ftp://ftp.astron.com/pub/file/file-4.24.tar.gz
–2008-04-02
08:42:32–  ftp://ftp.astron.com/pub/file/file-4.24.tar.gz
          => `file-4.24.tar.gz’
Resolving ftp.astron.com… 208.77.212.98, 38.117.134.204
Connecting to ftp.astron.com|208.77.212.98|:21… connected.
Logging in as anonymous … Logged in!
==> SYST … done.    ==> PWD … done.
==> TYPE I … done.  ==> CWD /pub/file … done.
==> SIZE file-4.24.tar.gz … 567196
==> PASV … done.    ==> RETR file-4.24.tar.gz … done.
Length: 567196 (554K)

100%[=====================================================================================>]
567,196     99.3K/s   in 6.0s

2008-04-02 08:42:46 (91.8 KB/s) – `file-4.24.tar.gz’ saved [567196]

mail# tar xvzf file-4.24.tar.gz

mail# cd file-4.24

mail# ./configure
mail# make
mail# make check
mail# make install

Try again :

mail# whereis p5-File-MMagic
p5-File-MMagic: /usr/ports/devel/p5-File-MMagic
mail# cd /usr/ports/devel/p5-File-MMagic && make install

Still not work too icon sad file(1) : N/A : NOT INSTALLED (required by Maia Mailguard)

try to find out if file installed.

mail# file -v
file-4.23
magic file from /usr/share/misc/magic

I got one but maia-mailguard don’t recognized it.

Will investigate it later, must go home now .

Unix

portupgrade don’t work

ftp# csup -g -L2 ports-supfile

ftp# cd /usr/ports/

ftp# make fetchindex

ftp# portversion -v | grep ‘<’

/usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:119:in `fill’: MOVED file format error (PortsDB::MOVEDError)
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:113:in `each’
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:113:in `fill’
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:112:in `open’
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:112:in `fill’
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:107:in `initialize’
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:182:in `new’
        from /usr/local/lib/ruby/site_ruby/1.8/portsdb.rb:182:in `setup’
        from /usr/local/lib/ruby/site_ruby/1.8/pkgtools.rb:256:in `init_pkgtools_global’
        from /usr/local/sbin/portversion:175:in `main’
        from /usr/local/lib/ruby/1.8/optparse.rb:785:in `initialize’
        from /usr/local/sbin/portversion:80:in `new’
        from /usr/local/sbin/portversion:80:in `main’
        from /usr/local/sbin/portversion:364

anyone ever face it?

Unix

PCBSD 1.5 is out, get faster in 64 bit

From PCBSD press release :

iXsystems Announces Release of PC-BSD Version 1.5, Edison Edition

Release features AMD 64-bit as well as 32-bit processor support

 

iXsystems announced today the release of PC-BSD Edison Edition. PC-BSD is a fully functional open source desktop operating system based on FreeBSD 6.3-STABLE. FreeBSD is one of the most used UNIX-like operating systems in the world and is widely renowned as the most stable and secure server operating system. PC-BSD has a Push-Button Installer (PBI) wizard developed exclusively for PC-BSD that lets users download and install a wide range of available applications in a self-extracting and self-installing format.

 

Due to its quick and easy installation and ease of use, PC-BSD is becoming increasingly popular not only for individual desktop users but also for large-scale implementation projects. A school in Poulx, France recently deployed PC-BSD in 13 classrooms with 300 students with resounding success. PC-BSD was brought in to replace the “dominant OS” (hint: it wasn’t Linux!) According to Marie Walrafen, whose firm was charged to lead the rollout in the schools, “Installing PC-BSD was…our only offer. We said we could only offer support and training on PC-BSD because we simply believe FreeBSD to be the best system available and PC-BSD a perfect tool for all basic needs and especially fit for the use of a school. Secure, reliable and easy.”

 

Highlights of the Edison Edition include availability of an AMD 64-bit version for faster performance on hardware currently running 64-bit intel or athlon processors. Other new built-in features include Xorg 7.3, KDE 3.5.8, a new system updater tool, improvements to the PBI Removal and WiFi tools, BSSID support and improved SSID support, a new sound detection program, and a new PBI icon preview library.

 

The availability of 64-bit processor support translates into faster performance for those users currently running 64-bit athlon or intel x86_64 systems”, says Kris Moore, Director of PC-BSD Software Development. “This support, coupled with the other new features found in this release, ensures that PC-BSD Edison Edition will be the most advanced desktop operating system of its time.”

Download Links :

  1. Release notes
  2. Changelog

Unix

Upgrade Dovecot 1.0.10 to 1.0.13

Recent ports update give old ports that need to update.

Dovecot

After upgrade to 1.0.13

mail# pkg_info | grep dovecot
dovecot-1.0.13      Secure and compact IMAP and POP3 servers

I see confirmation from dovecot :

Warning: mail_extra_groups setting was often used insecurely so it is now deprecated,

use mail_access_groups or mail_privileged_group instead

Maybe I’m wrong, try restart dovecot service.

mail# /usr/local/etc/rc.d/dovecot restart

Stopping dovecot.
Waiting for PIDS: 42620.
Starting dovecot.

Warning: mail_extra_groups setting was often used insecurely so it is now deprecated, use mail_access_groups or mail_privileged_group instead

still same message, after read the conf . I decide to find the keywords in conf.

mail# ee /usr/local/etc/dovecot.conf

change the line:

# Grant access to these extra groups for mail processes. Typical use would be
# to give "mail" group write access to /var/mail to be able to create dotlocks.
#mail_extra_groups =
mail_extra_groups = mail

into :

mail_access_groups = mail

trying restart service :

mail# /usr/local/etc/rc.d/dovecot restart

Stopping dovecot.
Waiting for PIDS: 43112.
Starting dovecot.

Great, time to find out what is that mean icon smile Upgrade Dovecot 1.0.10 to 1.0.13

Unix

FreeBSD 7 update with csup

FreeBSD 7 released in perfect time, as my backup server need to upgrade I’m eager to choose FreeBSD 7.0RC2, then update to FreeBSD 7 RC3 and now in progress to change for RELENG_7 tag using csup. Yes, I use csup not cvsup.

Another plan with FreeBSD 7.0 is try ZFS filesystem. already se zfs.ko in the lists icon smile FreeBSD 7 update with csup

Very good improvement and thank you for great work guys.

I love FreeBSD.

Unix

Pfsense 1.2 and DragonFlyBSD 1.12

What a day, two great iso launch in same day icon smile Pfsense 1.2 and DragonFlyBSD 1.12

DragonFlyBSD reach the 1.12 number and planned to release it’s 2.0 with Hammer filesystem.

Pfsense getting mature and reach 1.2.

Quick link for download :

DragonFlyBSD : Here

PfSense : Here

Download time guys icon smile Pfsense 1.2 and DragonFlyBSD 1.12

Unix

Hammer Filesystem update, waiting for FreeBSD 7.0

Hammer filesystem updated, from Matt :

HAMMER continues to progress well.  The blockmap is in good shape   and I am moving on to the next item on the list.  All major functions  work and appear to be stable.

    Three items are needed for an ‘alpha’ release:

    * garbage collection code.  This will be responsible for re-optimizing   the filesystem by scanning the B-Tree and copying data out of partially  free big-blocks, allowing those blocks to be freed.

    * undo fifo (‘instant’ recovery after a crash).  This will handle  all normal crash recovery cases.
      Because data is not overwritten the undo fifo only needs to record meta-data changes such as B-Tree operations, volume header updates,  blockmap updates, and so forth.  Some minor buffer order will also
      be needed to flush the undo data before flushing the actual change, but its a lot easier then ordering requirements for the original design.

    * hard-core recovery code.  This will scan the whole filesystem and guarantee that everything is in a sane state.  Even if it is never supposed to be needed you can’t release a filesystem without a  utility which does this.

    I am not quite calling for testing yet, but please feel free to play around with it with the provisio that there is no crash recovery or  garbage collection code in-place yet.

Meanwhile FreeBSD 7.0 already reach ‘release’ in my testing box, next testing maybe freebsd 8.0 bleeding edge icon smile Hammer Filesystem update, waiting for FreeBSD 7.0

Go..go..go!

Unix

postfixadmin and mysqli

I just don’t know exact step I’ve done when I see this error message when I try to access postfixadmin :

DEBUG INFORMATION:
MySQL 4.1 functions not available!
database_type = ‘mysqli’ in config.inc.php, are you using a different database?

Please check the documentation and website for more information.

The email server already run for almost 8 months, maybe latest upgrade to mysql 5.0.51a make that issue happened.

I try to see mysqli support from phpinfo(), I see no mysqli module found icon sad postfixadmin and mysqli

mysql 5051a postfixadmin and mysqli

Maybe I just deinstall php5-mysqli support :

mail# pkg_info | grep mysql
mysql-client-5.0.51a Multithreaded SQL database (client)
mysql-server-5.0.51a Multithreaded SQL database (server)
p5-DBD-mysql-4.006  MySQL driver for the Perl5 Database Interface (DBI)
php5-mysql-5.2.5_1  The mysql shared extension for php
php5-mysqli-5.2.5_1 The mysqli shared extension for php

Wrong, I still see php5-mysqli-5.2.5_1 but not exist in phpinfo() output.

or maybe I just remove the support from extensions :

mail# cd /usr/local/etc/php
mail# ls
extensions.ini
mail# cat extensions.ini | grep mysqli
extension=mysqli.so

No, I still see tthe extension.

last option : reinstall the module

mail# cd /usr/ports/databases/php5-mysqli
mail# make deinstall
===>  Deinstalling for databases/php5-mysqli
===>   Deinstalling php5-mysqli-5.2.5_1
pkg_delete: package ‘php5-mysqli-5.2.5_1′ is required by these other packages
and may not be deinstalled (but I’ll delete it anyway):
php5-extensions-1.1
postfixadmin-2.1.0_7
mail#
mail# make clean
===>  Cleaning for php5-mysqli-5.2.5_1
mail# make install

mail# apachectl graceful

try to view again from phpinfo() output :

mysqli 5051a postfixadmin and mysqli

Great to see you again buddy icon smile postfixadmin and mysqli

Welcome back mysqli icon wink postfixadmin and mysqli

Unix

make.conf and fetch problem

Just stupid error but take me a few days to sort it out.

Basically we have two gateway, A and B. I use to tell fetch in freebsd to use connection from gateway A for updating ports since gateway A have faster connection than gateway B.

Due to the change of IT policy, I no longer can use gateway A, we separate the network physically.

I don’t realize that when updating ports came :

proxy# csup -g -L2 ports-supfile

………………………………………………

Delete ports/x11-wm/xfce4-wm/files/patch-display.c
 Delete ports/x11-wm/xfce4-wm/files/patch-display.h
 Delete ports/x11-wm/xfce4-wm/files/patch-hint.c
 Delete ports/x11-wm/xfce4-wm/files/patch-hint.h
 Edit ports/x11-wm/xfce4-wm/pkg-plist
  Add delta 1.19 2008.02.12.18.11.03 oliver
Shutting down connection to server
Finished successfully

Fetchindex time :

proxy# make fetchindex

fetch: http://www.FreeBSD.org/ports/INDEX-6.bz2: Operation timed out
fetch: http://www.FreeBSD.org/ports/INDEX-6.bz2: Operation timed out

Until I realize about my make.conf:

proxy# cat /etc/make.conf

 

# added by use.perl 2007-10-08 16:42:06
without_11x="YES"
PERL_VER=5.8.8
PERL_VERSION=5.8.8
FETCH_ENV=http_proxy=http://proxy:$%#fert@10.10.12.10:3128

I forgot the line of FETCH_ENV icon sad make.conf and fetch problem

Quick solution for this case is mark it as comment by put # in front of the line.

#FETCH_ENV=http_proxy=http://proxy:$%#fert@10.10.12.10:3128

and save the file.

proxy# make fetchindex

/usr/ports/INDEX-6.bz2                        100% of 1152 kB   48 kBps 00m00s

sighhh, I just blame my pf.conf already icon smile make.conf and fetch problem

Just for sharing.

Have a nice weekend.

 

Linux Unix

Dnscache access little secret

My friend just install dns server using djbdns, he use two component in djbdns:

  • tinydns
  • dnscache

After follow all setup in tutorial, he try to test the dnscache :

mail# dig yahoo.com

; <<>> DiG 9.3.4-P1 <<>> yahoo.com
;; global options:  printcmd
;; connection timed out; no servers could be reached
mail#
read more »