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

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 »

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

written by MG \\ tags: , , , ,

Jan 18

problem:

./load ezmlm-gate subdb.a getconf.o slurpclose.o slurp.o \
getopt.a getln.a auto_bin.o env.a sig.a fs.a \
strerr.a substdio.a stralloc.a alloc.a error.a str.a case.a wait.a \
open.a lock.a seek.a -L/usr/lib64/mysql -lmysqlclient -lnsl -lm -lz
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make: *** [ezmlm-gate] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.578TXA (%build)

check if you have:

 /usr/lib64/mysql

if not, make a link :

 ln -s /usr/lib/mysql/ /usr/lib64/

 in /usr/lib/mysql/  you must have something like this:

 libmysqlclient.a
 libmysqlclient_r.a
 libmysqlclient_r.so -> libmysqlclient_r.so.16.0.0
 libmysqlclient_r.so.16 -> libmysqlclient_r.so.16.0.0
 libmysqlclient_r.so.16.0.0
 libmysqlclient.so -> libmysqlclient.so.16.0.0
 libmysqlclient.so.16 -> libmysqlclient.so.16.0.0
 libmysqlclient.so.16.0.0

written by MG \\ tags: , , ,

Jan 07

Error:

/download/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_toGDImage’:
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function)
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported only once
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function ‘zif_ffmpeg_frame_ffmpeg_frame’:
/download/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: ‘PIX_FMT_RGBA32′ undeclared (first use in this function)
make: *** [ffmpeg_frame.lo] Error 1

Solution:

1. Open the file “/ffmpeg-php-0.5.0/ffmpeg_frame.c”

1. Replace all PIX_FMT_RGBA32 with PIX_FMT_RGB32

written by MG \\ tags: , , , ,

Nov 23

SSHD has a little bug when do you want to use ClientAliveCountMax in combination with ClientAliveInterval, so if you want to work try this:

TCPKeepAlive yes
ClientAliveInterval 3600
ClientAliveCountMax 0

this should disconnect iddle session older then 1h.

written by MG \\ tags: , , ,

Oct 01

Add MX records to your DNS like this:

10 mail.yourdomain.com
20 backup.yourdomain.com

You will also need to add DNS entries that correspond with the new server so that backup.yourdomain.com points to the IP address of your back-up mail server.

When the mail server at the IP address relating to mail.yourdomain.com is not available mail will be sent to backup.yourdomain.com

and then add the following line in /etc/mail/mailertable:

yourdomain.com smtp:mail.yourdomain.com

Next we need to add this to the mailertable database.
Type:
# makemap hash /etc/mail/mailertable.db < /etc/mail/mailertable

And then append the following lines to the bottom of your access file.

To:yourdomain.com RELAY

Now you should have something like this:
# by default we allow relaying from localhost…
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
To:yourdomain.com RELAY

now run:
makemap hash /etc/mail/access.db < /etc/mail/access

Now restart the sendmail service to make the changes complete
Type:
# service sendmail restart

written by MG \\ tags: , ,