Matt Price wrote: > On Wed, Oct 8, 2008 at 12:42 PM, Reid Thompson wrote: >> Matt Price wrote: >>> Is there a way to get evolution to display that a message has been >>> forwarded? >> you'll need to give the version of evo you're on -- pretty sure there was a >> bug re this that has been fixed. > > evo 2.22.3.1 -- not 2.24 yet... > >>> matt >>> >>> ps -- even BETTER would be a script that could automate forwarding >>> when certian keywords are detected -- this is something i might be >>> able to do with procmail or something, but i have no idea how to do it >>> with evolution. i'd welcome any tips.... t >> >> you can use evo filters to do this -- I think there was a previous >> discussion about using pipe to program -- where program is a >> script that does the forwarding using >> mutt/mail/mailx/sendmail/python/ruby/perl to do the forwarding. >> > > thanks ot both of you for that. i suppose i could get mutt to do this > -- say, parse the em in python, then feed it back to mutt -- but > better for me would be if i could pipe it back to evolution & have the > original em marked as forwarded.
Hmmm, the filter options do not offer setting status to forwarded, but, you could create a new label identifying 'processed' emails and mark the forwarded emails with said label, or assign them a color, or move them to a 'forwarded' folder, etc > the command line seems a little > clunky -- if i'm forwarding the whole message, it will get very long, > and if there are quotes in there i imagine i'd be likely to run into > syntax errors. command line should not come into play.. see attachment ( similar processing should be available via python/other scripting languages ). > can i address evolution-data-server directly somehow, > either from the shell or from a scripting language like python? i don't know the answer to this one, perhaps someone else will respond > i only really understand python but i cna fake it in other languages > when i have to. appreciate any and all suggestions! thanks, > matt
#!/usr/bin/ruby require 'rubygems' require 'tmail' require 'net/smtp' # setup to & from # tomail = '[EMAIL PROTECTED]' frommail = '[EMAIL PROTECTED]' # read in mail from pipe # forwarded_mail = TMail::Mail.parse($stdin.read) # grab the original sender # strip the domain from original sender address # sender = forwarded_mail.from idx = sender[0].index('@') sender[0].slice!(idx.to_i..sender[0].length) # grab the send date # senddate = forwarded_mail.date # populate the new header information # forwarded_mail.to = tomail forwarded_mail.from = frommail newsubject = "FW: " + forwarded_mail.subject.to_s forwarded_mail.subject = newsubject forwarded_mail.date = Time.now # setup the new mail body # forwarded_mail.body = "On #{senddate} #{sender} said \n\n" + forwarded_mail.body # send the mail # Net::SMTP.start( 'your_mail.host.com', 25 ) do|smtpclient| smtpclient.send_message( forwarded_mail.to_s, frommail, tomail ) end
_______________________________________________ Evolution-list mailing list Evolution-list@gnome.org http://mail.gnome.org/mailman/listinfo/evolution-list