IMAP Push Notification with Boxcar and Procmail

Apple’s iOS supports push notification of new email, but not for generic IMAP servers, and the last thing I ever want to do is set up an Exchange server or switch to Yahoo Mail.

I prefer to run my own mail server, but sometimes I would still like immediate notification of new email messages. The Boxcar service allows you to accomplish this by forwarding your email to a secret address they give you. They then use the Apple Push Notification Service to notify you of the sender and subject on your iOS device.

Now, I certainly don’t want notification for every message, but I do want to know when certain people or organizations have emailed me. If you’re a gmail user, you can play with their filters to try and accomplish this. I use that favorite tool of mail administrators everywhere: procmail.

Here’s an example procmail recipe I use to provide me with selected notifications (make sure SENDMAIL is set to the full path to your sendmail program):

# Send on to Boxcar push notification service certain messages' headers
:0ch
* ^Subject:.*New.Voicemail*|\
  ^From:.*mysister@*|\
  ^From:.*mommy@*|\
  ^From:.*BFFforever@*|\
  ^From:.*@client.com*
| formail -X"From" -X"Subject" | $SENDMAIL e00000.12345678@push.boxcar.io
#

This way, if I get a voicemail message (I use Telemessage, which does vmail-to-email conversion), a message from my sister, mother, or BFF, or from any address at one of my clients, the From: and Subject: headers are forwarded on to Boxcar, which then sends an immediate pop-up to my phone.

Note that you can send Boxcar the entire message and they promise to throw away the body of the message. I feel better avoiding any possible data leak by sending them the bare minimum of what they need; hence the formail -X"From" -X"Subject", which strips the message of everything but those two headers.

Of course procmail is extremely flexible and you should be able to adjust your .procmailrc file to specify exactly which files to send on to Boxcar. Note that Boxcar also provides many other notifications besides email, such as Twitter mentions and a whole lot more.

Jason Gottlieb obituary

The following was written by my father’s wife, Cindy…



JASON A GOTTLIEB
June 5, 1932 – October 14, 2011

Jason passed away peacefully with family and friends by his side, while he listened to jazz, on Friday evening October 14, 2011.

Born in Boston, MA, he attended English High School of Boston, the first public high school in America. He then attended Boston University, graduating with a major in Psychology and minor in History. After receiving his B.A., he joined the Army, serving in Germany from 1953 to 1955, stationed at Bad Kreuznach, 20th Army Hospital Kaserne, where he met Alberto, his commanding officer.

Upon arrival in Germany, the Army had put Jason in a motor pool doing mechanical work. He went to Alberto, asking if, as a college graduate, could he possibly be used in a capacity other than as a “Grease Monkey.” A position was created for him as a Social Work Assistant. Jason was awarded three medals: Army of Occupation, Good Conduct, and National Defense Service Medal. Upon discharge, with the aid of the G.I. Bill, he attended Boston University School of Law, graduating in June of 1958. He moved to California after law school and worked for over 50 years at the law firm of Rose, Klein and Marias.

One of his partners, Howard, said Jason was indeed a renaissance man. “He had an encyclopedic knowledge that was diverse and covered information dealing with subjects such as World War II, jazz, movies, food, travel; you name it, and Jay knew something about it”.

He was unquestionably one of the most gifted joke tellers one would encounter. He was a real people person. He had a capacity to listen and be responsive to people who confided in him.

Jason had a passion for living; we hunted with his friend Bill in the U.S., with Alaska being a favorite, and also in South Africa. He was a private pilot and some of the best memories will be of the time we shared flying airplanes. He also loved to ride both his Harley Road King and Buell XB12S motorcycles. He snow-skied, and was known to say, before each downhill run, “I feel the need for speed.” His grandson Ryan stated, “I don’t think there are too many funny, intelligent, roller coaster loving, gun shooting grandfathers out there who have raised such amazing children. Papa Jay, you will be missed”.

Phyllis, his first wife, says he was a “compendium of trivia.” He could quote any movie line and as his law partner, Marvin, said on Facebook, “Here’s lookin’ at you, Kid.” His love of jazz made his daughter, Cathy, say “Let the trumpets play.” Jim, his son, joked that he had five glorious weeks with his MacBook Air, but didn’t stick around long enough to take delivery of his first iPhone. Learning to use a computer at the age of 60, and then switching from Windows to a Mac at 79, he loved the time he spent on his computers; a new stage for learning, exploration, and communicating with others.

Jason was a lover of dogs, and was best friend to many during his lifetime. Now he is with all who passed before him, including the bird-hunting dogs Rigby and Johnny. Jason always enjoyed coming home to his Jake, Sammie, Shiba, and Kipper.

He shared a deep bond of friendship with Ron and Jane that was based on love and respect, shared interests, robust conversation, and so many good times together. They shared good books, great jokes, aviation stories, motorcycle rides, world travel, and new puppies. Together Ron and Jason sought out and ultimately found the perfect spot for their forever view of Bass Lake.

Jason was loved, and his wisdom, wit, laughter, and love will be missed by literally hundreds of people.

He was a loving father to Cathy and Jim and husband to their mother, Phyllis. Papa Jay was a loving grandfather to Brandon, Ryan, and Sawyer and he will always be with them. As son-in-law, Mark, said, “If laughter was a currency, he was rich beyond riches.” He was a great brother to Veda, uncle to Hope, Barry and Michael, Mary and Ashley; Uncle J.J. to Kelli, Randy, Carly and Cooper, who said “we will always remember the great times,” and brother-in-law to Karen and Jay. He loved and was loved by all of the dogs throughout our extended family.

Jason was the love of my life and my best friend. We met 35 years ago and celebrated our 30th wedding anniversary on October 3rd. It has been a great run. We both treasured every day together, and reminded each other each day of our fortune to have met.

Sleep well my Love, and let the music play. Forever yours, Cinders

Memorial Donations to honor Jason can be made to Canine Companions for Independence, or to The Special Olympics.

A celebration of life will be held at a later date.

SoCal Smart Card Implementations Not Smart

In May of 2002, I arrived at the airport in Hong Kong and bought an Octopus Card so that I could get around the city. This was the first time I’d used a transit smart card, and it worked perfectly. You just tap it once when boarding the train or bus, and tap it again when you get off, and the proper fare is deducted. It is also accepted at many convenience stores.

Since then, I’ve used similar systems in Japan (Suica), Korea (T-Money), Singapore (EZ Link), China (公交卡), Taiwan (EasyCard), and England (Oyster). I’ve never had a problem with any of these systems.

I believe the implementation of the Oyster Card is especially well thought-out. You don’t have to decide in advance if it makes more sense to buy a daily pass or to pay for each journey, as it will never charge you more than the price of the day pass. This is key. You want to make it as easy as possible for people to use public transit, and not forcing them to make decisions is a good way to accomplish this. Just use the card, knowing you’re always paying the lowest fare. Along these same lines, the Oyster Card gives you a much lower fare than when paying cash, further pushing adoption of this technology.

In 2001, the San Diego Association of Governments (SANDAG) signed a contract with Cubic Transportation Systems, the same company that provided the smart card systems in England and Singapore, among many other places. Likewise, in 2002, the Los Angeles County Metropolitan Transit Agency contracted with Cubic for a similar system.

Yet here we are 10 years (and countless millions of dollars) later, and neither system has been fully and properly implemented. To wit, this quote from the pages of the Culver City bus system:

How do I transfer from one Culver CityBus to another Culver CityBus using a TAP card?

Simply tap your TAP card on the farebox. The base fare will be deducted from your card. Ask the Culver CityBus Operator for a Local Transfer and tap your card again to pay for the transfer. The Operator will then give you a paper transfer.

Excuse me??? This is a smart card! You should just be able to tap the card and have your fare deducted. If you use it again within the allowed transfer period (and it’s not a return trip), it should just deduct the price of a transfer. When the procedure to use a smart card is way more complicated than paying cash, something is very wrong.

The usefulness of L.A.’s TAP Card runs into more problems in those cases where you might exceed the price of a day pass. Even though they use the same technology as the Oyster Card, there is no daily cap. If you make many trips and just keep tapping your card, it will continue to deduct the full fare each time. So you must decide at the beginning of the day whether to buy the day pass or not. And if your trip starts at a subway or light rail station, no longer can you just tap on the fare gate or platform pedestal. Instead, you must wait in line at the ticket machine and purchase a day pass which is then added to your card, again completely negating the convenience of the smart card!

Things are no better in my hometown of San Diego and their Compass Card. Instead of a daily cap, they have set their systems to sell you a day pass by default. If you are at a trolley station and just want to make a one-way trip, too bad. You can’t use the pedestals and must line up at a ticket machine, unless you don’t mind paying $5 for a one-way trip. On the buses, you are supposed to be able to tell the driver before you tap your card that you want a one-way fare instead of a day pass, but in practice, when I do this, they often have no idea what I’m talking about.

Commuting to and from work for me normally requires just two $2.25 one-way trips, and I don’t relish making a daily 50-cent donation to the local transit agency. But sometimes I decide to go somewhere after work. Again, a London style daily cap would work great and encourage me to use transit more often, as there would be no fear that I’ll end up spending way more than it costs me to drive.

There are several other problems with the San Diego system.

One is the slowness of the card readers. Bus boarding is severely delayed by the fact that it takes almost two seconds for the response to each card tap. Why oh why? L.A. uses the same fare boxes and the response is immediate.

Also, despite the day pass supposedly being good until the end of service, it’s actually coded to end at 23:59. If you board a bus after midnight (I’m a late-night person, so this isn’t so unusual for me) and tap your card, it charges you for a day pass for the following day. (The same thing happens with their paper day passes. If you insert it after midnight, it eats the pass and doesn’t register as valid.)

Keep it simple. I should just be able to tap my card every time I get on a bus or train and know that I’m always getting the best fare. The easier it is, the more likely I am to use it. With the card set to auto-charge, it even feels like it’s free!

It can’t be that hard to get all this working. It’s just a matter of software. I can’t believe it’s been a whole decade, and while cities around the world have successful smart card implementations, here in Southern California they are still struggling through political and technical challenges to get everything right.

Chengdu vs. HK/Shenzhen

A few ways that Chengdu is more “civilized” than our neighbors in modern HK/Shenzhen: All our eating places supply napkins; people readily give up their bus/subway seats to anyone with more than a few grey hairs; and we don’t eat Fido :-) .

Fido

Fido

Twins / 雙胞胎

Twins / 雙胞胎

Twins / 雙胞胎

Chinese Mixup

Goofed up my Chinese, ordering dim sum in Hong Kong. The character for melon is 瓜, and the one for claw is 爪. Pretty similar, you gotta admit. Close enough that I thought I was ordering some kind of gourd, but ended up with a bunch of chicken fingers, and not the kind you order for the kid at your table at a family restaurant.

Chinese Logical Fallacy

I’ve decided the Chinese are living a logical fallacy. Yes, we know that everything that tastes or feels good is bad for you. But it does not follow that that which makes you uncomfortable is to your benefit. Yet they persist in swimming in winter waters, sleeping on wood planks, leaving every window and door open even on the coldest days, and taking Chinese medicine, which must be helpful since it tastes so godawful. And they say they do it all because it’s good for your body!

Time Machine

I was afraid this would happen. After 4 days in ultramodern Hong Kong with its great weather and amazing food, I must admit I’m not really looking forward to climbing back into my time machine for the trip 20 years into the past to my life in Sichuan.

No Meatballs For Me

After over two months in Chengdu, I had my first Western meal…at IKEA: pumpkin soup, salmon plate, mashed potatoes & gravy, tiramisu. Also my most expensive meal, at US$7.50. Tomorrow it’s back to rice.

China As Seen By The Sichuanese

China As Seen By Sichuanese

China As Seen By Sichuanese

Giving Chinese A Break

Friday is the day I allow myself to slack on my Chinese, so last night I went to my local university’s 日語角 (Japanese corner), then after it ended, to the 英語角 (English Corner)。Lots of fun chatting, including with two guys from 新疆 (Xinjiang Province), who complain that everyone assumes they’re foreigners and so expects them to speak perfect English. But they are Chinese citizens!

No Tea in China

There’s this strange belief here in Sichuan that drinking tea with a meal is bad for your stomach. So even most restaurants here serve only hot water (開水) and not tea. This is so weird since every Chinese restaurant everywhere else in the world serves tea. My host father, for example, insists that I wait at least 30 minutes after eating before I can have my tea.

I recently splurged on a Japanese lunch, and getting to enjoy a cup (many cups, actually) of nice, hot tea while I ate, and immediately afterward, was really a treat.

Dangerous Intersection

Two competing roads both get the green light at this T intersection

Two competing roads both get the green light at this T intersection

In the U.S., traffic control boxes often have failsafe hardware that will prevent two competing roads from both getting a green light, just in case of some hardware or software failure.

Now which traffic engineer here in Chengdu, China thought it would be a good idea to purposely do this?

Building a Life in Chengdu

When my alarm went off at 0400 the morning I left, I thought to myself “What the HELL am I doing?” Why was I leaving my good life, friends, & city to go live someplace across the world and far from a beach where I know no one.

I’ve now been here in China for just over a week and sometimes I still wonder. But I also felt that way in 2008 when I arrived in Japan for 5 weeks; yet by the end I was having such a great time and didn’t want to go home.

So I’ll stick it out for a while and see what develops. After spending my first 5 nights in a travelers hostel, I now have an apartment and started daily Chinese classes this week, and have been spending hours a day wandering the streets exploring my new town and its eats.

2010 San Diego Latino Film Festival

Last year I had to miss my favorite film festival because I was in Laos at the time, and somehow it didn’t seem worth cutting my trip short just to watch a bunch of movies. I don’t doubt the wisdom of that decision, but I was very happy to be back for the 2010 installment of the San Diego Latino Film Festival.

Over the 11-day festival at the Ultrastar Mission Valley Cinemas, I watched 39 films, in whole or in part (yes, I walked out of a few). Here are my favorites.

El Estudiante (The Student) (México, 2009):
A 70-year-old man goes back to college (I can relate!), but he’s no Rodney Dangerfield, and we learn through him that one should always live life to the fullest. More critical people complain that it simplifies things too much or that it’s anti-abortion and a bit cheesy. But I’m willing to overlook all that for the heartwarming and funny story. It also helps that it takes place in Guanajuato, where I have spent a few hours wandering the university where most of the film takes place. This is the #2 grossing film (and #4 DVD) of all time (of course these stats are never adjusted for inflation) in México, but don’t hold that against it.
Trailer (en español)

Cuestion de Principios (A Matter of Principle) (Argentina, 2009):
A pleasing story about an old stick-in-the-mud (do I detect a pattern here?) who stands up to his boss to show him that not everything in life is for sale, but he goes too far for his own good and seriously tees off his wife.
Trailer (en español)

El Frasco (The Jar) (Argentina, 2009):
A semi-autistic and clumsy intercity bus driver running away from his past and firmly entrenched into his daily routine of driving the same route and stopping for lunch at the same restaurant, almost screws up his one chance at love.
Trailer (en español)

Cinco Dias Sin Nora (Nora’s Will) (México, 2008):
In the ultimate controlling move, an old woman commits suicide on the eve of Passover, but not before preparing the Seder and leaving full preparation instructions with the housekeeper, and inviting her family members to attend. She also arranges for her ex-husband to be the one to discover the death and burden him with arranging the details of her funeral. A definite black comedy.
Trailer (en español)

Io, Don Giovanni (I, Don Giovanni) (Austria/Spain/Italy, 2009):
I’m not a big fan of opera; my mind tends to drift and sleep seems to overcome me. But this film allowed me to finally enjoy the medium. It’s a beautiful retelling of the story behind the opera Don Giovanni. In the course of this, you also get to enjoy much of the opera itself, complete with great scenery and costumes. This is how opera should be consumed!
Trailer (in italiano)
Netflix

La terra degli uomini rossi (BirdWatchers) (Brazil, 2008):
A native tribe, tired of living on the reservation and relying on the local convenience store for their food, decides they are going to move back to their ancestral land. The farmer whose family has been working that land for three generations has other ideas. Nothing is black-and-white.
Trailer
Netflix

Contracorriente (Undertow) (Peru, 2009):
Set in a pretty Peruvian beach town, a married fisherman has an affair with an itinerant (male) painter. After the painter dies, he has an important decision to make. Well done!
Trailer
Netflix

El Regalo de la Pachamama (The Gift of Mother Earth) (Bolivia/Japan, 2008):
This one can be slow at times, especially in the beginning as it chronicles life in the salt flats of Bolivia, but then the real story begins. For the first time, the 13-year-old son accompanies his father on the three-month trek with a caravan of llamas to make the annual delivery of salt to the mountain villages. Here he (and we) experiences life outside his small world and meets people that will change that life.
Trailer (in Quechua with subtitles in 日本語)

Amar (To Love) (México, 2009):
A very funny sexual comedy, but one that’s well crafted with good story lines.
Trailer
Netflix

Os Normais 2 (Brazil, 2009):
A very very silly film about a couple bored with their sexual routine who go out in search of someone to fulfill their fantasy of a ménage a trois. I was laughing so hard throughout the film, and that’s worth a lot sometimes.
Trailer (em Português)

I apologize for the dearth of English-language trailers for these films. I scoured the web looking for them but few were to be found as most of these films do not yet have a US distributor nor are most yet available in the U.S. with English subtitles.

For someone else’s favorites (and it’s someone whose opinion on film I respect), see Phil Luque’s blog post.

Xmas Lights & Ochazuke Dinner

I headed over to Tokyo Midtown the other day to check out their Christmas light display, consisting of over 40,000 LEDs.

Tokyo Midtown Christmas Lights

Tokyo Midtown Christmas Lights and Tokyo Tower

After looking at the lights from every conceivable angle, I went to take in their free Christmas concert by Meg, and after that I went hunting for dinner. I ended up lining up to get in to Kyo Hayashiya, a shop that specializes in tea-based sweets. I wasn’t interested in their tea cakes, but in a special offering of ochazuke, with a choice of salmon or tarako. I ordered the tarako.

たらこお茶漬けセット

たらこお茶漬けセット

You pour the tea from the pot over the rice and add the various toppings from the small dishes. It was all quite delicious!

Japanese Bakeries

When I first started coming to Japan, I was underwhelmed by the offerings on hand in the country’s bread and pastry shops. Since that time, things have greatly improved (or was it just my mind that expanded?).

The other day, I knew I’d be having a big dinner so I just wanted a simple small lunch that would leave me hungry for my first taste of ふぐ. I decided to head to my local outlet of the Vie de France chain, as I had a hankering for their black sesame & banana drink.

Vie de France lunch

Vie de France lunch

In addition to the aforementioned drink, I had a maple scone (made with real maple syrup) and a bread roll stuffed with edamame and ham.

It was all so good and so filling, I started to worry that I wouldn’t have room for that big dinner.

The Perfect Lunch

It’s for meals like this that I come to Japan.
赤魚定食

A piece of “red fish” cooked in mirin, with all the fixin’s. This can be yours too, if you’re in Ikebukuro, for only 680 yen (lunch time only), tax included.

British Interest in American Election

I was walking along a small suburban London street yesterday when I heard a woman tell her male friend “I just wasted most of the day watching election coverage”.

I thought hard but couldn’t recall any British election going on right now. Could she possibly mean our election?

Sure enough, she went on to talk about watching all the speeches from the “Republican Conference”, as well as Michelle Obama’s speech from last week’s convention, all on the BBC website.

I didn’t identify myself as an American (or elsewise for that matter) so I could eavesdrop research without affecting the results.

She went on to say that she found Sarah Palin to be “absolutely abhorrent” and that she couldn’t “wrap her mind around how anyone could possibly vote for these people.” I couldn’t agree more.

After I found my way back to my hostel, I noticed that BBC television was breaking into programming (mostly American sitcoms) to play any RNC speeches they considered interesting.

And the headline on one of London’s free daily newspapers today was
McCAIN: STAND UP AND FIGHT WITH ME

This level of interest surprised me, I guess because British politics receives barely a mention on American newscasts and in the public sphere (diehard C-SPAN watchers notwithstanding). But then the Brits don’t go around bullying others and starting wars. Anymore.

Traditional Culture Experiencing Zone

I couldn’t help but wonder if these two locations were in fact one and the same…

The same place?

The same place?

OK, to be fair, there was a lot less smoking in Korea than in Japan. For example, smoking is prohibited in most restaurants in Korea, a situation unimaginable in my homeland.

Next Page »