Hello,

I have an application that during its operation it generates lots of RFC-822 
format emails.
My task is to send them to a single remote email address, and I've decided that 
I rely on
postfix to do the job.


I wouldn't use a regular smtp chat with the postfix smtpd daemon, because I 
don't want to
block the application until smtpd receives the message.


I know that I may pass the message to the sendmail binary, too, but forking a 
program
every time I need to send an email looks pretty resource heavy to me.

My next idea is to just modify the application, and drop (with the link() 
syscall) the message
directly to postfix's queue directory, and hopefully qmgr or something notices 
that "aha!
I've got a new message to deliver."

In this setup postfix wouldn't get emails from other sources, eg. from the 
network, just from
either the sendmail binary through popen(), or the direct copy to the queue 
directory method.


So my question is whether it's possible, and if so, then how?

Best regards,
Albi

Reply via email to