Back in 2009 I had written a C program for Linux that was a greylist daemon to help filter out spam. It worked well with the exim mail server and can work with other servers as well. I opted to write it in C because at the time I wanted the best performance available for lower-grade machines used as mail servers.
I recently placed the files in github: at https://github.com/MarioGiannini/mgreylist
The project demonstrated using C for Linux socket communications, creating a daemon/service, as well as a client program to test the daemon. It also includes a man page file and a make file.
While it may no longer be a viable service, it provides a simple demonstration for getting started with a variety of Linux programming topics.