I would like to use Postfix as an MTA to deliver emails that I create locally using a Python SMTP client. But I would like to handle the re-sending of emails manually, rather than using Postfix's automatic queues. I also want to get the status codes from the destination server back to Python through my local Postfix. Is this possible?

EDIT: See comment below.


It sounds you don't want to rely on a MTA at all, but want to handle everything within your own code. If that is the case, don't use postfix as the MTA...

But I think that if you set bounce_queue_lifetime to 0 only a single delivery attempt will be made.

It might be useful to create your own bounce_service_name to handle delivery failures instead of the using the default postfix bounce daemon, if you don't want to parse the (non-)delivery status log and/or bounce messages.