You need to be Payday Loans UK Why would you

Postfix problem with maildrop courier-authlib (user unknown. Command output: Invalid user specified.)

I’ve recently updated installed ports by the use of portupgrade. After that I was found problem with my MTA system (Postfix) out of order:

When I sended message to some e-mail on server (postfix clients in mysql) I saw that in maillog:
postfix/pipe[5895]: 6201FE37CE7: to=<anton@howtobsd.com>, relay=maildrop, delay=0.04, delays=0/0/0/0.03, dsn=5.1.1, status=bounced (user unknown. Command output: Invalid user specified. )
To senter returned answer from my server:

“This is the mail system at host mail.howtobsd.com.

I’m sorry to have to inform you that your message could not
be delivered to one or more recipients. It’s attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

: user unknown. Command output: Invalid userspecified.

Reporting-MTA: dns; mail.howtobsd.com
X-Postfix-Queue-ID: 8B7C5E37C5A
X-Postfix-Sender: rfc822; anton_paluhin@gmail.com
Arrival-Date: Wed, 28 Apr 2010 15:45:24 +0300 (EEST)

Final-Recipient: rfc822; anton@howtobsd.com
Original-Recipient: rfc822;anton@howtobsd.com
Action: failed
Status: 5.1.1
Diagnostic-Code: x-unix; Invalid user specified.

I checked maildrop…

#maildrop -v
Copyright 1998-2005 Double Precision, Inc.
GDBM/DB extensions enabled.
Maildir quota extension are now always enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.

I have thought it have to be buit with courier-authlib:

#cd /usr/ports/mail/maildrop && make deinstall
#vim /usr/ports/mail/maildrop/Makefile

uncomment line: WITH_AUTHLIB=yes

#maildrop -v
Copyright 1998-2005 Double Precision, Inc.
GDBM/DB extensions enabled.
Courier Authentication Library extension enabled.
Maildir quota extension are now always enabled.
This program is distributed under the terms of the GNU General Public
License. See COPYING for additional information.

It’s Ok!Trying send message and check (in log new problem):

postfix/pipe[59663]: 23414E37EC3: to=, relay=maildrop, delay=24, delays=24/0/0/0.07, dsn=4.3.0, status=deferred (temporary failure. command output: ERR: authdaemon: s_connect() failed: Permission denied /usr/local/bin/maildrop: Temporary authentication failure.)

check rights:
# cd /usr/local/bin/ && la -la | grep maildrop
-rwxr-xr-x 1 root mail 1239752 Apr 29 10:12 maildrop

it is need +s (edit rights) :

# ls -la /usr/local/bin/ | grep maildrop
-rwsr-xr-x 1 root mail 1239752 Apr 29 11:53 maildrop

And after that manipulation maildrop can transport mail in boxes…

Software RAID-1 on FreeBSD gmirror howto

freebsd geom mirror howto

I did RAID-1 on the FreeBSD 7.1-RELEASE with two identical HDD – WD15EARS (1,5Tb)
I think you can use any hhd on condition that firs device have to be smoller size than second.

in my case:
- FreeBSD detect it as ad10 and ad16
- System has been installed in ad10 (with standard boot loader)

Before starting you have to do this:
howtobsd#sysctl kern.geom.debugflags=16

next you can add you device where has installed your system (In my situation it is ad10)

howtobsd#gmirror label -v -b round-robin gm0 /dev/ad10
Metadata value stored on /dev/ad10.
Done.

and add kernels module gmirror:

howtobsd#echo geom_mirror_load="YES" >> /boot/loader.conf

I’d advice you to backup your current version of fstab before editing:

howtobsd#cp /etc/fstab /etc/fstab.backup

edit your fstab-file very carefully.
howtobsd#vim /etc/fstab

you have to change /dev/ad10xxx on /dev/mirror/gm0xxx – (very carefully! you mustn’t forget “/mirror“)

my fstab before:
# Device Mountpoint FStype Options Dump Pass#
/dev/ad10s1b none swap sw 0 0
/dev/ad10s1a / ufs rw 1 1
/dev/ad10s1d /tmp ufs rw 2 2
/dev/ad10s1e /usr ufs rw 2 2
/dev/ad10s1f /var ufs rw 2 2
/dev/ad10s1g /vol1 ufs rw 2 2
/dev/ad10s1h /vol2 ufs rw,userquota 2 2

my fstab after:
# Device Mountpoint FStype Options Dump Pass#
/dev/mirror/gm0s1b none swap sw 0 0
/dev/mirror/gm0s1a / ufs rw 1 1
/dev/mirror/gm0s1d /tmp ufs rw 2 2
/dev/mirror/gm0s1e /usr ufs rw 2 2
/dev/mirror/gm0s1f /var ufs rw 2 2
/dev/mirror/gm0s1g /vol1 ufs rw 2 2
/dev/mirror/gm0s1h /vol2 ufs rw,userquota 2 2

going to reboot

and finally add second hdd in raid massive:

howtobsd#gmirror insert gm0 /dev/ad16

at this moment system started background mirroring
you can check status of rebuilding:
howtobsd# gmirror status
Name Status Components
mirror/gm0 DEGRADED ad10
ad16 (0%)

or more verbose:

howtobsd# gmirror list
Geom name: gm0
State: DEGRADED
Components: 2
Balance: round-robin
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 2858761865
Providers:
1. Name: mirror/gm0
Mediasize: 1500301909504 (1.4T)
Sectorsize: 512
Mode: r8w7e8
Consumers:
1. Name: ad10
Mediasize: 1500301910016 (1.4T)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 1691608728
2. Name: ad16
Mediasize: 1500301910016 (1.4T)
Sectorsize: 512
Mode: r1w1e1
State: SYNCHRONIZING
Priority: 0
Flags: DIRTY, SYNCHRONIZING
GenID: 0
SyncID: 1
Synchronized: 0%
ID: 1437675374

Synchronization can go on a long time (in my case about 7 hours)

Congratulate! When synchronized obtain 100% you can cut off one of your hdd and try to boot system for checking efficiency of RAID1 massive.

Oh…at last…
If one of your HDDs out of order – replace defective HDD and give command:

howtobsd#gmirror forget gm0
howtobsd#gmirror insert gm0 /dev/ad16

Installing Ruby on Rails on FreeBSD

I suppose apache, mysql-server alredy installed and working properly.

if ruby hasn’t installed yet:

# cd /usr/ports/lang/ruby18/
# make install clean

install rails x.x.x:
# cd /usr/ports/www/rubygem-rails
# make install clean

install mysql gem:
# /usr/local/bin/gem install mysql

install passenger:
# cd /usr/ports/www/rubygem-passenger
# make install clean

in apache config(httpd.conf):
# For ruby (passenger)
LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.9
PassengerRuby /usr/local/bin/ruby18

you should check version (bold in text) of passenger and change to yours. It could become obsolete at that point in time.

after that add Visrual host in apache with point “../public”  of your project, restart apache and going to be happy :)

How to movie a Subversion Repository to Another Server.

It’s also possible for create copyes svn repositoryes or create svn backups.

$svnadmin dump /svnroot/repository > name.dmp

After that you can compress dump file and get it to your server where you want create copy of you repository.
Create a new repository:

$svnadmin create /svnroot/repository

import dump in new repository
$svnadmin load /svnroot/repository < name.dmp

Also you should to be shure you repository whis svn owner:

$chown -R svn:svn /svnroot/repository

It’s all!

PS: compare you config files.

How to restart apache

restart apache:

apachectl restart

restart without aborting open connections:

apachectl graceful

Monitoring FreeBSD servers by the use of Munin

Article in a nutshell describes installation and configuration Munin on FreeBSD.
With munin you can monitor your servers very easy. Munin also presents output information in graphs through a web interface.

Install munin-main (Munin Collector):

# whereis munin-main
munin-main: /usr/ports/sysutils/munin-main
# cd /usr/ports/sysutils/munin-main
# make install clean

Install munin-node:

# whereis munin-node
munin-node: /usr/ports/sysutils/munin-node
# cd /usr/ports/sysutils/munin-node
# make install clean

#echo 'munin_node_enable="YES"' >> /etc/rc.conf
# /usr/local/etc/rc.d/munin-node.sh start

On default html-files with graphs destination in /usr/local/www/munin/ (You can chenge this in config file /usr/local/etc/munin/munin.conf)
You should configure your web-sever (for example apache) to this directory.
It’s all! Go to your server address and enjoy!!! :)

Create SVN repository

Hello! Today I would like to tell you how to quickly install server subversion (svn) and creat repository. The following instructions applies to install svn in FreeBSD certainly.

SVN (Subversion) is a version control system – useful instrument for developers who works on large-scale project.

I should draw your attention: it isn’t full manual about svn – it is only minimum that should be enough for start.

Install svn from ports system:

$whereis subversion
subversion: /usr/ports/devel/subversion
$cd /usr/ports/devel/subversion
$make install clean

I hope this manipulation well-khown for you.
When install already we add a few line in rc.conf:

svnserve_enable="YES"
svnserve_flags="-d --listen-port=3690"
svnserve_data="/www/svnroot"
svnserve_user="svn"
svnserve_group="svn"

where /www/svnroot folder that will include yours repositories. Make it before start svn.
You should make also svn group and svn user with home root directory:

$pw user add svn -g svn -s /sbin/nologin -d /www/svnroot/

It’s all systems go:

$/usr/local/etc/rc.d/svnserve start
Starting svnserve.

It’s ok! Now creat the repository:

$svnadmin create /www/svnroot/http/

change owner for folders to svn

$chown -R svn:svn /www/svnroot/

You should edit config file to close the anonym access in repository:

vim /www/svnroothome/http/conf/svnserve.conf

uncomment the line

anon-access = none
auth-access = write
password-db = passwd

add to /www/svnroot/http/conf/passwd line like

user = password

and restart svn

$/usr/local/etc/rc.d/svnserve restart

Congratulate yourself! You have just installed subversion and created svn repository.

FreeBSD 7.2 and Silicon Image Sil 3112 SATA Controller

Recently I have happened to set up some services on my brother’s fileserver.
FreeBSD should been worked via PCI SATA Controller(Sil3112)on SATA 1Tb HDD.
FreeBSD 7.2 was installing by a miracle. But it didn’t work properly.
Server was being hang up and restart when hard disk was being use actively (for example: updating ports tree,make installing port’s and especially uploading a big data level via samba).
As it found out this controller don’t work correctly with FreeBSD, although it present in The currently supported ATA/SATA controller chips

How to quickly build a Glassfish on FreeBSD

cvs -d :pserver:john_ts@cvs.dev.java.net:/cvs checkout glassfish/bootstrap

maven -Djava.net.preferIPv4Stack=true checkout

maven -Djava.net.preferIPv4Stack=true bootstrap-all

maven -Djava.net.preferIPv4Stack=true build

maven -Djava.net.preferIPv4Stack=true configure-runtime

It’s all! PS: I should give you one advice – don’t try build glassfish with openjdk6 or diablo-jdk-1.6! I have built it only with diablo-jdk-1.5. If you know how to build glassfish with (openjdk6 or jdk1.6) on FreeBSD let me know.

So begin…

Hello, dear visitor! I am begin this blog because i want progress my experience and writing articles help me in it! I would like to take an interest a lot of people. I will be happy if anybody will have some advantage. PS: I am always ready to have dialogue.