Archive for June, 2014

Mac OS X Mail: Detailed connection logging

Posted in Miscellaneous on June 11th, 2014 by Joachim – Comments Off

Almost every time Apple decides to release a new version of Mail I run into trouble connecting to my mail-server. This was true as Mavericks came out and now again with Yosemite. The normal activity window is not very helpful here, because it does not offer enough details about the dialog that is taking place between the client and the server.

To get a more detailed connection log, quit mail if it’s currently running and open “Terminal”. Type the following on the command line:

/Applications/Mail.app/Contents/MacOS/Mail -LogActivityOnHost YOUR.SERVER >& ~/Desktop/ConnectionLog.txt &

Replace YOUR.SERVER with the name of the mail server you are connecting to.

This will create the file “ConnectionLog.txt” on your desktop. Here you’ll find detailed information about what is going on between the Mail-Client and the Mail-Server.

Building OpenSSL for iOS with a Run-Script action from within Xcode

Posted in Development on June 6th, 2014 by Joachim – Be the first to comment

There are many scripts out there in the Web that help building OpenSSL for iOS and iOS-Simulator for different architectures. For instance https://github.com/x2on/OpenSSL-for-iPhone and https://gist.github.com/foozmeat/5154962. All of these scripts work fine when invoked from the command line. But as soon as you put them into a run-script action of Xcode, the make process will fail with different, unspecified errors. Most of the Time  you’ll get something like:

Undefined symbols for architecture i386:
"_ENGINE_load_gost", referenced from:
_ENGINE_load_builtin_engines in libcrypto.a(eng_all.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_app.] Error 1
make[1]: *** [openssl] Error 2
make: *** [build_apps] Error 1

It took me a long time to figure out the problem, but the solution is easier than you would imagine! Just add the following line to the script before “Configure” or “make” is called:

export COMMAND_MODE=unix2003

That’s all! Building OpenSSL from within Xcode should now work as expected.

Have fun!