Ross M. W. Bennetts

@ rossbennetts.com

March 13th, 2016

[Originally published by Charles Gutjahr as ‘adding a catchall to OS X Server Mail‘, that site seems to have vanished in early 2016 so I’ve recovered this important article from Google’s cache before it expires and re-published it here]

OS X Server 5 provides very few options for its inbuilt mail server, and does not provide an apparent way to configure a catchall — an inbox that receives all email sent to your domain. Catchalls risk being spammed, but catchalls are still valuable if you use a different email address for every website – as I do.

Fortunately the mail server in OS X Server is powered by Postfix, an open-source mail transfer agent that has plenty of options, including support for catchalls. I couldn’t find another guide on how to do this, so here is mine:

tl;dr

Create a new Postfix virtual alias file with the catchall definition — don’t try to edit the one OS X Server generates — then use Apple’s serveradmin tool to change the Postfix virtual_alias_maps setting to include both your virtual alias file and the one generated by OS X Server.

Step-by-step guide

1. Choose a user

You need to pick one user that the catchall delivers to. You can choose your normal user if you like, but I recommend that you create a new user which is dedicated to receiving catchall email. That allows you to easily separate important email sent directly to you from the unimportant email your catchall will likely get.

For my example, I created a user called catchall.

2. Create a virtual users file

Postfix catchalls are normally configured in a virtual users file, and a standard installation of OS X Server 5 includes such a file in /Library/Server/Mail/Config/postfix/virtual_users. However OS X Server controls that file and will overwrite it whenever it chooses, so you cannot configure your catchall in here without the risk of it being lost.

Instead, use Terminal to create a new file called virtual_catchall in the same folder:

$ sudo nano /Library/Server/Mail/Config/postfix/virtual_catchall

Add line for each catchall that you want. Write your domain name (with an @ prefix) first, then a tab, then the name of the user you chose to receive the catchall emails. So if your domain is example.com and your usercatchall then write this in your file:

@example.com    catchall

If you’re using nano to edit the file, type Ctrl-O, Return, Ctrl-X to save and close the file.

3. Compile the virtual users file

Postfix does not read your new file directly, but instead will read a compiled binary version of it. To produce that, run postmap:

$ sudo postmap /Library/Server/Mail/Config/postfix/virtual_catchall 

4. Update OS X Server’s configuration

The final step is to tell OS X Server to use your new virtual_catchall file in addition to the one that already exists. Again, you cannot edit the Postfix configuration files directly because OS X Server will overwrite them. Instead in this case you must use Apple’s serveradmin tool.

First check what your current virtual_alias_maps setting is by looking at the main Postfix config file:

$ grep "^virtual_alias_maps" /Library/Server/Mail/Config/postfix/main.cf

By default it should be:

virtual_alias_maps = $virtual_maps hash:/Library/Server/Mail/Config/postfix/virtual_users

You need to take that existing setting and your catchall file onto the end. The critical thing is to use serveradmin to do that instead of editing the file directly:

$ sudo serveradmin settings mail:postfix:virtual_alias_maps = $virtual_maps hash:/Library/Server/Mail/Config/postfix/virtual_users hash:/Library/Server/Mail/Config/postfix/virtual_catchall

OS X Server will immediately apply the changes to Postfix, and your catchall should now be accepting email. It is worth checking that the main Postfix config file was updated correctly, ie:

$ grep "^virtual_alias_maps" /Library/Server/Mail/Config/postfix/main.cf

This time you should see something like:

virtual_alias_maps = hash:/Library/Server/Mail/Config/postfix/virtual_users hash:/Library/Server/Mail/Config/postfix/virtual_catchall

I notice that the $virtual_maps setting disappeared on my system when I did this. I don’t know why that is, but given that its loss didn’t seem to cause problems I haven’t looked into it.

The final test is simple: just email any random email address @ your domain and you should see it arrive in your catchall inbox!

April 6th, 2013

DiabloMiner doesn’t seem to support the stratum protocol yet so I decided to give cgminer a try.

This is what worked for me on Mountain Lion 10.8.3:

  • Install Xcode by Apple
  • Install Xcode Command Line Tools:
    Run Xcode and go to Preferences -> Downloads -> Components -> Command Line Tools … and click “Install”.
  • Install MacPorts
  • in a terminal:

sudo port selfupdate

sudo port install autoconf automake binutils boost bzip2 curl curl-ca-bundle db48 flex gdbm gettext glib2 gnutls gperf help2man icu jansson jpeg kerberos5 libffi libgcrypt libgpg-error libiconv libidn libpng libtasn1 libusb lzo2 m4 miniupnpc ncurses openssl ossp-uuid p5-locale-gettext perl5 pkgconfig pv qrencode readline texinfo xz yasm zlib

git clone https://github.com/ckolivas/cgminer.git

Download the latest .tar.bz2 fom http://ck.kolivas.org/apps/cgminer/ and extract the contents

cd cgminer

./autogen.sh

./configure CFLAGS=”-O3″

make

./cgminer

There are many other configuration options available, have a look at the cgminer README file for more information.

I havent figured out how to get the ADL SDK working on OSX, so GPU monitoring is disabled.

I’m getting ~57MH/s on the Radeon HD 6630M in my Mid 2011 Mac mini using the diablo kernel with a worksize of 64 and dynamic intensity.

Thanks to adam, dan, phraust & ckolivas

Donations to rmwb’s asic fund:   164p2zdt1ksASsMufRtwp8cF3M2G6pfXic

Send Bitcoin

 

 

 

 

 

 

February 6th, 2010
Mac mini server

rossbennetts.com is now hosted on this Mac mini server

After much mucking about, I finally got my new Mac mini server up and running and doing everything I used to do with Ubuntu (and more and more easily). Thanks to Kevin Leah for his very simple yet comprehensive how-to entitled Running WordPress on OS X 10.6 Snow Leopard Server and of course, thanks to Matt & the WordPress crew for making the installation of WordPress such a breeze.

Now if only I can maintain my vow to write blog posts more often… 🙂