subscribing to a remote mailbox

29 views
Skip to first unread message

Paul Mena

unread,
Jun 25, 2012, 6:30:14 PM6/25/12
to puppet...@googlegroups.com
I think the answer is yes, but is it possible for Puppet to subscribe to an email folder on a remote server?  My plan is to perform an action whenever the mailbox receives a new email message.

Felix Frank

unread,
Jun 26, 2012, 3:59:20 AM6/26/12
to puppet...@googlegroups.com
Hi,
I suppose you can cobble something up using an

exec { "fetchmail ...": notify => ... }

so yes, it's likely possible. I disbelieve that there is a puppet
feature that supports it more directly, though.

I'd like to go on record saying that, without having learned more
details, I get the impression that you're about to open up a security
hole. Please consider using tools that lend themselves better to the
job, such as MCollective.

HTH,
Felix

Paul Mena

unread,
Jun 26, 2012, 8:01:25 AM6/26/12
to puppet...@googlegroups.com
Felix,

Thanks for the reply.  That's a good point about the potential security hole.  Ironically, it would be good news if my ISP doesn't permit it.

Here's my task in a nutshell: I've been processing the entirety of an email folder using a program called HyperMail, which converts individual messages to individual HTML files.  Since the folder grows by anywhere between one and six messages per day, it takes progressively longer to process.  I was hoping to use puppet to listen for new mail and to process it on the fly.

The gory details of my project can be found here.  I've barely gotten started, so I'm certainly open to other approaches.

Regards,

Paul

Stephen Gran

unread,
Jun 26, 2012, 8:14:20 AM6/26/12
to puppet...@googlegroups.com
Hi,

It sounds like you're doing data warehousing and searching, which sounds
like a job for something like a database on the back of an injection
script that runs when a mail arrives. I suspect puppet is not the best
tool for processing at all.

Cheers,
> --
> You received this message because you are subscribed to the Google
> Groups "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/L8BBk9FKu8IJ.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users
> +unsub...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.

--
Stephen Gran
Senior Systems Integrator - guardian.co.uk

Please consider the environment before printing this email.
------------------------------------------------------------------
Visit guardian.co.uk - newspaper of the year

www.guardian.co.uk www.observer.co.uk www.guardiannews.com

On your mobile, visit m.guardian.co.uk or download the Guardian
iPhone app www.guardian.co.uk/iphone

To save up to 30% when you subscribe to the Guardian and the Observer
visit www.guardian.co.uk/subscriber
---------------------------------------------------------------------
This e-mail and all attachments are confidential and may also
be privileged. If you are not the named recipient, please notify
the sender and delete the e-mail and all attachments immediately.
Do not disclose the contents to another person. You may not use
the information for any purpose, or store, or copy, it in any way.

Guardian News & Media Limited is not liable for any computer
viruses or other material transmitted with or as part of this
e-mail. You should employ virus checking software.

Guardian News & Media Limited

A member of Guardian Media Group plc
Registered Office
PO Box 68164
Kings Place
90 York Way
London
N1P 2AP

Registered in England Number 908396

jcbollinger

unread,
Jun 26, 2012, 4:06:29 PM6/26/12
to puppet...@googlegroups.com


On Tuesday, June 26, 2012 7:14:20 AM UTC-5, Stephen Gran wrote:
It sounds like you're doing data warehousing and searching, which sounds
like a job for something like a database on the back of an injection
script that runs when a mail arrives.  I suspect puppet is not the best
tool for processing at all.

+1

The right time to trigger an automated response to incoming mail is when that mail is received.

Have you looked at procmail?  It may be available to you already, as several Linux distros use it as their mail delivery agent.  In addition to mail delivery (and as its original purpose), however, it is supposed to be able to process incoming mail on users' behalf and perform more or less arbitrary operations on it, such as running it into scripts.  And if you want to keep HyperMail, then perhaps you could hook in procmail in front of it to process incoming messages first, then hand them off.


John

Paul Mena

unread,
Jun 27, 2012, 7:02:53 AM6/27/12
to puppet...@googlegroups.com
John,

Thanks for the reply.  I'd be embarrassed to admit how long ago I last used procmail, but I used it to trigger the playing of particular WAV files depending upon who was sending me mail.  It sounds like it might be ideal for the type of processing I wish to do without having to necessarily retire Hypermail.  To be continued...

Paul

Paul Mena

unread,
Jun 29, 2012, 5:11:01 PM6/29/12
to puppet...@googlegroups.com
I just thought I'd report that I've implemented a procmail rule to create a transient folder containing only new, unprocessed haiku that is then processed by Hypermail into an HTML file.  Further post-processing strips the email header and footer, leaving only the haiku, and concatenates it to the existing archive.  This still requires the execution of a script.  Ideally, I'd like the act of receiving a new email to trigger the execution of the script.  I'm thinking that procmail can do this as well, but I haven't figured out the syntax.  To be continued...
Reply all
Reply to author
Forward
0 new messages