An easy way to copy addresses from filters?

13 views
Skip to first unread message

jprint714

unread,
Jan 2, 2012, 4:42:06 AM1/2/12
to Mailsmith Talk
Is there an easy way in which I can copy and past all of the email
addresses assigned to my individual mailbox filters? I'm wondering if
there's an easier solution to copying an pasting each selected address
in the filters (which would be incredibly time-consuming and tedious
work!). Even just exporting the email address associated w/ the
filters would be an enormous help! Thanks very much...

Oliver Boermans

unread,
Jan 2, 2012, 4:46:56 PM1/2/12
to mailsmi...@googlegroups.com

For filters that involve a number of email addresses I use groups in
the Apple Address Book rather than individual email addresses within
filters.
For example selecting: Sender’s Group Membership -> Is Equal to -> Friends
Where Friends is a group I created in Address book and added everyone
who I wish to be subject to this filter.
Much less tedious!

Not exactly an answer to your question, but I hope it helps.
Cheers Ollie
--
@ollicle

jprint714

unread,
Jan 2, 2012, 6:09:18 PM1/2/12
to Mailsmith Talk

Thanks, I appreciate that. But it doesn't address what I'm trying to
do... I suppose I'm trying to see if there's a way to export the
contents of my filter - i.e., the email addresses contained inside my
individual filters - so I can more easily copy and paste them into new
filters / mailboxes.

Any other ideas?

Thanks!

On Jan 2, 1:46 pm, Oliver Boermans <boerm...@gmail.com> wrote:

Christopher Bort

unread,
Jan 3, 2012, 1:49:55 PM1/3/12
to mailsmi...@googlegroups.com
On 1/2/12 at 3:09 PM, jes...@gmail.com (jprint714) wrote:

>Thanks, I appreciate that. But it doesn't address what I'm trying to
>do... I suppose I'm trying to see if there's a way to export the
>contents of my filter - i.e., the email addresses contained inside my
>individual filters - so I can more easily copy and paste them into new
>filters / mailboxes.

Looking over Mailsmith's AppleScript dictionary, I don't see any
way to access information about individual filters. In
particular, there is no 'filter' element, nor are there any
properties for filter criteria. AppleScript wouldn't necessarily
be the only way to approach this, but given that there's nothing
relevant in the AS dictionary, it looks like there probably is
not a way to programmatically get at the data you want.

>On Jan 2, 1:46 pm, Oliver Boermans <boerm...@gmail.com> wrote:
>>On 2 January 2012 20:12, jprint714 <jesp...@gmail.com> wrote:
>>
>>>Is there an easy way in which I can copy and past all of the email
>>>addresses assigned to my individual mailbox filters?  I'm wondering if
>>>there's an easier solution to copying an pasting each selected address
>>>in the filters (which would be incredibly time-consuming and tedious
>>>work!). Even just exporting the email address associated w/ the
>>>filters would be an enormous help!  Thanks very much...
>>
>>For filters that involve a number of email addresses I use groups in
>>the Apple Address Book rather than individual email addresses within
>>filters.
>>For example selecting: Sender’s Group Membership -> Is Equal to -> Friends
>>Where Friends is a group I created in Address book and added everyone
>>who I wish to be subject to this filter.
>>Much less tedious!
>>
>>Not exactly an answer to your question, but I hope it helps.
>>Cheers Ollie
>>--
>>@ollicle

--
Christopher Bort
<top...@thehundredacre.net>

Steve Kalkwarf

unread,
Jan 3, 2012, 2:47:56 PM1/3/12
to mailsmi...@googlegroups.com
On Jan 3, 2012, at 1:49 PM, Christopher Bort wrote:

> Looking over Mailsmith's AppleScript dictionary, I don't see any way to access information about individual filters. In particular, there is no 'filter' element, nor are there any properties for filter criteria. AppleScript wouldn't necessarily be the only way to approach this, but given that there's nothing relevant in the AS dictionary, it looks like there probably is not a way to programmatically get at the data you want.

It's been years since I looked at Mailsmith code, but I have vague recollection that filters are stored both as impenetrable blobs, _and_ a property list.

Take a peek at

~/Mail/Mailsmith User Data/Mail Filters.mailfilters

and see if it has what you need.

jprint714

unread,
Jan 4, 2012, 4:47:47 AM1/4/12
to Mailsmith Talk
Ok, thanks... So is the only recourse then to simply copy all
individual email addresses contained in one filter, and then paste
them into another...? Man, I really, REALY hope there's another
way... This will take a ton of (tedious) time an energy.

I sure you hope you guys have another solution...

Thanks!

Steve Kalkwarf

unread,
Jan 4, 2012, 8:52:20 AM1/4/12
to mailsmi...@googlegroups.com
On Jan 4, 2012, at 4:47 AM, jprint714 wrote:

> Ok, thanks... So is the only recourse then to simply copy all
> individual email addresses contained in one filter, and then paste
> them into another...? Man, I really, REALY hope there's another
> way... This will take a ton of (tedious) time an energy.

You asked if there was a way to get a list of addresses out of a filter.

What is it you really want to do?

jprint714

unread,
Jan 5, 2012, 11:46:11 AM1/5/12
to Mailsmith Talk
I want to: copy email addresses from my filters, and paste them into
new filters (I'm breaking up the old ones) and put the email addresses
into other databases and documents. So, just copy the mass of email
address associated with individual filters.

jprint714

unread,
Jan 6, 2012, 9:17:35 PM1/6/12
to Mailsmith Talk
Does that answer your question? Any other ideas / suggestions as to
how to do this?

Oliver Boermans

unread,
Jan 6, 2012, 10:44:42 PM1/6/12
to mailsmi...@googlegroups.com
On 7 January 2012 12:47, jprint714 <jes...@gmail.com> wrote:
> Does that answer your question?  Any other ideas / suggestions as to
> how to do this?

Depending on how you are using your filters, you could try retrieving
a list of email addresses from the contents of your mailboxes.
Presuming they reflect the filters associated with them. Might provide
a means to at least get the addresses out. Recreating the filters
using them would remain a task.

John Delacour

unread,
Jan 7, 2012, 6:35:31 AM1/7/12
to mailsmi...@googlegroups.com
At 01:42 -0800 2/1/12, jprint714 wrote:


>Is there an easy way in which I can copy and past all of the email
>addresses assigned to my individual mailbox filters? I'm wondering if
>there's an easier solution to copying an pasting each selected address

>in the filters...


Drag "~/Mail/Mailsmith User Data/Mail Filters.mailfilters" to BBEdit
in the dock, copy the whole contents and paste it into a new
document. Save this on the Desktop as "mailfilters" using UTF-8
encoding and Unix(LF) line breaks.

In a new BBEdit window paste the following script:


#!/usr/bin/perl
use strict;
my $filters = "$ENV{HOME}/desktop/mailfilters";
open my $fh, $filters or die $!;
while (<$fh>){
m~(<string>)(.+\@.+?)(</string>)~ and print "$2\n";
}

This should give you a list of all the email addresses.

JD

jprint714

unread,
Jan 10, 2012, 1:04:02 PM1/10/12
to Mailsmith Talk

Thanks so much! I'll try this out and see how it goes...

Thank you again for spelling out these instructions! I greatly
appreciate it...
Reply all
Reply to author
Forward
0 new messages