Thursday, July 22, 2010

Fetchmail Error Query status=4

If you have received the following at the time of

# fetchmail

fetchmail: client/server protocol error while fetching from test@****.net@pop.***.**oo.com
fetchmail: Query status=4 (PROTOCOL)

Correct the configuration file .fetchmailrc for the corresponding user.

Remove  the line
   auth SSH
from the above mentioned file.

Wednesday, July 21, 2010

Installing Postfix as a SMTP Client with SASL

Steps to Follow

1. Uninstall installed postfix
   # rpm -e postfix
 
   Or Remove all directories for postfix

2. Download and Install Cyrus-sasl

   http://cyrusimap.web.cmu.edu/downloads.html

   # tar -xvf cyrus-sasl-2.1.23.tar
   # ./configure
   # make
   # make install  

3. Create symbolic link  for /usr/local/lib/sasl
  
   #ln -s /usr/local/lib/sasl2/ /usr/lib/sasl2


4. Create user postfix

5. Create group postdrop


6. Download and Install Postfix
   http://www.postfix.org/download.html

   # tar postfix-2.7.1.tar
   # make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL  -I/usr/local/include         /sasl"  AUXLIBS="-L/usr/local/lib -lsasl2"

7.   Add these lines into main.cf with other basic configuration
     smtp_sasl_auth_enable = true
     relayhost = [smtp.bizmail.yahoo.com]
     smtp_sasl_ password_maps = hash:/etc/postfix/sasl_passwd

8.  Create new file /etc/postfix/sals_passwd with the following details.

    [smtp.***mail.****.com] arun@****.net:Non


9.   Run postmap /etc/postfix/sasl_passwd


10.    Check  for postfix support for SASL with the following command
     #  postconf -a
        cyrus
       
        If it lists cyrus then everything perfect.

11.     Finally run postfix
     # /etc/postfix/bin/postfix start

Linux Symbolic link

Create symbolic link  /usr/test
ln -s /usr/test  [shortcutname]

remove links
rm /var/something/symlink

find symbolic link files
1) find . -lname '*sysdep.c
2) ls -latR | grep 'lw'