ran...@skurelabs.com:
> Thanks for all your quick and timely responses. We have started using another 
> java milter library which helps us quarantine and release mails.
> But the problem is using milter, we can quarantine the email, which goes to 
> hold queue. To release that email, we have to use postsuper command from 
> terminal. We have emulated that in java using Runtime library.
> Is there anyway, we can send commands through milter to get list of all 
> quarantined emails(in hold queue) and release emails?
> We are fine to support postfix code changes to enable these two use cases. I 
> would appreciate your help on this.
> 

You cannot use the Milter protocol to make a connection to Postfix.
Instead, Postfix makes a connection to a Milter when it wants to
receive ONE email message. the Milter can't use that connection to
send requests to Postfix about other email messages, and it would
not make sense to change that protocol.

The Milter application can know the queue ids, sender, and recipients.
Of course that information is also available with the postqueue
command. Use 

    postqueue -j | jq 'select(.queue_name=="hold")'

to get JSON-formatted info about quarantined messages.

You can use "postcat -qbh queueid" to look inside an email message,
and postsuper -H queueid to unquarantine it. Keep in mind that a
message will be released for all its recipients.

        Wietse

Reply via email to