Tag Archives: Networking

MailChimp: Data mining your subscriber lists.

MailChimp Logo

To find out more about your MailChimp lists, create a segment.

I’m not sure why it took me so long to figure this out, (just dumb, I guess..) but MailChimp actually has a pretty good built-in querying ability directly from the management interface.  It involves the segmenting function, where you create subsets of your list.  MailChimp calls these subsets segments, and the classic use for this is to break up a large list so that you can test different segments by using different subject lines, or mailing times.

From a database perspective, it looks like this:

MailChimp vs. Database
create a segment = create a query
segment = query results, aka a “cursor”
segmenting options = query criteria, aka  an SQL WHERE clause
saved segment = saved query results

In SQL, this would be the equivalent of:

SELECT * FROM <my eMail list> WHERE <my criteria> INTO <my segment>;

The available criteria are fixed, but there are a lot of useful ones. You can combine up to five criteria in a single segment request.  For example, let’s say you want to see how your list is performing. You can query how many subscribers opened:

  • all of your last five campaigns
  • one or more of the last campaigns
  • none of your last campaigns

The criteria are chosen from a convenient drop-down list.

Mailchimp Segment Drop-Down

Mailchimp Segment Drop-Down

To see the results of this query,  click on the  “Preview Segment” button at the bottom of the dialog box.

MailChimp - Segment Results

MailChimp – Segment Results

One thing you may note in the listing above, is a field called “Grade Level”.   We include this field on our MailChimp sign-up form. It will be populated only if we acquired the user through that form and if they choose to give us that information. We also ask for zip code.

The “Contact Rating” field, with the stars, rates the quality of the contact based on their campaign activity and the length of time that they have been on the list. Oddly enough, new acquisitions start out with two stars. If they fail to respond to several campaigns, then they are demoted to one star. These stars are the basis of determining how to pare down your list; eventually you might consider removing 1-star contacts altogether, or sending them a “re-engagement” eMail beforehand. This is well documented on the MailChimp web site. To cut to the chase…  4 and 5 star members are engaged, 3 star members either have low activity, or haven’t been on the list long enough to earn a higher rating.

 

Archive and Transfer your Google Mail

When an employee leaves your company you may need to archive.

Using the Chrome browser:

1. Sign into your google account.

2. In a new tab, browse to the following address: https://takeout.google.com/settings/takeout/custom/gmail,calendar

3. Follow the wizard.  You can choose to make an archive just of your eMail and calendar, or you can select information from other services such as Google Drive.

4. Once you have selected the services that you want,  click on Next


This shows the file version (zipped),

5. Click on Next again   This starts the archive process.  You can access the archive after it created by clicking on the link that Google sends to your eMail account.

Hosting with Linode

Let us sing the praises of Linode, a provider of cloud-hosting for Linux-based applications and web sites. At work we’ve had two of these for a year, and they just work, exactly if the servers were sitting in the next room, except that they provide a slick management interface, and you can mix and match among different disk sizes, RAM, processors, redundancy, and various flavors of Linux. Access is via their web site, or via a secure terminal session.

Here’s a shot of the backup screen, (click to enlarge).

 The Linode-provided backup is great for basic backup. It makes backups on a weekly and daily basis. It also has a provision for a snapshot, which is a great way to back up the server before doing upgrades. Full details are on their web site, including the costs, which are a few dollars per month depending on the size of the Linode.

There are some limitations…for example with MySQL database transactions. Linode recommends that you perform a data dump of your MySQL data so that the dump files get backed up.

Set default text editor in Ubuntu

I was looking at our crontab on our backup server. This server is an Ubuntu 12.x LTS machine, and the logs for this were being sent to my predecessor, and I wanted to change the eMail address. The usual procedure is to run the following command to see and edit the contents of the crontab file:

crontab -e

This brings up the crontab file for the root user.  Crontab is probably for another day, but basically the script shows a MAILTO address that I wanted to change.

MAILTO=”myusername@mydomain.org”
# Edit this file to introduce tasks to be run by cron.
#  m h  dom mon dow   command
0 23 * * * rsync -avz root@192.168.214.71:/opt/mysql_backup/ /backup/hive
0 18 * * * /backup/scripts/rsync_agave.sh
0 17 * * * /backup/scripts/rsync_basil.sh
0 1  * * * /backup/scripts/rsync_mysql1.sh
0 4  * * * /backup/scripts/rsync_mimic.sh
0 2  * * * /backup/scripts/rsync_petal2.sh

Running the crontab-e opens up the file in the default editor. Well, I didn’t even realize I had a default editor on this machine, and the file opened in vim, which is an archaic program, beloved by Unix freaks.  I prefer the nano editor, especially because I don’t use a text editor much, and I know how nano works.

After some digging it appears that the default editor is set as an environment variable specific to the user.  It can be changed by running the following command:

export EDITOR=nano

You can view your current environment variables, by typing

printenv

There will be a line similar to

EDITOR=nano 

In Ubuntu, you can also use the following command: 

sudo update-alternatives –config editor

This will bring up a list of editors from which you can choose your favorite.

FileZilla

I have taken over our webmaster’s job, following the departure of that esteemed and highly valued person a week or so ago. We are going to miss him in ways that we haven’t even figured out yet.

I’m scrambling to find out everything that the webmaster does…and finding that his tool set was basic in the extreme; roughly a text editor and and the superb open-source FTP program called FileZilla. With these two tools, he maintained two major web sites, and several minor mini-sites, built on-demand web pages for special projects, ran our DNS, managed our open-source survey system called LimeSurvey, did our analytics and search-engine-optimization (SEO), slung PHP code like a master, and managed a series of third-party advertising tiles and several mailing lists.  Whew!  

Sharing QuickBooks 2014

Having recently converted from Peachtree to QuickBooks, we wanted to add an additional person on QB so that both our accountant, and our CFO could work in QB at the same time. We started out sharing the data file from the CFOs computer, but that bogged things down.

The solution is a “server”….  which runs the QuickBooks Database Manager program.  We repurposed an older but reliable HP workstation by installing a fresh copy of Windows 7.  Then, we ran the QuickBooks installation program from their support  link.

While it looks as if you are installing the full QuickBooks program, an initial screen asks what kind of installation you want:

  • Use QuickBooks on this machine, and access a company file stored elsewhere on the network 
  • Use QuickBooks on this machine and host the company file for others on the network 
  • Host the company file on this machine, but access it from Quickbooks on other machines 

By choosing the hosting option, the installation program will install the QuickBooks Database Manager program only, on your server machine.

Networking

Assuming you are not on a domain network, (i.e. your users’ machines are set to be a workgroup) you need to create user accounts on the server machine which match the Windows 7 user accounts that users use to log into their personal workstations.  This will allow people to connect to the server machine using their usual account name, without having to enter it a second time.

Set up the data folder 

Create a folder on the server machine to hold the QuickBooks company file. Copy the company file into that folder.

This needs to be  a shared folder on the network. The QuickBooks file doctor program will turn on folder sharing, and make the folder accessible. Download and run this program on the server.

Finalizing

At this point, you have the company file loaded on the server. Now, run the QuickBooks database manager program.  This will ask you for your company folder so it can find the company file.
Note that the database manager runs as a background service,  so you can exit the program, and the file will still be available to the network.

Now you can go to each workstation, and access the file over the network. I edited the opening QuickBooks screen to show just the networked copy of the file. The next time the user starts QuickBooks, it should automatically open the file without requiring a Windows network log in. Of course, the QuickBooks log in is still required.

Licensing

Using the database server does not require a QuickBooks user license. You can safely move a company file to a server, and have the same number of users access the file. 

Details at:
https://support.quickbooks.intuit.com/support/Articles/HOW13004

Test PowerShell scripts with VirtualBox

I’m at the point where I am going to deploy some PowerShell scripts to my end-users, and I want to test the scripts on a fresh installation of Windows before trying them on the user’s workstations.

I use VirtualBox to create virtual machines for Powershell testing. Virtual box works on Linux, Mac and Windows host machines. My 8 gig Win 7 box works fine with one or two “guest OS’s”. On my 4 gig (ancient) iMac, it works, but its pretty slow.

One thing that I find amazing, is you have to run updates on all those Windows Virtual machines. Don’t expect to be fully productive on Tuesdays or Wednesdays, when Microsoft sends out Windows updates. It isn’t unusual for updates to run for an hour or more.

Be sure to install the VirtualBox “guest additions” within your Windows VM, once you’ve got your Windows VM up and running. You may also want to change the network settings to “bridged”, so that your VM is on the same network subnet as your host machine.

One other disconcerting thing; your Windows 7 desktop may come up with a black background depending on whether you are running the aero interface and other such fripperies. You can turn all this stuff on if you want; but it will slow down the performance.

More details on setting up VirtualBox are located  here and here.

winvm

If you have installed Windows 7, you may find that it has come with Powershell V.2 out of the box. You can test that by starting a PowerShell session from the command box (just type Powershell.exe).  Once Powershell is up, issue the following command at the prompt:

get-host | select-object version 

If it isn’t 4.0 or later, download the latest version of the Windows Management Framework from Microsoft.

Pseudo-Sync for DropBox and iPad

I’m a Dropbox partisan. Dropbox works really well between multiple platforms as “personal cloud”. The wonderful thing about Dropbox is that it allows you to work locally on a file, whether you are connected to the internet or not, and then it will synchronize any changes that you have made to the source file in the cloud. This can legitimately be called syncing, because you end up with the same version of the file on all devices (and the cloud folder), once the changes have been made.

Except for iDevices. At least for Dropbox,

Even with the Dropbox app installed, the familiar syncing process that works so smoothly on desktops and laptops isn’t present on the iPad. The reason for this is that on actual computers Dropbox maintains copies of all files on all devices and the cloud. On the iPad that might be both a problem with storage space, and also a problem with the amount of data that is transferred.

This has come up with FileMaker files that are opened using the FileMaker Go app on the iPad. I’d prefer to go to the Dropbox app, find my FileMaker database file, and “Open in FileMaker Go”, which is, in fact the procedure that one uses to download and use the FileMaker file on the iPad for the first time.

1. Here’s the file shown in the Dropbox App.  It is called UCHealth.fmp12 and it is an exercise tracking application.

2. Choose the file, then, choose the Open icon (third from the right on the top, the box with the arrow).

Here FileMaker isn’t shown,  but if you tap the “Open In” application icon ….it will bring up additional options:

Tap the FileMaker Go icon, and the file is downloaded from Dropbox, and will be displayed in  FileMaker Go’s file listing for local files on the iPad

However, once the file is opened, it is copied to the iPad and it stays on the iPad. Changes to the file (new records, edited records, etc), are NOT synced back to the Dropbox cloud file.

The fix for this is a bit convoluted, but at least it works. It involves a manual copy of the file back to the Dropbox cloud.

1. In Dropbox, Delete the cloud version of the file. (If you are doing this next to your desktop computer you may see a notification on the desktop telling you that the file has been deleted from Dropbox.

2. In FileMaker Go – be sure to close the file.
a. Select the upper left menu, and choose Windows

Close the application window. (in this example, close the UCHealth application.)
That will bring you back to the file browser.

3. In FileMaker Go, choose “Device”  This will show the list of files that on the iPad.

4. Choose the upper right icon to “mark” the file. This is the (turned down page).
5. Choose the upper left “export” icon to export (square with arrow)

6. Choose “Open in Dropbox”

 7. Choose “Save”

Depending on the size of the file there may be a delay as the file is copied to the Dropbox. And of course, this process doesn’t work unless you are connected to the network.

This whole process isn’t elegant, and is only workable for a single person moving files around.  But it works.

Powershell: Scripting FTP

Having spent some hours figuring out how to script an FTP transfer, I thought I’d describe my kludge. Maybe someone can suggest a more elegant way.  I’m trying to I’m connect to a FTP server on my Linux box to upload a file.
There are at least three approaches that can be taken:
1. Directly interact with .NET objects
2. Import a Powershell module for FTP
3. Use Powershell to manipulate a command line FTP program, such as the Putty Secure FTP program PSFTP.
I started with the second option recommended on TechNet. Looks great, and I thought that it was semi-official (being from Technet). I was unable to get a connection and I think it may be related to the fact that module apparently doesn’t support SFTP version 2.  There are a couple other quirks with the module… including the fact that the user name and password are passed to the command line as an object.  
By the way, both option 2 and 3 have the same name, PSFTP. 
Option 2 = Powershell FTP 
Option 3 = Putty Secure FTP 
So, I’m on to option 3.  This looks a little more promising.  One gotcha, however, is that calling Putty PSFTP from the Powershell ise, makes the connection but doesn’t return to show the PSFTP prompt. Here’s the command (so far) 
PS> .psftp myaccount@192.168.224.184 -p 22 -pw mypassword -v -2
This command shows that:
The psftp program is located in the current directory.
myaccount@192.168.224.184 – is the login account used for logging into the target machine
192.168.224.185 – is the IP address of the target machine
-p 22 – is port 22, used for Secure FTP
-pw is the password
-v is verbose (upon execution it returns all the steps of the login
-2 is SSL version 2.
Running this from the command line in the ISE gives the following:
  .psftp : Looking up host “192.168.214.184”
At line:1 char:1
+ .psftp myaccount@192.168.224.184 -P 22 -pw mypassword -v -2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Looking up host “192.168.224.184”:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
Connecting to 192.168.224.184 port 22
We claim version: SSH-2.0-PuTTY_Release_0.63
Server version: SSH-2.0-OpenSSH_3.8.1p1
Using SSH protocol version 2
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 1024 ce:ec:0d:c2:90:ab:5e:87:12:bf:ba:f9:78:77:89:fb
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Using username “myaccount”.
Attempting keyboard-interactive authentication
Access granted
Opening session as main channel
Opened main channel
Started a shell/command
Connected to 192.168.214.103
Remote working directory is /ftproot
PS >
If you run this from the ise, it returns the PS command as shown.  
If you run this from a regular powershell command session, it will keep you in the PSFTP session, and you can run use the usual FTP commands….like CD, etc. 
In either case, the way Putty FTP can execute scripted commands is that the script has to live in a separate batch file that is called from the command line.  There doesn’t appear to be a  way to pass commands from Powershell to a running Putty SFTP session.  (hmm.. really?) 
Additioanal points: 
1. I might be able to configure the FTP server running on the Linux box to accept the connection from the PowerShell FTP module. I haven’t investigated that possibility but presumably it would be less secure in terms of encryption.

2. The script above has the name and password in clear text.  Not a best practice. 
3. Various versions of FTP are described on this page.  

ClearOS: A Linux-based Windows SBS Replacement

In my ongoing project of trying to clone a Redhat Linux server, I ran across a help file that was written for an operating system called ClearOS. I assumed that this was another Linux distribution, and ignored it at first but then, while waiting for another installation, I spent some time reading the web pages.

ClearOS is a combination of a core Linux distribution based on Red Hat and CentOS. It includes a complete set of applications to provision an entire office. Perhaps the main advantage is that it takes what are usually a number of several different disparate Linux-based programs, and it puts a slick web-based management front-end them. ClearOS is very modular; you can make things as sophisticated or simple as you want.

To get a closer look, I downloaded and installed the ClearOS Virtualbox demo. (The only glitch was a problem with the 64-bit demo; I re-downloaded the 32-bit version and that installed perfectly on Virtualbox on my iMac.)

Setup is accomplished by a wizard that walks you through a sequence of steps to install the software, connect to the internet, configure the firewall and configure additional services.

If you want to see how ClearOS looks without worrying about the installation, you can “manage” a virtual server with a Live-Demo.

The screenshot shows options for backing up local workstations.

ClearOS offers a number of different versions and support levels. You can download and run the community edition for free, a choice that I might consider to replace a Windows SBS 2011 server if there are no processes on the server that are dependent on Windows. You can install it and run it on your own dedicated hardware. (They don’t recommend running the whole thing in a single virtual machine).

Or you can run it on a ClearOS hybrid appliance. These require the ClearOS Professional version which is a subscription-based support plan. The supported version can also be run on your own hardware. It includes certified and tested versions of all of the applications so that they are guaranteed to work together.

Years ago there was the Cobalt Qube, a single box which provided eMail, file and print services in a single cute box. (You can still find them on eBay). It was a great way to get an “instant network”, and I was sorry to see it discontinued. The ClearOS options provide a similar instant network, and would be suitable anywhere a Windows Small Business Server might be considered.