Delaying mail delivery

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

Delaying mail delivery

Vishal Agarwal-2

Dear All,

 

                I want to keep the messages waiting in queue for delivery for certain time of period  (say 10 minutes) destination wise. Presently as soon as the message is being received by postfix is being delivered in the same time. I want to keep message staying in queue for delivery for 10 minutes, and that also destination wise.

 

Thanks/regards,

Vishal Agarwal

 

Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Noel Jones-2
On 4/19/2012 11:55 PM, Vishal Agarwal wrote:

> Dear All,
>
>  
>
>                 I want to keep the messages waiting in queue for
> delivery for certain time of period  (say 10 minutes) destination
> wise. Presently as soon as the message is being received by postfix
> is being delivered in the same time. I want to keep message staying
> in queue for delivery for 10 minutes, and that also destination wise.
>
>  
>
> Thanks/regards,
>
> Vishal Agarwal
>
>  
>

Postfix does not have any controls for delaying mail.

You might be able to hack something together with some scripts using
the postsuper hold/release functions.
http://www.postfix.org/postsuper.1.html


 -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Wietse Venema
On 4/19/2012 11:55 PM, Vishal Agarwal wrote:
>                 I want to keep the messages waiting in queue for
> delivery for certain time of period  (say 10 minutes) destination
> wise. Presently as soon as the message is being received by postfix
> is being delivered in the same time. I want to keep message staying
> in queue for delivery for 10 minutes, and that also destination wise.

Noel Jones:
> Postfix does not have any controls for delaying mail.
>
> You might be able to hack something together with some scripts using
> the postsuper hold/release functions.
> http://www.postfix.org/postsuper.1.html

Postfix provides per-destination rate limits, not per-message delays.

http://www.postfix.org/postconf.5.html#transport_destination_rate_delay

Example: smtp_destination_rate_delay = 600

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Jeroen Geilman
On 2012-04-20 17:03, Wietse Venema wrote:

> On 4/19/2012 11:55 PM, Vishal Agarwal wrote:
>>                  I want to keep the messages waiting in queue for
>> delivery for certain time of period  (say 10 minutes) destination
>> wise. Presently as soon as the message is being received by postfix
>> is being delivered in the same time. I want to keep message staying
>> in queue for delivery for 10 minutes, and that also destination wise.
> Noel Jones:
>> Postfix does not have any controls for delaying mail.
>>
>> You might be able to hack something together with some scripts using
>> the postsuper hold/release functions.
>> http://www.postfix.org/postsuper.1.html
> Postfix provides per-destination rate limits, not per-message delays.
>
> http://www.postfix.org/postconf.5.html#transport_destination_rate_delay
>
> Example: smtp_destination_rate_delay = 600
>
> Wietse

That allows one message to that destination every 10 minutes, not
delivery after 10 minutes.
So the delays will be longer than what he wants if there are more than 1
messages per 10 minutes received per destination, and shorter than he
wants if there are less.

Just to inform the OP that it's probably not his solution without
further tweaking.

Of course, we don't know why this is deemed necessary - his real problem
may be easily solvable using other means.

--
J.

Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Vishal Agarwal-2
> On 2012-04-20 17:03, Wietse Venema wrote:
>> On 4/19/2012 11:55 PM, Vishal Agarwal wrote:
>>>                  I want to keep the messages waiting in queue for
>>> delivery for certain time of period  (say 10 minutes) destination
>>> wise. Presently as soon as the message is being received by postfix
>>> is being delivered in the same time. I want to keep message staying
>>> in queue for delivery for 10 minutes, and that also destination wise.
>> Noel Jones:
>>> Postfix does not have any controls for delaying mail.
>>>
>>> You might be able to hack something together with some scripts using
>>> the postsuper hold/release functions.
>>> http://www.postfix.org/postsuper.1.html
>> Postfix provides per-destination rate limits, not per-message delays.
>>
>> http://www.postfix.org/postconf.5.html#transport_destination_rate_delay
>>
>> Example: smtp_destination_rate_delay = 600
>>
>> Wietse
>
> That allows one message to that destination every 10 minutes, not
> delivery after 10 minutes.
> So the delays will be longer than what he wants if there are more than 1
> messages per 10 minutes received per destination, and shorter than he
> wants if there are less.
>
> Just to inform the OP that it's probably not his solution without
> further tweaking.
>
> Of course, we don't know why this is deemed necessary - his real problem
> may be easily solvable using other means.
>
> --
> J.
>
>

Thanks all,

I feel that all the messages has to be kept in queue as hold and there
should be some script that will check the queue receiving time and will
create a crontab with postsupre -r [message ID] for defined time to be
released for the each and every message. so the purpose will be solved.
The script itself should be croned for every 5 minutes to run automatically.

Thanks
Vishal Agarwal



Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Wietse Venema
[hidden email]:
> I feel that all the messages has to be kept in queue as hold and there
> should be some script that will check the queue receiving time and will
> create a crontab with postsupre -r [message ID] for defined time to be

Please describe the PROBLEM that you are trying to solve
(why delay mail), instead of the SOLUTION (hold and cron)?

For example,

- To avoid receiver mail rate limits (there is a better solution
  in Postfix than hold+cron)

- To inspect mail for badness (there is a better solution in Postfix
  than hold+cron)

- Something else.

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Vishal Agarwal-2

> [hidden email]:
>> I feel that all the messages has to be kept in queue as hold and there
>> should be some script that will check the queue receiving time and will
>> create a crontab with postsupre -r [message ID] for defined time to be
>
> Please describe the PROBLEM that you are trying to solve
> (why delay mail), instead of the SOLUTION (hold and cron)?
>
> For example,
>
> - To avoid receiver mail rate limits (there is a better solution
>   in Postfix than hold+cron)
>
> - To inspect mail for badness (there is a better solution in Postfix
>   than hold+cron)
>
> - Something else.
>
> Wietse
>
Some users are there; they call me once they press the send/receive button,
yelping "Vishal I did some mistake in that email, can you get it back
!!!!" without knowing that once they have pressed the button for
send/receive and the email is delivered within 4 - 20 seconds to
destination.

Vishal Agarwal


Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Reindl Harald-2


Am 23.04.2012 04:23, schrieb [hidden email]:

>> Please describe the PROBLEM that you are trying to solve
>> (why delay mail), instead of the SOLUTION (hold and cron)
>
> Some users are there; they call me once they press the send/receive button,
> yelping "Vishal I did some mistake in that email, can you get it back
> !!!!" without knowing that once they have pressed the button for
> send/receive and the email is delivered within 4 - 20 seconds to
> destination

call your users braindead idiots and hang up the phone
do not mess up servers because some morons and degarde
service quality (delays) because of them

millions people out there are using email and NOBODY
can phone the admin to take back a sent message

sounds you have not enough useful work :-)


signature.asc (270 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Frank Bonnet


Envoyé de mon iPhone.


Le 22 avr. 2012 à 16:31, Reindl Harald <[hidden email]> a écrit :

>
>
> Am 23.04.2012 04:23, schrieb [hidden email]:
>
>>> Please describe the PROBLEM that you are trying to solve
>>> (why delay mail), instead of the SOLUTION (hold and cron)
>>
>> Some users are there; they call me once they press the send/receive button,
>> yelping "Vishal I did some mistake in that email, can you get it back
>> !!!!" without knowing that once they have pressed the button for
>> send/receive and the email is delivered within 4 - 20 seconds to
>> destination
>
> call your users braindead idiots and hang up the phone


it depends WHO is calling you ;-)
if it is the boss ...

> do not mess up servers because some morons and degarde
> service quality (delays) because of them
>
> millions people out there are using email and NOBODY
> can phone the admin to take back a sent message
>
> sounds you have not enough useful work :-)
>
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Simon Brereton-2
In reply to this post by Vishal Agarwal-2


On Apr 22, 2012 10:23 PM, <[hidden email]> wrote:
>
>
> > [hidden email]:
> >> I feel that all the messages has to be kept in queue as hold and there
> >> should be some script that will check the queue receiving time and will
> >> create a crontab with postsupre -r [message ID] for defined time to be
> >
> > Please describe the PROBLEM that you are trying to solve
> > (why delay mail), instead of the SOLUTION (hold and cron)?
> >
> > For example,
> >
> > - To avoid receiver mail rate limits (there is a better solution
> >   in Postfix than hold+cron)
> >
> > - To inspect mail for badness (there is a better solution in Postfix
> >   than hold+cron)
> >
> > - Something else.
> >
> >       Wietse
> >
> Some users are there; they call me once they press the send/receive button,
> yelping "Vishal I did some mistake in that email, can you get it back
> !!!!" without knowing that once they have pressed the button for
> send/receive and the email is delivered within 4 - 20 seconds to
> destination.

Why not force spell-checking on the clients - that should allow for some error checking..

As others have and will say - your job is IT admin, not hand-holding people too stupid to check their work. Some of these users probably even have degrees ffs!

Simon

Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Thomas Leuxner
In reply to this post by Vishal Agarwal-2
Am 23.04.2012 um 04:23 schrieb [hidden email]:

> Some users are there; they call me once they press the send/receive button,
> yelping "Vishal I did some mistake in that email, can you get it back
> !!!!" without knowing that once they have pressed the button for
> send/receive and the email is delivered within 4 - 20 seconds to
> destination.

That's a hilarious fix. Maybe reconsider if those senders should be allowed to send mail *at all* or would need a second set of eyes. For the latter you may probably streamline the first set going forward.

signature.asc (210 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Reindl Harald-2
In reply to this post by Frank Bonnet
do NOT USE REPLY ALL permanently on lists

this results in broken threads if the receivers server
filters duplicates and a lot of spam happening last week
caused by a spam-list where people wrote over days
"do not write me mails that you do not want mails"


Am 22.04.2012 16:59, schrieb Frank Bonnet:
>>> Some users are there; they call me once they press the send/receive button,
>>> yelping "Vishal I did some mistake in that email, can you get it back
>>> !!!!" without knowing that once they have pressed the button for
>>> send/receive and the email is delivered within 4 - 20 seconds to
>>> destination
>> call your users braindead idiots and hang up the phone
>
> it depends WHO is calling you
> if it is the boss ...
i will call him a braindead idiot and hang up the phone

if he can not live with this (mine can) he will no longer be
my boss - not because he fires me, maybe too, but who cares

no, because i search another job where i can do my work instead
handholding idiots which are better step back writing letters
on paper, but hey - what happens if they recognize they have
made a mistake in the letter - call back the postman?
_____________

as mailadmin you get paied for making sure fast, stable and
secure services and not for degrade them because a handful
idiots - uf you delay because them you do the excatly wrong
thing - if i press send while having a customer on phone
normally he has the message 4 seconds later, this is how
mail should work (not always, but it has to be the final goal)



signature.asc (270 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Frank Bonnet


Envoyé de mon iPhone.


Le 22 avr. 2012 à 17:31, Reindl Harald <[hidden email]> a écrit :

> do NOT USE REPLY ALL permanently on lists
>
> this results in broken threads if the receivers server
> filters duplicates and a lot of spam happening last week
> caused by a spam-list where people wrote over days
> "do not write me mails that you do not want mails"
>
>
> Am 22.04.2012 16:59, schrieb Frank Bonnet:
>>>> Some users are there; they call me once they press the send/receive button,
>>>> yelping "Vishal I did some mistake in that email, can you get it back
>>>> !!!!" without knowing that once they have pressed the button for
>>>> send/receive and the email is delivered within 4 - 20 seconds to
>>>> destination
>>> call your users braindead idiots and hang up the phone
>>
>> it depends WHO is calling you
>> if it is the boss ...
> i will call him a braindead idiot and hang up the phone
>
> if he can not live with this (mine can) he will no longer be
> my boss - not because he fires me, maybe too, but who cares
>
> no, because i search another job where i can do my work instead
> handholding idiots which are better step back writing letters
> on paper, but hey - what happens if they recognize they have
> made a mistake in the letter - call back the postman?
> _____________
>
> as mailadmin you get paied for making sure fast, stable and
> secure services and not for degrade them because a handful
> idiots - uf you delay because them you do the excatly wrong
> thing - if i press send while having a customer on phone
> normally he has the message 4 seconds later, this is how
> mail should work (not always, but it has to be the final goal)
>
>

hey ! I was just kidding :-)
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Reindl Harald-2


Am 22.04.2012 17:39, schrieb Frank Bonnet:

> hey ! I was just kidding :-)

i was not kidding as said DO NOT reply all and set the
list only as CC if you are posting to a list nor that
i would call my boss an idiot :-)

in the case of mailservers removing duplicates it
will remove the message from the list and any reply
destroys the thread - th eproblem here is not the
remove duplicate feature, it is the need to enable
it because get way too much replies twice

and yes, this is on-topic in the context users
calling a mailadmin take back sent messages because
not verified what doing while send :-)


signature.asc (270 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Delaying mail delivery

Jan P. Kessler-2
In reply to this post by Wietse Venema

> - To inspect mail for badness (there is a better solution in Postfix
>   than hold+cron)

Would it be possible to explain, what you mean by "a better solution"?

My problem is, that since a while we receive mails containing 0-day
malware which is not recognised by any of our AV scanners
(Trendmicro/postfix relay, Symantec/Exchange and Kaspersky/Client).
Mostly the attachments are ZIP files containing executables (exe, com,
pif, scr). As we have a lot of developers, we do not want to block these
in general (as we already do with non-zipped executables).

The occurences do last only several minutes and the mails are sent only
to a few 100 recipients (~20k Mailboxes). The sources are mainly
compromised freemail accounts, so we can not filter those mails by
origin (rbl, ...) and greylisting is not effective. We even can not
filter based on message content or sender addresses. The mails are very
well forged (good language and design) and the senders vary. On a
regulary base we have dozens of infected workstations.

Sometimes, when we became aware of such a "malware wave", we put all
mails on HOLD over the weekend giving the AV scanners time to update
their patterns. An interesting option would be the ability, to delay the
delivery of mails meeting defined criteria (senders, clients or
attachment types).

  Jan