Re: [Evolution] Script to search mails

2010-08-15 Thread Reid Thompson

On 8/15/2010 12:32 AM, Thomas Mittelstaedt wrote:


Also, you could define a filter. As action you could choose to call a
program or pipe the mail through a program.


re above, you could take the first part of this filter script  and modify it to match and write out data for 
the emails you want.  You might want to switch it from using the tmail package to the mail package.

It would prob end up being around 10 lines long, not counting comments (read 
in, parse, match, write out)

$ cat forwardmail.rb
#!/usr/bin/ruby

require 'rubygems'
require 'tmail'
require 'net/smtp'

# setup to & from
#
tomail = 'john@someplace.com'
frommail = 'jane.d...@elsewhere.com'

# 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
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-list


[Evolution] Evolution Mail Filters / Junk Filters

2010-08-15 Thread Kip Warner
Hey list,

I am using Evolution 2.30.2 on Lucid on amd64. I have the spamassassin
package installed.

I noticed that my junk and mail filters are not used unless manually
invoked. If I select a bunch of mail and then run Message -> Apply
Filters or Message -> Check for Junk, they both work as expected. When
new mail arrives, they aren't invoked automatically though unless I do
the aforementioned.

Checking under Mail Preferences -> Junk tab, I have Check incoming
messages for junk, Check custom headers for junk, use SpamAssassin
plugin, and Include remote tests enabled.

I'm assuming there's a box I've overlooked somewhere that I haven't
checked. I am using IMAP, in case that helps.

PS I am not a subscriber, so please cc me. Thanks.

-- 
Kip Warner -- Software Engineer
OpenPGP encrypted/signed mail preferred
http://www.thevertigo.com


signature.asc
Description: This is a digitally signed message part
___
evolution-list mailing list
evolution-list@gnome.org
To change your list options or unsubscribe, visit ...
http://mail.gnome.org/mailman/listinfo/evolution-list