Restrict Domains Postfix Sends To

Another entry tagged "Er, I can't believe I didn't know that" with a side note in "bleedin' obvious".

To arbitrarily restrict which domains a postfix instance will send to (when receiving email via SMTP) you can simply add the following lines to your main.cf:

relay_domains = example.com,lunarlamp.co.uk,google.com
smtpd_recipient_restrictions = reject_unauth_destination

I promise to post some interesting stuff soon, rather than these banal little snippets!

Working config for Bethere static IP on a Cisco 877

Below is part of the configuration that I use for my Cisco 877 on be*, with some thoughts and tips following it.

Minicom "break" sequence to cisco device

I was trying to reset a password that I had forgotten on a cisco 877. Standard procedure is to turn it off, wait 5 seconds, turn it back on, and hit the Break key. However, I use minicom to access my cisco devices over serial cables, and this did not work. It took me a while to work out that, because I was using minicom, I needed to send it 'ctrl-A' and then 'F' instead (it will display "sending break" if done correctly).

Just a reminder to myself really, and here in case someone finds this via google.

Sync thunderbird and an E71 using Funambol - it works!

I sat down earlier today and decided that I really should be able to sync my calendar and contacts between my phone (Nokia E71) and my email client of choice Thunderbird. This was more complex in design, and yet simpler to achieve, than expected. I believe the method detailed would work for any Symbian S60 phone, and Funambol itself supports far many more devices than this and I suspect the procedure for those would be nearly identical.

Do I have a 64bit CPU?

As the case is with many large companies, there are boxes floating around in data centres here that I know very little about; they've been there for years working away nicely and all is good. These boxes are now being retired and I was unsure whether I could procure them to be used in a quick lab-environment to test out some ideas for a future project.

The problem was that I needed 64bit CPUs, and I knew that all these boxes had 32bit OSs installed. This is easy to discern:

grep flags /proc/cpuinfo

Getting images from an eBay gallery

While I won't go into the exact reasons, I recently wanted to get the images used in an ebay auction of an item I had won. Frustratingly, however, eBay's gallery interface does not allow me to do the normal "right-click>save image as" shenanigans, so I had to come up with an alternative. It's simple to get the image from your (firefox) browser cache, but can be a little tricky to identify which images are the ones you're looking for as they're all cryptically named.

USB Broadband Dongle on Three - in Linux

Getting my USB dongle to work in Linux was shockingly easy. I don't know if I was just lucky, but I'd put off buying this for a long time, as I was convinced it would be hard to get to work in Linux. In reality it took less than 2 minutes from start to finish, and no effort at all. Here is the process for Ubuntu 8.10:

1. Open packet.
2. Insert SIM Card into dongle.
3. Turn on laptop.
4. Plug in dongle.
5. Wait for GUI to pop up.
6. Confirm your network, (in my case '3', which was auto-detected).

USB Panic Button on Linux

I found this USB "big red button" recently, and decided that I'd love to have a play with it, using it to run dangerous scripts. At just £5, it was worth the risk of lack of Linux support.

Amazon's MP3 Service on 64bit Linux

I was rejoicing in the streets about Amazon's DRM-free mp3 service when it was announced that it was available in the UK. My joy was undiminished when I saw that I had to use a download program to obtain my mp3s, because they supported *several* Linux distros. There was one problem however - they do not support 64bit, but this is simple to work around.

Anonymising IP addresses in apache logs

Apache logs are great, and with the right settings, are a wealth of information about browser versions, and a myriad of visitor statistics. However, as a lazy person, I didn't want to do the analysis of them myself, nor did I want to sort out more conventional monitoring (for example Google Analytics). I decided to get someone else to look at the logs for me. However, in a nod towards privacy, I did not want to provide them with the list of IP addresses of the users that had hit that web server, but simply removing all the IP addresses would have lost a large chunk of potentially useful data. A simple hashing of the IP address should suffice, but this turned out to be slightly more difficult than I had initially anticipated, possibly largely due to my lack of familiarity with awk. However, I must give much thanks to gnomon on #awk on freenode for his help, and the script provided is all his work.

Copyright

Creative Commons License

This work is licenced under a Creative Commons Licence.

User login