More fun with Signed / Unsigned Comparisons

Here is why one should be very careful while mixing signed and unsigned integer comparisons. Take a look at this code snippet below: #include <iostream> #include <string> int main(int argc, char *argv[]) { std::string presidentsOrders = “NO lets do more sanctions”; unsigned int pos; pos = presidentsOrders.find(“YES”); if (pos != std::string::npos) { std::cout << “Lets … [Read more…]

Using Lets Encrypt Certificates for Postfix and Dovecot

Recently, the self-signed certificates that I use for Postfix / Dovecot on my mailserver expired and I decided to try using Lets Encrypt to obtain certificates for them. Lets Encrypt is a fully trusted free Certificate Authority developed by a consortium of organizations to promote a more secure internet. I particularly like the fact that … [Read more…]

Using ddclient for DDNS

I use ddclient to update my dynamic IP address which is assigned by Comcast. This is the gist for the ddclient configuration: # Configuration file for ddclient generated by debconf # # /etc/ddclient.conf daemon=5m syslog=yes use=if, if=eth0 ssl=yes use=web, web=myip.dnsomatic.com protocol=freedns login=abcd password=’CENSORED’ asrivas.me www.asrivas.me mailserver.asrivas.me