Using HKBiologicalSexObject in HealthKit

If you need to get the sex from Health then ask the normal way but add sex

HKCharacteristicType *sex = [HKCharacteristicType characteristicTypeForIdentifier:HKCharacteristicTypeIdentifierBiologicalSex];

then to get the users sex


HKBiologicalSexObject *sex = [self.healthStore biologicalSexWithError:&error];
NSLog(@"you are %d sex",sex.biologicalSex);

which returns 0 for no sex, 1 for female and 2 for male.



Install OpenDKIM for DKIM validation on Ubuntu

First lets install OpenDKIM

sudo apt-get install opendkim opendkim-tools

then we need to edit our Postfix configuration to route to OpenDKIM

sudo nano /etc/postfix/main.cf

add the following to the end of the file (noting that I have changed the default port to use)

# DKIM
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:43556
non_smtpd_milters = inet:localhost:43556

Continue reading