TannieSpace

geekery, drawing and then some

Posts about textmate

Using postfix to get my shoppinglist per txt

My cell-phone provider lets me send messages to e-mail using txt and the reply will then come back to my cellphone through their e-mail to txt gateway.

This made me think of a setup where I'd send a message to my mailserver (txt message that gets forwarded to e-mail), requesting my shoppinglist. With all the new phones around a special phone e-mailaddress would also work.

First I activated the address by putting list@mydomain.com list in /etc/postfix/virtual and /etc/postfix/virtual-mailbox-maps

then I postmapped both: postmap /etc/postfix/virtual and postmap /etc/postfix/virtual-mailbox-maps (this step can wait till after the next one, but as it didn't really matter, why not straight away)

In the file /etc/postfix/aliases, I added: list: |/Users/tannie/bin/list.sh

This points the user 'list' to a script (the | puts it through) in my ~/bin directory called 'list.sh' View the content of that script

Anything else than 'list' will ofcourse work as an alias, you'd just have to set it up like that.

If I send a message to 'list+shop@mydomain.com' with the subject 'list @supermarket' it'll send back a message with the body:

potatoes @supermarket
 milk @supermarket @farmer
 eggs @supermarket

The script will only allow listing, it does pretend to 'do' things if you make the subject 'do 3' or something like that, but due to rights it won't actually do it. I don't mind, I just need it for listing anyway.