delay all email to a defined sender list

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

delay all email to a defined sender list

Eric Smith-10
Hi List,

It happened just one time too many today, in a rushed moment
sending the wrong email to the wrong person.

Is it possible to exclusively delay sending mail to specific
recipients that appear on in a list?

This way I suspected such an error of an email to one the special
recipients, then I could still delete the email from the queue.

Best
Eric
Reply | Threaded
Open this post in threaded view
|

Re: delay all email to a defined sender list

Bill Cole-3
On 14 Sep 2018, at 16:00, Eric Smith wrote:

> Hi List,
>
> It happened just one time too many today, in a rushed moment
> sending the wrong email to the wrong person.
>
> Is it possible to exclusively delay sending mail to specific
> recipients that appear on in a list?

That is logically a feature that belongs in a mail client, not a mail
server. Postfix offers no direct way to do anything like it.

An indirect way to implement something like that would be to add a
check_recipient_access restriction with a list of addresses mapped to
HOLD. You could then either manually or in an automated way run
"postsuper -H ALL" to release the held mail or write something more
complicated to selectively un-hold messages based on age.

> This way I suspected such an error of an email to one the special
> recipients, then I could still delete the email from the queue.


Reply | Threaded
Open this post in threaded view
|

Re: delay all email to a defined sender list

Viktor Dukhovni
> On Sep 14, 2018, at 4:51 PM, Bill Cole <[hidden email]> wrote:
>
>> It happened just one time too many today, in a rushed moment
>> sending the wrong email to the wrong person.
>>
>> Is it possible to exclusively delay sending mail to specific
>> recipients that appear on in a list?
>
> That is logically a feature that belongs in a mail client, not a mail server. Postfix offers no direct way to do anything like it.
>
> An indirect way to implement something like that would be to add a check_recipient_access restriction with a list of addresses mapped to HOLD. You could then either manually or in an automated way run "postsuper -H ALL" to release the held mail or write something more complicated to selectively un-hold messages based on age.

Postfix 2.3-20051202 introduced conditionally compiled code for a "DELAY"
access(5) action, but this never became a default-enabled feature.  You'd
need to compile Postfix with "-DDELAY_ACTION" to get it, and I don't know
how recently this was last tested.  It may no longer work, and perhaps was
never ready for prime-time (otherwise might have made it as a standard
feature into some release).

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: delay all email to a defined sender list

Viktor Dukhovni


> On Sep 14, 2018, at 5:41 PM, Viktor Dukhovni <[hidden email]> wrote:
>
> Postfix 2.3-20051202 introduced conditionally compiled code for a "DELAY"
> access(5) action, but this never became a default-enabled feature.  You'd
> need to compile Postfix with "-DDELAY_ACTION" to get it, and I don't know
> how recently this was last tested.  It may no longer work, and perhaps was
> never ready for prime-time (otherwise might have made it as a standard
> feature into some release).

The pertinent comment in the code is:

+    /*
+     * The DELAY feature is disabled because it has too many problems. 1) It
+     * does not work on some remote file systems; 2) mail will be delivered
+     * anyway with "sendmail -q" etc.; 3) while the mail is queued it bogs
+     * down the deferred queue scan with huge amounts of useless disk I/O
+     * operations.
+     */

These concerns are not insurmountable if the file-system is not uncooperative,
and the volume of delayed mail is small, but they do stand in the way of this
being a mainstream Postfix feature as-is.

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: delay all email to a defined sender list

Wietse Venema
Viktor Dukhovni:

>
>
> > On Sep 14, 2018, at 5:41 PM, Viktor Dukhovni <[hidden email]> wrote:
> >
> > Postfix 2.3-20051202 introduced conditionally compiled code for a "DELAY"
> > access(5) action, but this never became a default-enabled feature.  You'd
> > need to compile Postfix with "-DDELAY_ACTION" to get it, and I don't know
> > how recently this was last tested.  It may no longer work, and perhaps was
> > never ready for prime-time (otherwise might have made it as a standard
> > feature into some release).
>
> The pertinent comment in the code is:
>
> +    /*
> +     * The DELAY feature is disabled because it has too many problems. 1) It
> +     * does not work on some remote file systems; 2) mail will be delivered
> +     * anyway with "sendmail -q" etc.; 3) while the mail is queued it bogs
> +     * down the deferred queue scan with huge amounts of useless disk I/O
> +     * operations.
> +     */
>
> These concerns are not insurmountable if the file-system is not uncooperative,
> and the volume of delayed mail is small, but they do stand in the way of this
> being a mainstream Postfix feature as-is.

Would it be a problem to execute a 'HOLD' action, and this avoid
the queue pollution problem?

        Wietse