Vodafone GPRS pricing revised

Vodafone have revised their GPRS pricing and it’s now a lot cheaper (AFAIR). Thankfully my USB Bluetooth adaptor came yesterday (Thanks Niall!), so now I only have to figure out how to get it working in Linux with my Nokia 7650! Any help appreciated! (via Peter)

Edit in 2025: I fixed the link to that pricing page. Look at that, 3 Euro per megabyte of GPRS data. You’d burn through that looking at Facebook in a second or two.

Regular Expressions: Finding Email Addresses

Recently I fixed the Sendmail configuration on one of our boxes, and I’m now inundated daily with over 1700 return mails from old and expired email addresses. This is the second day so I decided to combat it:

  1. Create a procmail script to redirect all the bounced mails into a file.
  2. Grab all the email addresses from that file and create SQL statements to disable sending mail to those users of our site.

With Google’s help, I came up with the following procmail recipe, and stuffed it into my .procmailrc:

:0
* ^From: .*MAILER-DAEMON.*
* ^Subject:.*(Undeliverable|failure notice|Returned mail:|Delivery (Status )?Notification|Mail System Error|Delivery fail|Nondeliverable mail|Message status – undeliverable|Mail Delivery Problem|Notification d’état de la distribution).*
RETURNS

That should catch almost all the returns sent to my inbox.
I used the following code to extract the emails from the RETURNS file. It can probably be done better, but this works well enough.

awk -F “< " '// {print $2}’ ” ‘{print $1}’| sort|uniq

I then grep out bogus lines such as the ones smtp servers add, opened the file in vi and added SQL statements around each email address. I expect a lot less email in my inbox tomorrow..

Here’s a handy online regex tester if you want to test a regular expression easily.