On Mon, Jan 08, 2007 at 01:21:07AM -0500, Support Infocomplexe wrote:
>  
> I came to ask myself what is the effect of the
> dspam-spam_destination_recipient_limit = 1
> option exactly in all situation.

The _destination_recipient_limit sets the maximum number of
recipients for the given destination; in this case the "dspam-spam"
destination (which is itself defined in master.cf).

It controls the maximum number of recipients the command will be
invoked with at a time. For example, consider a message that is sent
to five users at your domain. If the recipient limit is 1, then this
will result in Postfix executing the delivery command five times -
one invocation for each address. If it is set to 2, then it will
execute it 3 times; the first two with two recipient addresses, and
the last time with a single address.

> I received a complaint about lost email and I though this option
> was blocking email when multiple recipients are define in an
> email.

This is very unlikely, especially if it's set to 1. There's
basically two reasons for it:

1. Efficiency. It's usually better to deliver multiple messages in
   as few goes as possible. If this is set to 1, then that example
   email with 5 recipients will result in five separate messages
   being created.
2. Reliability. Some processing commands may not support multiple
   recipients, or may not handle error conditions very well when
   processing mail for multiple recipients.
   
For example, if the destination is invoking a command and it returns
a failure code, Postfix doesn't have any way of knowing which of the
recipient addresses failed; therefore, it will requeue the message
and attempt delivery to _all_ recipients again at a later stage. If
the command sent mail to the first few but then encountered an
error, they'll receive duplicates of that message.

> I tried the value 100 and I had no problem.  I saw that postfix
> sent message as a single shot in my log when set to 100   but sent
> one by one when set to 1. I need to figure out to what value to
> set this option to make sure I dont lose emails.

This option should not have any influence over "missing" emails; and
it's more likely that having multiple recipients (i.e. a value
greater than one) would exhibit problems.

If your dspam-spam destination is using LTMP to deliver messages to
the daemon, then you might improve performance by having this set to
deliver to multiple recipients simultaneously. It's likely to be
insignificant in most cases as dspam has to re-process each message
for each user anyway. I don't know whether it optimises the case
where each recipient is a member of the same group and thus has the
same tokens.

Reply via email to