Re: question about postfix queue scheduler

2013-06-12 Thread Jeroen Geilman

On 06/08/2013 08:17 PM, Wietse Venema wrote:

Jeroen Geilman:

On 06/04/2013 02:20 PM, Erwan David wrote:

On Tue, Jun 04, 2013 at 01:44:46PM CEST, Tom Hendrikx t...@whyscream.net said:

On 06/04/2013 01:22 PM, Antonio Guti?rrez Mayoral wrote:

Hi Wietse,

Yes, its a solution, but these emails should be delivered in
bussines-time :-(
(it doesnt matter if it takes 2 hours... but in bussiness time...)

thank you so much!


You could run a script as a cronjob that queues x messages when the
active queue contains (100 minus x) messages (where 100 is an arbitrary
number). This means that all mails on HOLD trickle out as quick as
possible, while not overloading the active queue...

It means when the queue has 100 messages, you stop sending anything ?


You could check the headers for identifying features (maybe the list ID,
or a subject part, or...whatever works), and instantly DEFER them.

This will put all messages in the deferred queue, guaranteeing they
won't choke incoming: if the deferred queue is not empty, one message
will be taken from incoming and deferred, in turn.

Currently the queue manager can group recipients into jobs when
they share the same queue file, and uses that to prevent a limited
number of many-recipient messages from blocking later email
with fewer recipients.

The fix would be to group recipients into jobs based on the sender
attribute (or size, or whatever) and apply similar logic to prevent
a limited messages from one sender from blocking later email from
other senders (or or to prevent large messages from blocking later
messages that are smaller in size).

However if one sender manages to saturate the queue then it will
take time before other email gets a chance to be scheduled.

Wietse



I thought the queue manager took one message each from deferred and 
incoming if deferred is not empty, keyed on the destination next-hop 
(resulting in one virtual queue per destination); this allows one to 
manipulate the way messages are queued by limiting the number of 
recipients per message.


If he can just use a transport with a single-recipient limit to send his 
newsletter to, that would take care of the blockage, wouldn't it ?


The queue manager doesn't combine multiple queue messages AFAIK, so even 
if there are hundreds of large single-recipient messages with the same 
next-hop in the deferred queue, it would only take one message (plus its 
one recipient) every time, and a single message from incoming after that.


--
J.



Re: question about postfix queue scheduler

2013-06-12 Thread Wietse Venema
 If he can just use a (sender-dependent) transport to send his 
 newsletter to, that would take care of the blockage, wouldn't it ?

Yes, provided that he does not saturate the active queue.  There
is, however, no need to cripple this transport with single-recipient
deliveries.  If one delivery transaction can transfer more than one
recipient, then that will shorten the time that this mail occupies
the queue.

Wietse


Re: question about postfix queue scheduler

2013-06-11 Thread Benny Pedersen

Antonio Gutiérrez Mayoral skrev den 2013-06-04 13:22:


Maybe you can automatically HOLD all his mail and then automatically
release all his mail in the evening.
Yes, its a solution, but these emails should be delivered in 
bussines-time :-(

(it doesnt matter if it takes 2 hours... but in bussiness time...)


cant etrn be used here ?

let remote server keep on hold forever until local send etrn to get 
mails sent ?


--
senders that put my email into body content will deliver it to my own 
trashcan, so if you like to get reply, dont do it


Re: question about postfix queue scheduler

2013-06-08 Thread Jeroen Geilman

On 06/04/2013 02:20 PM, Erwan David wrote:

On Tue, Jun 04, 2013 at 01:44:46PM CEST, Tom Hendrikx t...@whyscream.net said:

On 06/04/2013 01:22 PM, Antonio Gutiérrez Mayoral wrote:

Hi Wietse,

Yes, its a solution, but these emails should be delivered in
bussines-time :-(
(it doesnt matter if it takes 2 hours... but in bussiness time...)

thank you so much!


You could run a script as a cronjob that queues x messages when the
active queue contains (100 minus x) messages (where 100 is an arbitrary
number). This means that all mails on HOLD trickle out as quick as
possible, while not overloading the active queue...

It means when the queue has 100 messages, you stop sending anything ?



You could check the headers for identifying features (maybe the list ID, 
or a subject part, or...whatever works), and instantly DEFER them.


This will put all messages in the deferred queue, guaranteeing they 
won't choke incoming: if the deferred queue is not empty, one message 
will be taken from incoming and deferred, in turn.


--
J.



Re: question about postfix queue scheduler

2013-06-08 Thread Wietse Venema
Jeroen Geilman:
 On 06/04/2013 02:20 PM, Erwan David wrote:
  On Tue, Jun 04, 2013 at 01:44:46PM CEST, Tom Hendrikx t...@whyscream.net 
  said:
  On 06/04/2013 01:22 PM, Antonio Guti?rrez Mayoral wrote:
  Hi Wietse,
 
  Yes, its a solution, but these emails should be delivered in
  bussines-time :-(
  (it doesnt matter if it takes 2 hours... but in bussiness time...)
 
  thank you so much!
 
  You could run a script as a cronjob that queues x messages when the
  active queue contains (100 minus x) messages (where 100 is an arbitrary
  number). This means that all mails on HOLD trickle out as quick as
  possible, while not overloading the active queue...
  It means when the queue has 100 messages, you stop sending anything ?
 
 
 You could check the headers for identifying features (maybe the list ID, 
 or a subject part, or...whatever works), and instantly DEFER them.
 
 This will put all messages in the deferred queue, guaranteeing they 
 won't choke incoming: if the deferred queue is not empty, one message 
 will be taken from incoming and deferred, in turn.

Currently the queue manager can group recipients into jobs when
they share the same queue file, and uses that to prevent a limited
number of many-recipient messages from blocking later email
with fewer recipients.

The fix would be to group recipients into jobs based on the sender
attribute (or size, or whatever) and apply similar logic to prevent
a limited messages from one sender from blocking later email from
other senders (or or to prevent large messages from blocking later
messages that are smaller in size).

However if one sender manages to saturate the queue then it will
take time before other email gets a chance to be scheduled.

Wietse


question about postfix queue scheduler

2013-06-04 Thread Antonio Gutiérrez Mayoral
Hi all!

My name is Antonio I am currently managing a system with postfix+
spamassassin and Maia.
First of all, sorry for my bad english.
I would like to ask a question. Once in a month,  more or less, I have a
user who sends
a LOT of mails (mailing) to a group of recipients. This list could have
about 2000 recipients.
The email has two pdfs, maybe 2 MB per email.

When this user sends this email, maybe the queue hold about 2000 requests,
today about
300 MB. The problem is that the queue starts to deliver the email and the
other email
which sends the other users, is not being processed until ALL the emails
for this user
has been processed (FIFO queue)

So, the only way I have to deal with is HOLD all messages for this user,
with postsuper -h
and requeue them step by step, maybe 100 emails per 5 minutes. I dont know
if there is
a way for improve this.

The main problem is the email can not be stopped, the emails have to in/out
normally.
And, I cannot say to this user that I cant send this emails... :-) Maybe
the only solution is
install another smtp or an marketing-email app ?

Any suggestions?

Thanks!

-- 
--
Antonio Gutiérrez Mayoral aguti...@gmail.com


Re: question about postfix queue scheduler

2013-06-04 Thread Wietse Venema
Maybe you can automatically HOLD all his mail and then automatically
release all his mail in the evening.

Wietse


Re: question about postfix queue scheduler

2013-06-04 Thread Ralf Hildebrandt
* Wietse Venema postfix-users@postfix.org:
 Maybe you can automatically HOLD all his mail and then automatically
 release all his mail in the evening.

I even have a script for that...

-- 
[*] sys4 AG

http://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München

Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein


Re: question about postfix queue scheduler

2013-06-04 Thread Antonio Gutiérrez Mayoral
Hi Wietse,

Yes, its a solution, but these emails should be delivered in bussines-time
:-(
(it doesnt matter if it takes 2 hours... but in bussiness time...)

thank you so much!


2013/6/4 Wietse Venema wie...@porcupine.org

 Maybe you can automatically HOLD all his mail and then automatically
 release all his mail in the evening.

 Wietse




-- 
--
Antonio Gutiérrez Mayoral aguti...@gmail.com


Re: question about postfix queue scheduler

2013-06-04 Thread Tom Hendrikx
On 06/04/2013 01:22 PM, Antonio Gutiérrez Mayoral wrote:
 Hi Wietse,
 
 Yes, its a solution, but these emails should be delivered in
 bussines-time :-(
 (it doesnt matter if it takes 2 hours... but in bussiness time...)
 
 thank you so much!
 

You could run a script as a cronjob that queues x messages when the
active queue contains (100 minus x) messages (where 100 is an arbitrary
number). This means that all mails on HOLD trickle out as quick as
possible, while not overloading the active queue...

--
Tom



Re: question about postfix queue scheduler

2013-06-04 Thread Erwan David
On Tue, Jun 04, 2013 at 01:44:46PM CEST, Tom Hendrikx t...@whyscream.net said:
 On 06/04/2013 01:22 PM, Antonio Gutiérrez Mayoral wrote:
  Hi Wietse,
  
  Yes, its a solution, but these emails should be delivered in
  bussines-time :-(
  (it doesnt matter if it takes 2 hours... but in bussiness time...)
  
  thank you so much!
  
 
 You could run a script as a cronjob that queues x messages when the
 active queue contains (100 minus x) messages (where 100 is an arbitrary
 number). This means that all mails on HOLD trickle out as quick as
 possible, while not overloading the active queue...

It means when the queue has 100 messages, you stop sending anything ?