Wednesday, December 9, 2015

LinuxONE: IBM's new Linux mainframes

IBM is not just introducing new mainframes, but a new way of paying for on premises big iron that makes mainframes cheaper than they've even before.

SEATTLE -- At LinuxCon, IBM launched LinuxONE, a new pair of IBM mainframes along with Linux and open-source software and services. These new systems are the LinuxONE Emperor, which built on the IBM z13 mainframe and its z13 CPU, and its little brother, Rockhopper, which uses the older z12 processor.
linuxone-emperor-mainframe.jpg
IBM's new LinuxONE mainframes aren't only powerful, they're very affordable.
IBM claims that LinuxONE Emperor is capable of scaling up to 8,000 virtual machines or tens of thousands of containers and that's more than any other single Linux system. LinuxONE Rockhopper is an entry-level mainframe. It's designed for clients and emerging markets seeking mainframe speed, security and availability but for a smaller price-tag.The z13 mainframe series can hold up to 10 TBs of memory. Its 8-core z13 CPU can run up to 5GHz. On IBM benchmarks, a loaded LinuxONE could perform 30-billion Representational State Transfer (RESTful) transactions a day using Node.js and MongoDB in Docker containers. In brief, these are spectacularly speedy systems.
IBM also states that the LinuxONE are the most secure Linux systems ever with advanced encryption features built into both the hardware and software to help keep customer data and transactions confidential and secure. This is done with dedicated crypto processors and cards so your company can handle millions of transactions per second securely.
LinuxONE isn't just a new use of hardware. IBM has enabled key open source and industry software for LinuxONE and IBM z Systems. This includes Apache Spark, Node.js, MongoDB, MariaDB, PostgreSQL and Chef. These technologies work seamlessly on the mainframe just as they do with other platforms, requiring no special skills and with compelling performance advantages.

read this

Linux continues to give the mainframe the new blood it needs to stay alive in the 21st century.
Is that really true? You can see for yourself. IBM, in partnership with Marist College and Syracuse University's School of Information Studies will host clouds that provide developers access to a virtual IBM LinuxONE at no cost. IBM will also create a special cloud for independent software providers (ISVs) hosted at IBM sites in Dallas, Beijing, and Boeblingen, that provide application vendors access and a free trial to LinuxONE resources to port, test and benchmark new applications.
That's nice you might say, but I can't afford a mainframe. Think again.
Ross Mauri, IBM's General Manager of z Systems, said in a LinuxCon keynote speech, that LinuxONE comes with a new financing model. With this you can have a LinuxONE Emperor or Rockhopper on site but, like a public cloud, you'll only pay for the resources you use.
In an interview, Mauri added, "You can still buy or lease a mainframe. The elastic pricing is meant mostly for emergencing markets and service providers. IBM will work with existing customers who want to move to the new elastic pricing model."
Why would customers who already own or lease mainframes want to do that? Mauri explained, "With a Rockhopper and elastic pricing, this is the least expensive entry option ever for a mainframe."

Related Stories:

Monday, November 30, 2015

Journal of Cloud Computing

Journal of CLoud Computing
http://www.journalofcloudcomputing.com/content

International Journal of CLoud Computing
http://hipore.com/ijcc/contents.html


5 Principles for Cloud Computing Success


cloud computingCloud computing is really coming into its own. After several years of predictions, we’ve finally seen adoption of some cloud technologies at the consumer level. Cloud storage, for example, has taken the marketplace by storm as companies like Dropbox get into the public cloud provider routine.
Meanwhile, companies continue to explore just how cloud computing solutions can meet their needs. Just because something is billed as a cloud solution, however, doesn’t mean it’s a good idea.
Here are five principles your company needs to follow if it’s going to have successful cloud computing deployments:
1.    Start with the essentials. The very best of the cloud computing implementations are those that offer the most basic services. Those services are then turned into specific solutions. For example, a good API design can take a single cloud implementation and turn it into a truly robust solution. Offer a number of low-level API services to the users, and you’ll dramatically increase both the utility and the value of the cloud solution.
2.    Use centrally-controlled but distributed components. You want to configure your solution in many different ways, but there has to be a central hub that controls all of it. One of the most common mistakes companies make is to either have cloud solutions that are too tight in terms of distribution, or that lack central control. Striking the balance between the two is essential.
3.    Use tenant design principles. When you’re designing a cloud system, you’re not designing for users; you’re designing for tenants. You need to figure out how the system will be able to allocate and manage its resources; you’re not controlling access to applications and to data.
4.    Use virtualization as a tool, not a requirement. Virtualization is a technology that enables the cloud; it’s not a necessary component. Cloud solutions don’t always mean virtualization. Use virtualization when it makes sense for what you’re doing, not simply because you can.
5.    Build security and governance into your cloud system. These are issues that must be addressed in your cloud design, and whose capabilities have to be inherent from design through deployment.

Sunday, November 29, 2015

How to send mails in POSTFIX through external SMTP



postfixThere are many reasons why you may want to do it. I have set it up on my POSTFIX because I have dynamic IP that is banned in most spam databases. I could get mails to my mailbox but could not reply to any as my IP was rejected by most of mail servers. But there is a quick solution.

Requirements
So what will you need? Not to much. All that you need to set it up is working Postfix server (we will make changes in it’s configuration file) and external e-mail account with SMTP access (probably 99% of e-mail account will be ok, for ex. Gmail). So if you want to send emails with external (relay your mail). Here is a quick howto.

Step 1: Edit your configuration file
You will need to make changes in your configuration file (in standard postfix configuration it would be /etc/postfix/main.cf). You need to add at the end of configuration file following lines:
relayhost = smtp.provider.com:25
 
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = smtpd
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_sasl_auth_enable = yes
 
# optional: necessary if email provider uses load balancing and
# forwards emails to another smtp server
# for delivery (ie: smtp.yahoo.com --> smtp.phx.1.yahoo.com)
smtp_cname_overrides_servername = no
 
# optional: necessary if email provider
# requires passwords sent in clear text
smtp_sasl_security_options = noanonymous
Just make sure that you will edit “relayhost” (in first line of this listing), with your account SMTP address and port number.

Step 2: Generate password file
Postfix have to know your account login and password as most SMTP servers would not allow to rely emails from unauthorized connections. You will need to make a password file “/etc/postfix/sasl_passwd” with similar content:
# The server info must exactly match the value
# for "relayhost" in /etc/postfix/main.cf
smtp.provider.com:25 username:password
Now you need to generate POSTFIX lookup table (from previous file), with the following command:
$ postmap hash:/etc/postfix/sasl_passwd
You may test it by typing:
$ postmap -q smtp.provider.com:25 /etc/postfix/sasl_passwd
If you will get an output like “username:password” it means that password file has been generated correctly.
You can remove “/etc/postfix/sasl_passwd“. POSTFIX will not need it anymore.
It should be working now! Restart your POSTFIX and test it! If you have any problems please make a comment below. I will try to help you.

How To Install and Setup Postfix on Ubuntu 14.04

Introduction

Postfix is a very popular open source Mail Transfer Agent (MTA) that can be used to route and deliver email on a Linux system. It is estimated that around 25% of public mail servers on the internet run Postfix.
In this guide, we'll teach you how to get up and running quickly with Postfix on an Ubuntu 14.04 server.

Prerequisites

In order to follow this guide, you should have a Fully Qualified Domain Name pointed at your Ubuntu 14.04 server. You can find help on setting up your domain name with DigitalOcean by clicking here.

Install the Software

The installation process of Postfix on Ubuntu 14.04 is easy because the software is in Ubuntu's default package repositories.
Since this is our first operation with apt in this session, we're going to update our local package index and then install the Postfix package:
sudo apt-get update
sudo apt-get install postfix
You will be asked what type of mail configuration you want to have for your server. For our purposes, we're going to choose "Internet Site" because the description is the best match for our server.
Next, you will be asked for the Fully Qualified Domain Name (FQDN) for your server. This is your full domain name (like example.com). Technically, a FQDN is required to end with a dot, but Postfix does not need this. So we can just enter it like:
example.com
The software will now be configured using the settings you provided. This takes care of the installation, but we still have to configure other items that we were not prompted for during installation.

Configure Postfix

We are going to need to change some basic settings in the main Postfix configuration file.
Begin by opening this file with root privileges in your text editor:
sudo nano /etc/postfix/main.cf
First, we need to find the myhostname parameter. During the configuration, the FQDN we selected was added to the mydestination parameter, but myhostname remained set to localhost. We want to point this to our FQDN too:
myhostname = example.com
If you would like to configuring mail to be forwarded to other domains or wish to deliver to addresses that don't map 1-to-1 with system accounts, we can remove the alias_maps parameter and replace it withvirtual_alias_maps. We would then need to change the location of the hash to/etc/postfix/virtual:
virtual_alias_maps = hash:/etc/postfix/virtual
As we said above, the mydestination parameter has been modified with the FQDN you entered during installation. This parameter holds any domains that this installation of Postfix is going to be responsible for. It is configured for the FQDN and the localhost.
One important parameter to mention is the mynetworks parameter. This defines the computers that are able to use this mail server. It should be set to local only (127.0.0.0/8 and the other representations). Modifying this to allow other hosts to use this is a huge vulnerability that can lead to extreme cases of spam.
To be clear, the line should be set like this. This should be set automatically, but double check the value in your file:
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

Configure Additional Email Addresses

We can configure additional email addresses by creating aliases. These aliases can be used to deliver mail to other user accounts on the system.
If you wish to utilize this functionality, make sure that you configured the virtual_alias_maps directive like we demonstrated above. We will use this file to configure our address mappings. Create the file by typing:
sudo nano /etc/postfix/virtual
In this file, you can specify emails that you wish to create on the left-hand side, and username to deliver the mail to on the right-hand side, like this:
blah@example.com username1
For our installation, we're going to create a few email addresses and route them to some user accounts. We can also set up certain addresses to forward to multiple accounts by using a comma-separated list:
blah@example.com        demouser
dinosaurs@example.com   demouser
roar@example.com        root
contact@example.com     demouser,root
Save and close the file when you are finished.
Now, we can implement our mapping by calling this command:
sudo postmap /etc/postfix/virtual
Now, we can reload our service to read our changes:
sudo service postfix restart

Test your Configuration

You can test that your server can receive and route mail correctly by sending mail from your regular email address to one of your user accounts on the server or one of the aliases you set up.
Once you send an email to:
demouser@your_server_domain.com
You should get mail delivered to a file that matches the delivery username in /var/mail. For instance, we could read this message by looking at this file:
nano /var/mail/demouser
This will contain all of the email messages, including the headers, in one big file. If you want to consume your email in a more friendly way, you might want to install a few helper programs:
sudo apt-get install mailutils
This will give you access to the mail program that you can use to check your inbox:
mail
This will give you an interface to interact with your mail.

Conclusion

You should now have basic email functionality configured on your server.
It is important to secure your server and make sure that Postfix is not configured as an open relay. Mail servers are heavily targeted by attackers because they can send out massive amounts of spam email, so be sure to set up a firewall and implement other security measures to protect your server. You can learn about some security options here.
By Justin Ellingwood

Configure Postfix to Use Gmail SMTP 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 12.04. If you face any issue, feel free to use comments-section below.

Relaying Postfix mails via smtp.gmail.com:

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 likemail.example.com
Then open your postfix config file:
vim /etc/postfix/main.cf
and 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
Fix permission and update postfix config to use sasl_passwd file:
sudo chmod 400 /etc/postfix/sasl_passwd
sudo postmap /etc/postfix/sasl_passwd
Next, 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
Finally, reload postfix config for changes to take effect:
sudo /etc/init.d/postfix reload

Testing

Check if mails are sent via Gmail SMTP server

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
To further verify, if mail sent from above command is actually sent via Gmail’s SMTP server, you can log into Gmail account USERNAME@gmail.com with PASSWORD and check “Sent Mail” folder in that Gmail account. By default, Gmail always keeps a copy of mail being sent through its web-interface as well as SMTP server. This logging is one strong reason that we often use Gmail when mail delivery is critical.
Once configured, all emails from your server will be sent via Gmail. This method will be useful if you have many sites on your server and want them all to send emails via Gmail’s SMTP server.
Alternatively, you can use a plugin like WP Mail SMTP so that mails from your particular WordPress site will be sent using Gmail’s SMTP server.
Please note that Gmail’s SMTP server has a limit of 500 emails per day. So use wisely! :-)

Troubleshooting

Error: “SASL authentication failed; server smtp.gmail.com”
You need to unlock the captcha by visiting this pagehttps://www.google.com/accounts/DisplayUnlockCaptcha
You can run test again after unlocking captcha.
P.S. Do not miss out on our other helpful tutorials. Join us on twitter and facebook for more updates.

Friday, November 20, 2015

Postfix Flush the Mail Queue

Traditionally you use the "sendmail -q" command to flush mail queue under Sendmail MTA. Under Postfix MTA, just enter the following command to flush the mail queue:
# postfix flush
OR
# postfix -f
 see mail queue, enter:
# mailq
To remove all mail from the queue, enter:
# postsuper -d ALL
To remove all mails in the deferred queue, enter:
# postsuper -d ALL deferred

postfix-delete.pl script

Following script deletes all mail from the mailq which matches the regular expression specified as the first argument (Credit: ??? - I found it on old good newsgroup)
#!/usr/bin/perl
 
$REGEXP = shift || die "no email-adress given (regexp-style, e.g. bl.*\@yahoo.com)!";
 
@data = qx</usr/sbin/postqueue -p>;
for (@data) {
  if (/^(\w+)(\*|\!)?\s/) {
     $queue_id = $1;
  }
  if($queue_id) {
    if (/$REGEXP/i) {
      $Q{$queue_id} = 1;
      $queue_id = "";
    }
  }
}
 
#open(POSTSUPER,"|cat") || die "couldn't open postsuper" ;
open(POSTSUPER,"|postsuper -d -") || die "couldn't open postsuper" ;
 
foreach (keys %Q) {
  print POSTSUPER "$_\n";
};
close(POSTSUPER);
 
For example, delete all queued messages from or to the domain called fackspamdomain.com, enter:
./postfix-delete.pl fackspamdomain.com
Delete all queued messages that contain the word "xyz" in the e-mail address:
./postfix-delete.pl xyz
Updated for accuracy.