1

I'm writing a ruby script to process incoming email for a specific email address using a transport.

Postfix transport table
me@example.com      ruby-script

Postfix master file
ruby-script unix    -   n   n   -   -   pipe
      flags=    user=zimbra argv=/usr/bin/ruby  /opt/zimbra/ruby-script.rb

Let's say 10 emails are piped to the ruby script within the same timeframe. Does postfix create 10 ruby-script.rb processes to handle those 10 emails or how does it work?

2

Yes, postfix will spawn a new process for each.
But you can control the parallel delivery with ruby-script_destination_concurrency_limit=2 for example, meaning 2 parallel delivery to ruby-script transport.

  • if I set the limit to 2 what happens with the other 8 emails? Are they bounced back to the users? – joshu May 15 '13 at 18:46
  • No, they are queued up until the running scripts finish up. – Sandor Marton May 15 '13 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.