Saturday, November 23, 2013

Install adobe reader on Fedora 19

I've followed instructions from the website page http://www.if-not-true-then-false.com/2010/install-adobe-acrobat-pdf-reader-on-fedora-centos-red-hat-rhel/

I am listing here the exact instructions I've followed.

$ su //change to root user
# rpm -ivh http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-adobe-linux
# yum install nspluginwrapper.i686 AdobeReader_enu

Sunday, November 17, 2013

Postfix email server, SpamAssassin setup on Fedora 19

I wanted to install Postfix from source as the vendor provided rpm packages are not latest release versions and for variety of features Postfix has to be compiled from source with different options. So learning Postfix installation from source is better.

First I wanted to check the MTA's installed on my machine.

$ ls /bin /usr/bin /usr/sbin | sort | uniq | grep -i sendmail //this command displayed only sendmail related entries. It means Sendmail got installed on this machine

$ ls /bin /usr/bin /usr/sbin | sort | uniq | grep -i Postfix //this command returned no entries. This means Postfix binaries are not installed on this machine.

"Unix and Linux System Administration Handbook" "Switching to Postfix" section page 774 explains which Linux distributions ships with which MTA's and the popularity trends of different MTA's.

Now the question arising in my mind is whether installation of an MTA requires uninstallation of existing MTA. I found from "BookOfPostfix" "Switching to Postfix" page 417 that Fedora allows multiple MTA installations to exist simultaneously.

I got the Postfix website link from "BookOfPostfix" "The Postfix Source Code" chapter page 407, which is http://www.postfix.org/. From this website I've downloaded the latest source code postfix-2.10.2.tar.gz to the location /home/jay/Downloads. Following "BookOfPostfix" "Beginning and Installing Source Code" chapter page 408, extracted the source code as below.

$ pwd
/home/jay/downloads

$ tar xfz postfix-2.10.2.tar.gz //this command extracted the source code to the directory /home/jay/Downloads/postfix-2.10.2

For installation instructions Following "BookOfPostfix" page 408, read the /home/jay/Downloads/postfix-2.10.2/INSTALL file for special options. As I don't requires any special features I've run the below commands.

$ pwd
/home/jay/Downloads/postfix-2.10.2

$ su //this is required as all other commands are to be executed as admin

# make makefiles //
No include file found.

I've searched internet for solutions to resolve the above problem. Following http://wowtutorial.org/tutorial/217.html, I've run the below commands.

# yum search db4
# yum install *db4* //websites are saying to intall db*-devel packages only. When I use yum search db*-devel, the results are empty. Based on some other internet search I've specified it as *db4*
# ln -s /usr/include/libdb4/db.h /usr/include/db.h //symbolic link created
# make makefiles //When this is run the default set compiler, which is GCC, builds all the files, linking them using any build options specified.
# make  // now the compiler compiles the build files
/usr/bin/ld : cannot find -ldb


I've rigorously searched the internet. But couldn't find any solution. For resolving the above error, I've run the below commands as the names are matching.

# yum install ldb-tools.x86_64
# ln -s /usr/include/ld /usr/lib64/ldb

# make  // now the compiler compiles the build files
/usr/bin/ld : cannot find -ldb
 
Still getting the same error. I thought like instead of wasting time for installation from source, it is better moving ahead using the rpms provided by the vendor.

# yum install postfix.x86_64 //installs postfix along with dependencies
# ls /bin /usr/bin /usr/sbin | sort | uniq | grep -i Postfix //this time the command returned postfix entries. This confirms Postfix binaries installation on this machine.

Following "BookOfPostfix" page 447, I've executed the below command to change the default MTA for Fedora.

# alternatives --config mta
There are 2 programs which provide 'mta'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.postfix

The above command displays all the installed MTAs. * symbol is displayed against the default MTA. Enter the MTA number to change the default. I've entered 2 and pressed enter. Now upon restart, Fedora starts Postfix MTA instead of Sendmail.

Restart Fedora and enter the below command.

$ ps -ef | grep -i postfix
root       892     1  0 18:14 ?        00:00:00 /usr/libexec/postfix/master -w
postfix    903   892  0 18:14 ?        00:00:00 pickup -l -t unix -u
postfix    904   892  0 18:14 ?        00:00:00 qmgr -l -t unix -u
jay       2520  2365  0 19:01 pts/0    00:00:00 grep --color=auto -i postfix

Following "BookOfPostfix" "Troubleshooting Postfix" chapter page 420, The above output confirms that Postfix has started and running well.

Following "Linux Email Setup" "Choosing Mailbox Format for Local Deliveries" section page 37, by default Postfix delivers local messages into files in mbox format named after the user and go into the directory specified by mail_spool_directory.

$ postconf mail_spool_directory
mail_spool_directory = /var/mail

/var/mail has symbolic link to /var/spool/mail

myorigin tells the domain applied to emails going out of postfix. mydestination tells the domains which postfix does local delivery. For outside sent emails, ISP's doesn't allow our Postfix to directly contact remote MTA's. Emails have to go through the relay server provided by the ISP. This relay server has to figured using relayhost option. All These various options are explained in "Linux Email Setup" "Getting Postfix Up and Running" section. Please go through them to understand. I am giving here the output of few options.

$ postconf myorigin
myorigin = $myhostname
$ postconf myhostname
myhostname = localhost.localdomain

On Fedora, I've logged in as user Jay, open Evolution mail client.

Edit->Preferences->MailAccounts->Add

It opened Evolution Account Assistant dialog box, there configure below details

Identity->Full Name->Jay
Identity->Email Address->jay@localhost.localdomain
Receiving Email->Server Type->Standard Unix mbox spool file
Receiving Email->Spool File->/var/spool/mail/jay
Sending Email->Server Type->SMTP
Sending Email->Server->localhost
Sending Email->Port->25

With this evolution email can handover emails to Postfix MTA and read email from mbox format file jay. Test it by sending/receiving emails to/from other users of the system.

$ ls /bin /usr/bin /usr/sbin | grep -i spamassassin //This returned no results. Hence spamassassin is not installed on the machine.

# yum install spamassassin.x86_64 //Installs spamassassin along with its dependencies
# ls /bin /usr/bin /usr/sbin | grep -i spamassassin
spamassassin
spamassassin

Test Spamassassin is working, by running it against the sample spam and non-spam test files provided by Spamassassin. Get details about this from "Linux Email Setup" "Busting Spam with SpamAssassin" "Testing the Installation"

# locate sample-nonspam.txt  //Find the txt file location
# locate sample-spam.txt //FInd the txt file location
# spamassassin -t < /root/.cpan/build/Mail-SpamAssassin-3.3.2-B5S5ey/sample-nonspam.txt | grep X-Spam
Nov 24 08:44:05.804 [2525] warn: config: created user preferences file: /root/.spamassassin/user_prefs
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Level:
X-Spam-Status: No, score=-0.0 required=5.0 tests=T_RP_MATCHES_RCVD
# spamassassin -t < /root/.cpan/build/Mail-SpamAssassin-3.3.2-B5S5ey/sample-spam.txt | grep X-Spam
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
X-Spam-Flag: YES
X-Spam-Level: **************************************************
X-Spam-Status: Yes, score=1000.0 required=5.0 tests=GTUBE,NO_RECEIVED,
X-Spam-Report:
X-Spam-Prev-Subject: Test spam mail (GTUBE)




 



 






Saturday, November 16, 2013

How to set up Reliance Netconnect on Linux Fedora 19

  1. Click on the networks icon displayed in the top right corner. There you will find Mobile Broadband option. Turn on the switch displayed next to it. It displays New Mobile Broadband connection set up window. 
  2. In the set up window, select the country as India, click continue. Select Reliance from the Provider list, click continue. Click apply. Now Settings window is displayed.
  3. In the Setting window, select mobile broadband and Reliance connection as the network and click options button. Now it displays Editing Reliance connection window.
  4. In the above window, select Mobile Broadband tab. There for number enter #777, for username enter the device phone number, for password enter the device phone number. Click save button.
I found Mobile Broadband being turned off by the last step is completed. Switching it to turn on position connected me to Internet. The values entered in the 4th step keeps changing based on the device. 

Followers