[Dovecot] Newbie Question/Feature Request

Timo Sirainen tss at iki.fi
Sat Nov 5 19:43:09 EET 2011


On Sat, 2011-11-05 at 10:33 -0700, Michael Papet wrote:

> open (CMD_OUT, " /usr/lib/dovecot/deliver -f somedude\@someplace.com -d anotherdude\@destination.dom $stringified |");
> my $test = <CMD_OUT>;
> print $test;
> 
> The above code errors out because the expected behavior is $stringified is supposed to be a file name.  It would be great if deliver could be fed the email as a string so I don't have to add a step of writing to file.  Or, maybe there's an undocumented method?

I don't remember exactly how Perl works, and this is untested, but I
think it should be something like:

open (CMD_OUT, "| /usr/lib/dovecot/deliver -f somedude\@someplace.com -d anotherdude\@destination.dom");
print CMD_OUT $stringified;
my $test = <CMD_OUT>;
print $test;

The idea is that you write the string to the pipe to deliver that you
open, and deliver reads it from stdin.





More information about the dovecot mailing list