This site is now 100% read-only, and retired.

XML Logo

Posted by Grimnar on Mon 22 Jan 2007 at 14:01
Tags: none.
While I was working on this I found out I had a broken courier-webadmin package. So I figured updating that package would not cause any damage. And was I wrong. No all the sudden no one can connect to my mail server. The server can recieve mail. But no one can login.

So I figured my MTA is working, but my imap/pop3 server are screwed up. IE Courier is damaged. Now I use vexim to add users and vexim comes with some changes to /etc/courier/imapd - pop3d. All been detailed at the homepage.

Now im pretty sure I done the right modifications to imapd and pop3d. But I still cannot login and get mail. What could be wrong? /var/log/mail.log

Jan 22 14:47:34 servar couriertcpd: LOGIN: ip=[::ffff:82.221.100.31], command=LOGIN
Jan 22 14:47:34 servar couriertcpd: LOGIN: ip=[::ffff:82.221.100.31], username=postmaster@spbk.no
Jan 22 14:47:34 servar couriertcpd: LOGIN: ip=[::ffff:82.221.100.31], password=somepasswd
Jan 22 14:47:34 servar courierpop3login: LOGIN FAILED, user=user@domain.net, ip=[::ffff:82.221.100.31]
/etc/courier/pop3d
IDFILE=/var/run/courier/pop3d.pid
MAXDAEMONS=40
MAXPERIP=4
#AUTHMODULES="authdaemon"
AUTHMODULES="authmysql"
AUTHMODULES_ORIG=""
DEBUG_LOGIN=2
#POP3AUTH="LOGIN CRAM-MD5 CRAM-SHA1 MD5"
POP3AUTH="md5"
POP3AUTH_ORIG="LOGIN CRAM-MD5 CRAM-SHA1"
POP3AUTH_TLS=""
POP3AUTH_TLS_ORIG="LOGIN PLAIN"
PORT=110
ADDRESS=0
TCPDOPTS="-nodnslookup -noidentlookup"
POP3DSTART=YES
MAILDIRPATH=Maildir
vexim uses mysql to authenticate users. pop3d is altered to do this. What can be wrong? I tried the vexim maillists but no response. :/

 

Posted by Grimnar on Sat 20 Jan 2007 at 13:53
It's me again!:)

This time I'm wondering if there are anyone with some experience with monitoring
spamd and clam. I guess I can use the good old terminal and such. But since I have fetish for great webstats, im looking for this.

Tried some searches but found about nothing for spamd/clam-av for debian. Maybe im blind, but I did not find any. And since I'm at work for the rest of this weekend this should be a great read on Sunday night.

Any other tips on spamassassin and clam-av are welcome as well. Since I installed the programs a couple days ago, I haven't got the time to really to check it out. I always find my own little prosjects and never have the time to follow 'em through.

The stats im looking for is like a dayli output of a folder scan and such, very easy. Sure, if anything else fails I could go for a 'scan -v /some/folder > /var/www/output.txt' but...

Cheers

Andreas

 

Posted by Grimnar on Sun 14 Jan 2007 at 23:10


Basic perl/bash help again.
I'm looking for a tiny script to rename one file, and that file is a webcam image that needs to be save every minute or so. That can be done in crontab.

So I'm really searching for the script to take /some/folder/webcam.jpg and make it /some/folder/webcam-TT-DD-YY.jpg

Found some old scripts wich are not working for me, I'm serious the worst bash/perl user ever!

The webcam image updates it self every 5 second. And after a couple of months I will make a time lapse video of my backyard. Pretty neat, eh?

And yeah, I've done a really extensive web search.

 

Posted by Grimnar on Wed 20 Dec 2006 at 23:30
Tags: , ,
I found this funny mrtg config. It tracks stocks. And just for fun I was going to track apple (APPL). Now I had to edit a perl script to make it work.
#!/usr/bin/perl -w

# getstock.pl nate (mrtg@aphroland.org) http://howto.aphroland.de/HOWTO/MRTG
#
# This script connects to finance.yahoo.com and gets a stock quote for the
# ticker symbol specified on the command line. The result is multiplied by
# 100 so MRTG can deal with it.
#

use LWP;

$stock = $ARGV[0];
$browser_agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021029 Phoenix/0.4";

unless ( $stock ) {
        die "Please specify a stock ticker symbol!\n";
        }

$url = "http://finance.yahoo.com/d/quotes.csv?s=$stock&f=nl1d1t1c1vw&e=.csv";

$browser = LWP::UserAgent->new();
$browser->agent("$browser_agent");
$stock_quote = $browser->request(HTTP::Request->new(GET => $url));
if ($stock_quote->is_success) {
        @quote = split(/,/,$stock_quote->content);
        } else {
        die "Could not retrieve quote, exiting!\n";
        }

print $quote[1] * 100 . "\n";
print $quote[1] * 100 . "\n";

Where should I add APPL? (This is the ticker symbol, right?) Help help help:)

 

Posted by Grimnar on Sun 10 Dec 2006 at 15:57
Tags: none.
Oh well. My debian server starts acting up, whenever connecting to it the system lags a lot.
Everything is sluggish. So I do a df -h and sure enough, my /dev/hda1 is full.
So I start my quest of finding files that are unused in the system.
Been working on dpkg -l to find some files that can be removed. But that is a pain in the ass on a slow interface.

Is there any other nice methods of finding unused files?
Or removing a whole lot of files with dpkg in one go?
Tried the find / -type f -size +20000k and so on.

/var/log = empty
/var/archive/apt/ = empty

Any other sure places to remove stuff?
Edit: Linux gwdebian 2.6.17-2-k7 #1 SMP Wed Sep 13 17:18:46 UTC 2006 i686 GNU/Linux

 

Posted by Grimnar on Sun 10 Dec 2006 at 15:46
Tags: none.
Oh well. My debian server starts acting up, whenever connecting to it the system lags a lot.
Everything is sluggish. So I do a df -h and sure enough, my /dev/hda1 is full.
So I start my quest of finding files that are unused in the system.
Been working on dpkg -l to find some files that can be removed. But that is a pain in the ass on a slow interface.

Is there any other nice methods of finding unused files?
Or removing a whole lot of files with dpkg in one go?
Tried the find / -type f -size +20000k and so on.

/var/log = empty
/var/archive/apt/ = empty

Any other sure places to remove stuff?

 

Posted by Grimnar on Tue 21 Nov 2006 at 11:04
Tags: , ,


Kernels. And kernel update

Updating kernels on a remote server is the worst tasks I rarely encounter. But it has to be done. This time I was going to install mrtg on a server and startet with install gcc make g++. Then I saw this:

You might want to run `apt-get -f install'
to correct these.
The following packages have unmet dependencies: 
  kernel-image-2.6.8-1-386: Depends: initrd-tools
 (>= 0.1.63)  but it is not installed
And just a few moments I was faced with this:
 You are running a kernel (version 2.6.8-1-386)
 and attempting to remove the same version. 
 This is a potentially disastrous action. Not only
 will /boot/vmlinuz-2.6.8-1-386 be removed, making
 it impossible to boot it,
 (you will have to take action to change your 
 boot loader to boot a new kernel),
 it will also remove all modules under the directory 
 /lib/modules/2.6.8-1-386. Just having a copy of 
 the kernel image is not
 enough, you will have to replace the modules too.

    I repeat, this is very dangerous. If at all in doubt, 
    answer no. If you know exactly what you are doing,
    and are prepared to hose your system, then answer Yes.

I got very worried and pressed of course 'no'. Then continued to DA for some help on this. Just to make sure my server will boot up again without me traveling 200 metric miles. Or having the hosting company fix it with tremendous costs.

Now, I know I've been a bit lazy with this server and never updating it, (only security) but I was waiting on a hardware update that never happend. So today I have all day with nothing to do so I figured I should fire up the ol'terminal and do some work.

It's a 933mhz P3 with a 2.6.8-1-386 kernel. Wich I guess is getting a bit old theese days. sources.list tells me it uses testing. (OK, I never understand the build names)

So in other words, I need a newer kernel. And making sure the system will boot up again.

Anyone have a few moments to help me out. (Again!)

(Atleast im installing mrtg on my own:D)

 

Posted by Grimnar on Fri 17 Nov 2006 at 14:30
Tags: none.
For everyone who loves to monitor their debian, I found saidar. Reminds me of a light iptraf monitor. Works great for my use.

 

Posted by Grimnar on Wed 15 Nov 2006 at 14:17
Tags: none.
Today I was doing this" rel="nofollow">http://www.debian-administration.org/users/Grimnar/weblog/13">this; and came to a point where I was suppose to reboot. Did that and now none of my network devices works? what the hell happend and how do I fix them?

Only get this messages.

eth0: error fetching interface information: Device not found

This happens to all my devices (2). The used to work flawlessy and no troubles at all.

How can I remedy this without re-install? Since the server is my gateway im kinda in a rush after a bad day at work.

Luckily I live in a appartment complex and thus still have some kind of wlan to "borrow" in the mean time.

 

Posted by Grimnar on Tue 14 Nov 2006 at 16:36
Tags: ,
I bought my self a WD MyBook and I was hoping to mount it on my debian server. Of course I could use windows or osx to do this. But since I have Debian running 24/7 I would really like that to work instead.

Why did I go for WD or USB 2.0 and not other brands and network storage is not the issue here.

But what kind of file system is preferred to have on such disks? I would really like a filesystem that *all* OS can write on, and not only linux. The disk will be used for a secondary backup for all my photos. And when I have the system up and running I'm hoping for a rsync line wich updates the files every day or something like that, in order to keep it 100% mirrored without me bothering with it. So, How do I mount it, and what FS to use?

Edit Are there any precautions I need to understand before doing this? Cause my main goal is to have a very safe and clean backup disk. Will a powersurge mount the disk properly on reboot? Can I destroy the FS on a surge? I'm kinda paranoid when it comes to backing up my pictures. (Of course, I have them all on dvd/other disks as well) But there is one thing I never run out of, and that is bad luck. So better safe than sorry.