Archive

Archive for October, 2010

minimal dovecot.conf for OpenBSD -updated

October 15, 2010 Leave a comment

Here is a minimal dovecot.conf for OpenBSD.

protocols = imaps pop3 imap
protocol pop3 {
listen = *:110
}
ssl_cert_file = /etc/ssl/dovecotcert.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
login_process_per_connection = no
disable_plaintext_auth = no
auth default {
mechanisms = plain login
passdb bsdauth {
}
userdb passwd {
}
user = root
}
dict {
}
plugin {
}

Advertisements
Categories: Uncategorized

procmail (with postfix) Could'nt create "/var/mail/nobody"

October 11, 2010 Leave a comment

If your using procmail with Postfix you may get this error. You can correct it this way.

Procmail requires a legitimate user to receive mail. User “nobody” is not a legitimate user. In order to have
this work you must either run procmail as root or setuid root. To have procmail run a setuid root, chmod
4755 /usr/bin/procmail.

Categories: sysadmin

procmail (with postfix) Could’nt create “/var/mail/nobody”

October 11, 2010 Leave a comment

If your using procmail with Postfix you may get this error. You can correct it this way.

Procmail requires a legitimate user to receive mail. User “nobody” is not a legitimate user. In order to have
this work you must either run procmail as root or setuid root. To have procmail run a setuid root, chmod
4755 /usr/bin/procmail.

Categories: sysadmin

yum update fails

October 11, 2010 Leave a comment

If you are trying to update with yum and get a dependency failure, here is a solution that can
work. For example, if you get a dependency failure when trying to update perl, try this:
yum downgrade perl, after perl is downgrades, then run yum update. Most likely, perl will
update itself to the newest version. This works sometimes when you have used a different repo
or installed a version out of sync with the repository.

Categories: Uncategorized

fix dovecot error dovecot:Failed:listen (0.0.0.0,995) failed Address already in use

October 11, 2010 Leave a comment

You can find conflicting ports with the lsof command. Use lsof -i :143 for instance to find what
is using imap port 143. If you find a conflict, then you just have to eliminate the conflict.
This error was caused on my system by the presence of the rpc.stated daemon. To disable
simply run chkconfig nfslock off and restart your system. Strangely, when I dovecot started
normally, you could then start the rpc.stated daemon without conflict. I left it disabled however
as I didn’t need it on that system.
Another handy utility for a Centos system is ntsysv. This gives you a gui view of daemons on
your system and the ability to turn them on or off.

Categories: sysadmin

resize xen image

October 11, 2010 Leave a comment

To resize a xen image, follow these steps.
First make a backup copy of the image, ie cp xen.image, xen.image.backup then
dd if=/dev/zero of=[image_name] bs=1 count=1 seek=20G conv=notrunc
where seek=[size in GB]
then, e2fsck -f [image_name}-y
and finally
resize2fs -p [image_name]
You should then be able to boot the new image with the new size.

Categories: sysadmin

Edit dns records with sed or vi (search and replace)

October 11, 2010 Leave a comment

You can easily replace an existing IP with and new IP in a dns record using sed. Here is the way
you do it.
sed -e ’s#xx.xx.xx.xx#yy.yy.yy.yy#g’ domain.com > new.domain.com
where xx.xx.xx.xx is the existing IP and yy.yy.yy.yy is the new IP
Using vi is similar. Here is the syntax:
vi yourzone.com . For instance, to change IP addresses:
<ESC>
:%s/xxx.xxx.xxx.xxx/yyy.yyy.yyy.yyy/g (where xxx is original IP and yyy is new IP)
<ESC> ZZ (to save file)

Categories: sysadmin