Add posted messages to the database.