Gourmet Printing – December 21, 2020
For those of you using Gourmet on a system that doesn't have python-poppler that was removed and so then printing no longer works, there is an easy solution. Simply find an older version of the package python-poppler, and reinstall it. I looked into why poppler was removed, but I forgot the reason, but I need to be able to print my recipes...
This will probably break at some point, but hopefully gourmet will be updated to python3 by that point and we'll get to keep using it.
PINE / Alpine Decrypting Password Files – October 26, 2020 (read more)
I have an instance of Alpine 2.0 that still has the old-style .pine-passfile that is fairly insecure, but I couldn't find a utility to decrypt it for me, so I grabbed the source code from imap.c from version 2.01 of the alpine source, and modified it to just read in a password file and output the passwords in it. (See below for how to decrypt the newer versions as well)
Mail Client Setup (read more)
We use a customized hostname for each customer. The name is some version of your domain name as a prefix to -mail.limedaley.com.
So, if Microsoft ever decided to host with us, their hostname would be microsoft-mail.limedaley.com. Contact us if you don't know the correct hostname.
Usernames are always your full email address of your primary account (some customers have secondary receiving accounts that use the primary account as the login for sending email. Gmail doesn't really like that model, and often wants to have a separate login for every sending account).
Amazon Fresh API: PHP/cURL Woes and a Final Solution! – July 29, 2020
I just spent four hours trying to get the Amazon API to work properly. The documentation is pretty poor, and just has the one example, which as I finally figured out in the end, works completely differently than the "landing" URL, which is the one you actually need to use.
How I thought it would work is that I would send my ingredients off to Amazon and they would return a customized link (in the form of the green button like on the verify page) and then I could display that to the visitors. So, I worked on cURL using various methodologies of encoding, etc. and when it finally started to work, I realized that Amazon doesn't actually return the HTML for a form or button, but the whole HTML of the page, so what they really want you to do is to setup an HTML form on your page with a hidden input and then have the user press on the submit button and hope for the best (rather than me see if the items are available and in stock, etc, and provide a better user experience for the visitor).
So, without further ado, here is the code you want to take a PHP array of ingredients and display an HTML form that your visitor can click on to link to Amazon's Fresh API.
$list = array();
foreach($ingredients as $ingredient) {
$list[] = array("name" => $ingredient['name'],
"quantityList" => array(array("unit" => $measurement = $ingredient['measurement'],"amount" => $ingredient['amount'])));
}
$result = '<form method="POST" action="https://www.amazon.com/afx/ingredients/landing">'.
'<input type="hidden" name="ingredients" value=\''.json_encode(array("ingredients" => $list)).'\'>'.
'<input type="submit" value="Buy on Amazon">'.
'</form>';
As always, if you are looking for a professional developer to help you get your projects done, I'm available for consulting.
Script to Generate Self-Signed Certificates Automatically – July 26, 2020
I always have trouble remembering how to make self-signed certificates, and there are a million different webpages devoted to doing so, but they all do it a little differently, and don't always, work, so here is the millionth-and-one web page, but at least it will work for me.
The features I care about are using private IP addresses, private DNS names, public DNS names, a root authority that needs to be imported into the browser's trusted certificates, and remembering/auto-filling passwords automatically.
Here is my config:
#!/bin/bash
set -e
set -u
ROOT=MyRootCA
SERVER=MyClient1
if [ -f $ROOT.pem ] ; then
echo "Regenerate root certificate too? (Y/n)"
read confirm
fi
if [ "${confirm:-Y}" == "Y" ]; then
echo "Generating root certificate..."
openssl genrsa -out $ROOT.key 2048
openssl req -x509 -new -nodes -key $ROOT.key -sha256 -days 1024 -out $ROOT.pem -config $ROOT.req
fi
echo "Generating server certificate..."
openssl genrsa -out $SERVER.key 2048
openssl req -new -key $SERVER.key -out $SERVER.csr -config $SERVER.req
openssl x509 -req -days 730 -CA $ROOT.pem -CAkey $ROOT.key -CAcreateserial -out $SERVER.pem -in $SERVER.csr -extfile $SERVER.req -extensions v3_req
if [ "${confirm:-Y}" == "Y" ]; then
echo ""
echo "Remember to import the certificate into your browser: chrome://settings/certificates."
fi
And then the two .req files:
MyRootCA.req:
[req]
distinguished_name = req_distinguished_name
prompt = no
[req_distinguished_name]
C = US
ST = NH
L = Hillsboro
O = Lime Daley Root
CN = limedaley.comMyClient1.req:
[req]
distinguished_name = req_distinguished_name
x509_extensions = v3_req
prompt = no
[req_distinguished_name]
C = US
ST = NH
L = Hillsboro
O = Lime Daley
CN = lemon.limedaley.com
[v3_req]
subjectAltName = @alt_names
[alt_names]
IP = 10.243.0.10
DNS.1 = lemon.local
DNS.3 = localhost
DNS.4 = lemon.limedaley.com
DNS.5 = lemon
To use, edit the two .req files as appropriate, and then run the generate script (you shouldn't need to edit it) and then import the *root* certificate, not the server certificate into the "Authorities" section in the certificate management section of your browser.
You also need to put the appropriate lines into your webserver. Here is an example for Apache:
SSLCertificateFile /etc/ssl/limedaley/MyClient1.pem
SSLCertificateKeyFile /etc/ssl/limedaley/MyClient1.key
When you want to make changes to the $SERVER.req file, you don't need to regenerate the root certificate, but just use the old one, and then you won't need to import it into your browser.
DKIM Records for Lime Daley Outgoing Email
DKIM (DomainKeys Identified Mail) is a useful method to help protect your domain from being used in phishing schemes, and also to help your legitimate emails to be delivered.
To enable, a change needs to be made on the mail server as well as in the DNS records for your domain.
If your DNS is hosted by us, we can make all of the changes for you, so just let us know. We don't enable without you asking as some customers use other mail services, like Constant Contact, Mailchimp, etc. and it is best to configure those accounts as well before we enable these security features.
If we don't host your DNS, let us know you want to, and then we'll turn on DKIM and give you the key you need to add to your DNS records.
We can also configure SPF and DMARC for additional improvements.
Text Messaging For Your VOIP Phone
Some of you already know and are using our new SMS and MMS service, but we've never officially announced it, so it seemed like now would be a good time to do so.
We currently only have incoming SMS/MMS messaging setup, but are working on getting outgoing messaging working as well. Let us know if you are interested in that service, and how you would want to be able to use it, and we'll see if we can accommodate what you are looking for.
VOIP Server Upgrades
Lime Daley is proud to announce that our upstream provider has added new VOIP servers for redundancy and geographic performance increases. By switching to the closer server, the latencies are reduced by 80%. While we have seen very few issues in the past, it is good news that the provider is investing in their services as they grow and provide better and better service.
ltsp-build-client error on tcsh: VENDOR environment variable set to unknown – March 09, 2017
I'm not sure where VENDOR gets set - maybe just in the default tcsh binary, but when I su to root (bash) it saves the environment variable, and the ltsp-build-client script looks to see if the VENDOR variable is set, and if it is, uses that value, which in my case is set to "unknown" which then results in the output of ltsp-build-client to be:
/usr/share/ltsp/plugins/ltsp-build-client/common/010-etc-hosts: line 3: /opt/ltsp/amd64/etc/hosts: No such file or directory
error: LTSP client installation ended abnormally
Google didn't help, so hence the reason for this post.
Simply running "unsetenv VENDOR" in my tcsh environment fixed the problem. And as a side bonus, all of the options in the --extra-help are now visible. I wondered why the options didn't match what I was reading in documentation online.
Temporary Outage – October 09, 2016
We lost a second drive in clementine today, which will affect some users and all phone service. We are working on migrating the information to a new server and are hoping to have everything back up shortly.
Update: All users and phone service was moved to mandarin, and everything is back up functioning normally.
