Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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
    
Great thanks for explaining! –  joshu May 15 '13 at 20:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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