I am trying to create a milter (in python with ppymilter) for postfix to allow users to send only a specific amount of emails per day.
In the OnEndBody function I increment a counter field in my database and in OnMailFrom I read the field and if it is bigger than the daily limit I will return self.CustomReply('554', '5.7.1 Mail limit reached') In my debug log I can see that the milter sends "y554 5.7.1 Mail limit reached" to postfix in reply of "M<mailadres>". So to me it looks like the milter is working correct, but postfix does not always give a error code. Half of the mails is just accepted and delivered. Is this a bug in my milter or in postfix? Can it be solved? Regards, René