On Mon, Jan 24, 2011 at 03:53:06PM +0000, ira darwin wrote:

> I am new to postfix. I have been searching on how to do this but unable to
> find an answer. I wonder if someone could help.
> 
> I have postfix setup to deliver all emails to @my-domain.com to an smrsh
> script.

It is not clear why forgetting who the message was really sent to is a
good idea with messages to this domain. Can you explain what you are
really trying to achieve and why?

> So in my aliases file I have
> 
> mydomain-com:"|/my-script.php"

The aliases(5) lookup key is a user-name, not a domain. Local mail
is delivered one user at a time, serially in Sendmail, in parallel
by Postfix.

> The problem is if postfix receives an email with multiple destinations of
> the same domain eg: b...@my-domain.com, char...@my-domain.com - the script is
> called multiple times.

This is how it is supposed to work.

> Is there a way to configure queue manager to only
> deliver an email once per domain?

The queue manager does not run scripts, it schedules delivery agents to
deliver email to all the recipients to which it is queued.

    - Some delivery agents can process multi-recipient messages,
      these include pipe(8) and smtp(8), but not local(8). The number
      of recipients per-delivery is bounded by the transport's recipient
      limit.

    - Some delivery agents can run scripts, e.g. local(8) and pipe(8).

So you can route the entire domain to pipe(8), or arrange for the queued
message to have just one recipient.

-- 
        Viktor.

Reply via email to