Jay Balakrishna writes:
 > Hi All, 
 > We are trying to find out what is the most efficient way of queueing the
 > message in qmail from our C Programs. So, would like to know if there are
 > any C API's that are available for queuing messages. Basically I am looking
 > for library routines that act as the native submission interface(API) for
 > qmail.

The standard Unix API is to popen sendmail and give it the 't' option.
qmail supports that API, although qmail's native submission mechanism
is to popen /var/qmail/bin/qmail-inject with the appropriate options.

For maximum efficiency and security, create your own envelope and
canonical set of headers, fork a copy of qmail-queue and throw them
down the two file descriptors.

Your program could do exactly the same thing that qmail-queue does,
except that qmail-queue has been very carefully to protect internal
security.  If you're not worried about internal security, then you
might want to write some code that does exactly what qmail-queue
does.  Also, qmail-queue is a documented interface and will be
preserved from version to version of qmail.  The queue internals are
likely to change drastically.

-- 
-russ nelson <[EMAIL PROTECTED]>  http://russnelson.com |
Crynwr sells support for free software  | PGPok | Damn the firewalls!
521 Pleasant Valley Rd. | +1 315 268 1925 voice | Full connectivity ahead!
Potsdam, NY 13676-3213  | +1 315 268 9201 FAX   | 

Reply via email to