This Loading Effect is Powered ByMyBloggerLab


Sunday, June 21, 2015

Configure Postfix to Use Gmail on Ubuntu

If you want to use a Gmail account as a free SMTP server on your Ubuntu-Linux server, you will find this article useful. This guide is tested with Ubuntu 14.04. If you face any issue, feel free to use comments-section below.

Step 1 -First, install all necessary packages

sudo apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules 

If you do not have postfix installed before, postfix configuration wizard will ask you some questions. Just select your server as Internet Site and for FQDN use something like mail.example.com

Step -2 Then open your postfix config file:

vim /etc/postfix/main.cf

add following lines to it:

relayhost = [smtp.gmail.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = noanonymous smtp_tls_CAfile = /etc/postfix/cacert.pem smtp_use_tls = yes    


You might have noticed that we haven’t specified our Gmail username and password in above lines. They will go into a different file. Open/Create

vim /etc/postfix/sasl_passwd

And add following line:

[smtp.gmail.com]:587 USERNAME@gmail.com:PASSWORD

If you want to use your Google App’s domain, please replace @gmail.com with your @domain.com

Step -3 Fix permission and update postfix config to use sasl_passwd file


sudo chmod 400 /etc/postfix/sasl_passwd sudo postmap /etc/postfix/sasl_passwd


Step -4 validate certificates to avoid running into error. Just run following command
  
cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
Step -5

Finally, reload postfix config for changes to take effect:

sudo /etc/init.d/postfix reload

Testing -

If you have configured everything correctly, following command should generate a test mail from your server to your mailbox.


echo "Test mail from postfix" | mail -s "Test Postfix" you@example.com     


Keep Sharing, njoy learning   

Read More
4 comments:

Removing WGA notification in Windows

                       Executing a Batch Script

1. Right-click on your desktop. Choose New, then Text Document.
Enter the name as "remove.bat" without the quotes.

2.Right-click on remove.bat and select Edit. Notepad will open.

3.Paste the following lines into Notepad, then save and exit:

taskkill -IM wgatray.exe

del wgatray.exe

del wgalogon.old

4.Double-click on the remove.bat icon. A command prompt window should briefly appear, then close automatically.

Keep sharing njoy learning 

Read More
7 comments:

Thursday, August 8, 2013

Basic Interview Java Program 1 - Find Prime Number

public class PrimeNumberExample {

public static void main(String args[]) {
      
//get input till which prime number to be printed
System.out.println("Enter the number till which prime number to be printed: ");
int limit = new Scanner(System.in).nextInt();
System.out.println("Printing prime number from 1 to " + limit);
      for(int number = 2; number<=limit; number++){
          //print prime numbers only
          if(isPrime(number)){
              System.out.println(number);
        }
  }  
 }
 public static boolean isPrime(int number){
        for(int i=2; i<number; i++){
           if(number%i == 0){
               return false; //number is divisible so its not prime
           }
        }
        return true; //number is prime now
    }
}

Output:
Enter the number till which prime number to be printed:
20
Printing prime number from 1 to 20
2
3
5
7
11
13
17
19

Read More
2 comments:

Thursday, July 25, 2013

Activate Windows 8 Pro Build 9200

TRICK TO ACTIVATE WINDOWS 8 PRO BUILD 9200

As everybody know that Microsoft has done a really awesome work by developing windows 8, and windows 8 became every computer lover’s Heart beat…but in market if you will purchase this windows then you have to spend 3,499/-  Bucks, and what if you’ll get this for free.

                                 

Now basically if you download or install the downloaded version then you will get 90 days trail and i don’t think that 90 days trial (Deactivated)version will be enough for you..because in deactivated version some of the main features will now work, or I can say that the real fun of activated is can’t be imagined with deactivated version of Windows 8…so there is nothing to worry…

Step to Activate Windows 8

1. Download the Windows 8 (Should Be Windows 8 pro build 9200)
2. Install and restart the Computer/Laptop.
3. Now click on my computer option and see that the message is “Your windows 8 is deactivated.”
4. Now Download the activator from the given link Below.
5. Install the activator, and it will restart your machine…
6. Now click on my computer option and see that your windows 8 will be activated. 
For Activator   click here 
Keep Sharing Enjoy Learning...!!

Read More
16 comments:

Internet Download Manager Activation Key and Serial Number

Internet Download Manager Activation Key and Serial Number

Internet Download Manager is a kind of super downloading tool. With IDM, you download speed can improve up to 5 times and with features of resume and schedule downloads.  IDM support error recovery and resume capability will restart broken or interrupted downloads due to lost connections, network problems, computer shutdowns or unexpected power outages.

IMD support dynamic files segmentation, multipart downloading technology to speed up your downloads.
Internet Download Manager supports proxy servers, ftp and http protocols, firewalls, redirects, cookies, authorization, MP3 audio and MPEG video content processing. IDM integrates seamlessly into Microsoft Internet Explorer, Netscape, MSN Explorer, AOL, Opera, Mozilla, Mozilla Firefox, Mozilla Firebird, Avant Browser, MyIE2, and all other popular browsers to automatically handle your downloads.
Other features include multilingual support, zip preview, download categories, scheduler pro, sounds on different events, HTTPS support, queue processor, html help and tutorial, enhanced virus protection on download completion, progressive downloading with quotas (useful for connections that use some kind of fair access policy or FAP like Direcway, Direct PC, Hughes, etc.), built-in download accelerator, and many others.

Internet download manager activation method


Simply modify your host file by navigating to here: C:\Windows\System32\drivers\etc\hosts and add these entries

127.0.0.1 registeridm.com
127.0.0.1 www.registeridm.com
127.0.0.1 www.internetdownloadmanager.com
Open your Internet download manager , register with the following keys

OS5HG-K90NH-SXOGT-7JYEZ
R2C1T-O0KQO-JAVU2-4MMYP
M2A16-47AAW-6NLYP-V1E0J
IZO7M-360FW-QY1XP-AWLPN
46YFS-S9G7H-QZFWI-QQBQB
TUTR2-I2NHO-GQBC6-ZECWH
TUTR2-I2NHO-GQBC6-ZECWH

Keep Sharing Enjoy Learning..!!!

Read More
3 comments:

Wednesday, July 17, 2013

WAMP SERVER INSTALLATION ON WINDOWS 7 32/64 BIT

WAMP SERVER INSTALLATION ON WINDOWS 7 32/64 BIT


WAMP (Windows, Apache, mySQL, PHP) is all in one packages which installs the basic programs, you will need to get a localhost running and to be able to build and run PHP scripts.
We have already lived a tutorial about the installation guide for Wamp Server 2.1 a and this is the fresh and new WampServer 2.1 d version installation guide. This WAMP server installation tutorial helps you to tune the server without the need of touching the configuration files. Once the WAMP server installation completes successfully, you have the trayicon for the management of server and all its settings. You can visit Hostgator review to have an idea about website hosting.
If you are installing WampServer 2.1 d first time, then these following step will help you that how to install the WampServer 2.1 d in your computer with windows 7. We will end up to the following applications at the tail of this tutorial,
  • Installation of Wamp Server 2.1 d
  • Apache 2.2.17
  • PHP 5.3.4
  • Mysql 5.1.53 (version 64 bits)
  • Mysql 5.5.8 (version 32 bits)
  • phpMyadmin 3.2.0.1
  • SQLBuddy 1.3.2
Let’s start from scratch to build PHP environment on windows 7 64 bits operating system by using WampServer 2.1 d.

WampServer Official Site

This awesome server can be found for download at official web page WampServer. Let’s Run through the Installation first and then I’ll go in to detail about the administration.
              
                   

Step 1

You will find two options for the selection of WampServer for your windows 7 after clicking on “Download” link at the main navigation of WampServer official site.
My windows 7 is 64 bit, so I will proceed with the download of WampServer 2.1 d 64 bits version.

          

Step 2

I am using Google Chrome for the presentation of this tutorial, so you will notice “Save” button at the lower left corner of the browser. There will be “Save Dialog” in case of Mozilla Firefox and Internet Explorer.

Step 3

Click on Save button, WampServer is starting to download after clicking on the save button. You can save WampServer file in any location in your hard drive.

         

Step 4

Downloading of WampServer 2.1d is complete, and you will notice WampServer icon at your download location.

           

Step 5

It is the time to install WampServer on our windows. You will receive a Security Warning after opening WampServer file. It is absolutely normal to run WampServer setup on windows.

                 
Installation Starting of WampServer

Step 7

You will see a standard setup wizard of windows after clicking Run button on security warning dialog.

           
WampServer 2 Setup Wizard

Step 8

You have to agree the license of WampServer before selecting installation destination at your windows machine.

                   
License Agreement

Step 9

It is very important step of WampServer installation. I will recommend to install WampServer at the drive other than Windows 7 installation. Suppose your Windows 7 is install in C drive so you should install WampServer on D, E or any other location in hard drive except C drive.
I am going to install WampServer in D drive. Now you can click on Next button after selecting installation location for WampServer 2.1d
.
           
Select Destination Location of WampServer

Step 10

When you click on the Next button then a Select Additional Tasks dialog will appear on your screen, if you would like setup to perform while installing WampServer 2. You can check following options,
  • Create a Quick Launch icon
  • Create a Desktop icon
I have not interested to create any icon in the above locations, but you can do. You will be at “Ready  to Install” window after clicking Next button.
         
                   
Select Additional Tasks

Step 11

Setup is now ready to begin installing WampServer 2.1d on your computer. Click on Install button to start installation of WampServer 2.1d.
     
               
WampServer 2.1d Ready to Install

Step 12

Now your WampServer is starting to install in your computer.
     
                
WampServer Installing

Step 13

You will receive a dialog for choosing your default browser for WampServer. You can choose your favorite browser for WampServer as default, or simply click “Open” if you are not sure about the installation or executable files of your favorite browser. WampServer will choose “Internet Explorer” as default choice.
  
            
Choice of Default Browser

Step 14

WampServer installation has completed now and setup will guide you for Apache configurations in the next steps.
  
          
Complete The Installation

Step 15

You will notice a “Windows Firewall” standard dialog while configuring Apache by WampServer. (You may not observe this, if your windows firewall is not active). Click on “Allow Access” by leaving default options as such to proceed for PHP mail parameters.

            
Apache HTTP Server

Step 16

After allowing access to Apache server, you are at SMTP server configuration dialog. You can specify the SMTP server and the address mail to be used by PHP when using the function mail(). I will recommend the following values,
  • SMTP: localhost
  • Email: Your email address.
Click “Next” after putting the above values for the installation final dialog.


                 
PHP Mail Parameters

Step 17

You have successfully installed WampServer 2.1 d along with Apache, MySql, PHP, phpMyAdmin and SqlBuddy at your computer.
Click “Finish” to start WampServer along with other services. Leave “Launch WampServer 2 now” check-box checked to start WampServer automatically after installation.

                     
WampServer 2 Setup Wizard Completion

Step 18

Now you can see WampServer icon on the taskbar. WampServer icon has three states.
  • Red
  • Yellow
  • Green
Red:
WampServer red icon is showing that WampServer is Offline and no service has been started yet i.e Apache, PHP and MySql.

         
WampServer Offline
Yellow:
WampServer red icon is show that WampServer is still Offline and any service among Apache, PHP and MySql has been failed to start.

              
WampServer is Still Offline
Green:
WampServer is working normal along with all services and your development server is ready to use.

                  
Green WampServer Icon

Step 19

It is time to test our WampServer with the installed services of Apache, PHP, MySql and phpMyAdmin. Please follow the steps to test WampServer at Windows 7.
  • Be sure, WampServer icon is green at taskbar
  • Open your favorite browser
  • Type, http://127.0.0.1/ OR http://localhost/
  • Hit Enter
You have successfully installed WampServer on your computer if you have seen the welcome screen of WampServer. You can read Server Configuration at WampServer welcome screen.
  • Apache Version: 2.2.17
  • PHP Version: 5.3.4
  • Loaded Extensions: Loaded extensions of PHP
  • MySql Version: 5.1.53 – It will be Mysql 5.5.8 at 32 bits platform.

              
WampServer Welcome Screen

Step 20

You can launch phpMyAdmin console by one of the following means,
  • Click on phpmyadmin link on WampServer welcome screen
  • Type: http://127.0.0.1/phpmyadmin/ OR http://localhost/phpmyadmin/ in the browser address bar
  • Hit Enter
You will be at phpMyAdmin index to manage your MySql databases.

              
phpMyAdmin
I hope you have successfully installed WampServer 2.1 d at your computer. If you have any question, feel free to ask and don’t forget to write your valuable comments.


keep sharing enjoy learning...!!

Read More
17 comments: