Jun 21

Run:

dumpe2fs -h /dev/sda1

or

tune2fs -l /dev/sda1

where /dev/sda1 is you partition, and search for Block size:

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: ,

Apr 16

1.  Type about:config in Firefox location bar and press Enter

2.  Double-click on Preference.Name and change the value.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: , , ,

Mar 10

I have qmailtoaster installation so my users are in:

/home/vpopmail/domains/DOMAIN.XXX/USER

you need two create two file:

first called “mailfilter” can be put wherever you want (this file will be in .qmail file), me  I choose:

/home/vpopmail/domains/

so now I have:

/home/vpopmail/domains/mailfilter

second called “.qmail” must be pun in user folder in the same dir with Maildir folder, like this:

/home/vpopmail/domains/MYDOMAIN.XXX/USER/.qmail

File contents are:

.qmail

|preline /usr/bin/maildrop /home/vpopmail/domains/mailfilter

mailfilter

SHELL=”/bin/bash”
import EXT
import HOST
logfile “/var/log/maildrop/mailfilter.log”
USERHOME=`/home/vpopmail/bin/vuserinfo -d $EXT@$HOST`
if (/^Subject:.*\[SPAM\]/:h)
{
log “WE got a SPAM, moving mail to spam directory $USERHOME/Maildir/.Junk”
DUMMY=`test -d $USERHOME/Maildir/.Junk`
#if .Junk folder exists
if ( $RETURNCODE == 0 )
{
to “$USERHOME/Maildir/.Junk”
}
else
{
log “No Junk directory in $USERHOME/Maildir”
to “$USERHOME/Maildir/”
}
}
else
{
to “$USERHOME/Maildir/”
}

This works for users in witch dirs you put .qmail file. If you want for whole domain you must use :

/home/vpopmail/domains/MYDOMAIN.XXX/.qmail-default file instead of .qmail in user directory.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: , , ,

Jan 30

First locate simcontrol file at /var/qmail/control

The default file looked like this:

:clam=yes,spam=yes,spam_hits=10,attach=.mp3:.src:.bat:.pif:.exe

If you want to just stop spam processing for a single user you have to put:

user@domain.com:clam=yes,spam=no,spam_hits=10

in front of existing line, result:

user@domain.com:clam=yes,spam=no,spam_hits=10
:clam=yes,spam=yes,spam_hits=10,attach=.mp3:.src:.bat:.pif:.exe

for an entire domain just put:

domain.com:clam=yes,spam=no,spam_hits=10

Save an run #qmailctl cdb

 

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: , , , ,

Jan 27

qmail + SPAMD +FC12 error:

 error: Can’t locate Crypt/OpenSSL/Bignum.pm in @INC (@INC contains: /usr/lib/perl5/vendor_perl/5.10.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.10.0 /usr/
local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi /usr/local/lib/perl5/site_perl/5.10.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.10.0/i386-linux-thread-multi /usr/lib/perl5/5.10.0 /usr/lib/perl5/si
te_perl) at /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/Crypt/OpenSSL/RSA.pm line 17.

solution: run cpan and install Crypt::OpenSSL::Bignum module.

> cpan

>install Crypt::OpenSSL::Bignum

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: , , ,

Jan 26

if you want to modify qmailadmin to check if new password is strong you can do like this:

edit qmailadmin.c and:

add:   #include <ctype.h>

I wrote a function to check if new password contains at least 1 alphachar and 1 digit.

add it before int main(argc,argv)


int check_strong(char *pass_string)
{
    int digit=0;
    int alpha=0;
    int length=strlen(pass_string);
    int i;
    for(i=0;i<length;i++){
       if( digit == 1 && alpha == 1 ) return 1;
       else{
                  if(isdigit(pass_string[i])) digit=1;
                  if(isalpha(pass_string[i])) alpha=1;
       }
    }
    return 0;
}
Continue reading »

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: , , , ,

Jan 26

#!/bin/bash
for x in `find * -maxdepth 0 -type d`;
do
  # Translate Caps to Small letters
  y=$(echo $x | tr ‘[A-Z]‘ ‘[a-z]‘);

  # check if directory exits
  if [ ! -d $y ]; then
     echo “mv $x $y”
     mv $x $y;
  fi
done

NOTE: -maxdepth 0 is for directories in curent dir. If you want to rename in depth use -depth instead

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay
  • Add to favorites
  • LinkedIn
  • Live
  • StumbleUpon
  • Yahoo! Buzz

written by MG \\ tags: , , , ,