Florian Pritz: > Hi, > > I've currently set delay_warning_time = 4h and maximal_queue_lifetime = > 5d, which are nice values and all, but if I get a delay DSN I'd like to > know sooner than after 5 days if the mail went through. > > I can't seem to find an option that sends me a positive DSN for delayed > mail, is there one? If not, is this something you'd consider implementing?
I think that this can be implemented without a significant amount of code. Thus, it is likely to work correctly. First, when the queue manager selects a message for delivery, it needs to find out that a "delayed" DSN was sent for that message. That is easy. Each Postfix queue file either contains no delay warning record, or it contains a delay warning record with a time value that says when to send a "delayed" warning. A zero time value means that the "delayed" warning was already sent. Once the queue manager sees that the "delayed" DSN was already sent, it sets a new NOTIFY flag for all subsequent delivery attempts. That new flag is almost like the standard NOTIFY=SUCCESS flag, except that this flag is not sent to a remote SMTP server. Instead, the Postfix SMTP client reports a "relayed" status. Other Postfix delivery agents will treat this new flag as the standard NOTIFY=SUCCESS flag, and report a "delivered" status. Wietse