This patch changes the behavior of both the femail_procmail_drush script and the main drush script to allow for passing the whole email message with STDIN, rather than just passing a filename. The reason behind this is that, if you do not require the procmail script, you can just pipe the message directly to drush. For instance, you could set up a Postfix alias that will just hand the message off to drush:

email-address: "|/path/to/drush -l http://your-domain.com femail"

This allows for significantly less sysadmin magic, and also makes creating a tempfile unnecessary.

CommentFileSizeAuthor
message-from-stdin.patch1.8 KBtheunraveler

Comments

sdrycroft’s picture

Status: Active » Closed (won't fix)

Thanks for the patch, the problem is, it won't allow for a multi site set-up. A good tweak may be to allow passing a filename or the whole message, but for my requirements, I need the separate script (a single Unix user delivering mail to many different sites).

theunraveler’s picture

It should still allow for a multisite setup. You can continue using the femail_procmail_drush script just as you normally would; the only difference is that it doesn't create the unnecessary tempfile. The correct domain still gets passed to drush.

All this patch does is add a bit of flexibility for those of us who do not need/want the bash script.

Make sense?

theunraveler’s picture

Status: Closed (won't fix) » Active

Reopening; I think there was a misunderstanding about the functionality provided by this patch.

sdrycroft’s picture

Status: Active » Needs review

You're right. I should have read the patch a little more closely. I'll test this tomorrow and hopefully get it into a release soon.

Thanks again for the patch. Simon.