On Wed, Sep 08, 2010 at 05:33:40PM -0300, Diego Lima wrote:

> This is actually a server for a mail marketing company, so I can
> expect several thousands of messages per minute being sent from the
> system.

A company in the business of sending email is expected to use tooling
sufficiently sophisticated to talk SMTP. Dumping message files to disk
is rather naive...

> That's why I was wondering if there was any way to get postfix
> to pick up the messages automatically (the less programs/scripts in
> the way, the better)

You need a parser that runs a few parallel jobs to scan the queue
and submit the queued files via SMTP (with an appropriate contention
management scheme or a global scheduler).

The Postfix "pickup(8)" service is single-threaded, and may not keep up
with several thousand messages a minute depending on how may 'several' is.
If your disk latency is low enough and you avoid high-latency lookup tables
..., you may be able to push pickup(8) over 50 msgs/sec or so.

To submit a file that looks like an RFC822 message, you just need to
invoke:

        sendmail -f 'envelope-sender' -t < file

and handle non-zero exit codes gracefully. Don't use the "-i" option
if the files use "." as an end-of-message marker, and double-up leading
dots on non-terminal lines. Otherwise use the "-i" option.

-- 
        Viktor.

Reply via email to