Hi All,

I have a MongoDB with a set of e-mails that I want to send.   I want to be able 
to track their delivery / bounce / delayed status - plus link any replies back 
to the original e-mail.

I have already written a c++ service to handle incoming e-mails  (by piping the 
incoming e-mails to my app) - which is still under development, but meeting 
that side of my needs.


Now I'm onto the actual sending side.  I've written a separate C++ service to 
run on the mail server to process the table of e-mails in the MongoDB  (From, 
To, Subject, Body, etc).

My original plan was to dump each e-mail to a file on disk, move to the  
/var/spool/postfix/maildrop/  folder, set the permissions correctly and leave 
Postfix to process the queue.

However, so far i've been unable to get this to work:
> Jun  1 22:05:29 mx02 postfix/pickup[30400]: warning: maildrop/tmp1: 
> unexpected EOF in data, record type 70 length 114
> Jun  1 22:05:29 mx02 postfix/pickup[30400]: warning: uid=0: unexpected or 
> malformed record type -2


So, I've tried to use  postdrop < tmp1,   however this keeps rejecting my file 
with unexpected EOF and malformed input:
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: name_mask: all
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: inet_addr_local: configured 2 
> IPv4 addresses
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: inet_addr_local: configured 3 
> IPv6 addresses
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: chdir /var/spool/postfix
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: open maildrop/E312D4108722
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: send attr queue_id = 
> E312D4108722
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: warning: stdin: unexpected EOF 
> in data, record type 115 length 116
> Jun  1 22:31:15 mx02 postfix/postdrop[30871]: fatal: uid=0: malformed input


The tmp file is fairly simple:
> From: test <t...@dev.kamar.kiwi.nz>
> To: kent <k...@kamar.nz>
> Message-Id: abc1...@kamar.kiwi.nz
> Subject: this is a test
> 
> Thanks for reading.
> .

Is there a way to make this work - or an alternative ?


I know one alternative is I can go down the socket / port 25 path - and that's 
my fallback plan.

thanks

Kent.


Reply via email to