| 1 |
- After Module::Install support CPAN::Meta 2.0, specify gpl_2 as the license. |
| 2 |
Suggested by Paul Howarth <[email protected]> |
| 3 |
- After Module::Install support CPAN::Meta 2.0, add info for repository URL |
| 4 |
and bug tracker. Suggested by Paul Howarth <[email protected]> |
| 5 |
- Support for searches on email threads. (Thanks to Zack Brown |
| 6 |
<[email protected]> for the excellent feature idea and a prototype |
| 7 |
implementation.) |
| 8 |
- implement unimplemented code |
| 9 |
- update anonymize_mailbox to anonymize more of the header, and handle |
| 10 |
attachments. |
| 11 |
- Add mbx format support (email request) |
| 12 |
https://sourceforge.net/p/grepmail/feature-requests/10/ |
| 13 |
- Improve unique to avoid X-MimeOLE, X-MozillaStatus, and |
| 14 |
Content-Type/boundary differences. (Maybe just hash on the received |
| 15 |
headers?) Skye Otten <[email protected]> |
| 16 |
- Interpret transfer encodings to search the actual content of emails (SF |
| 17 |
102207) |
| 18 |
- IMAP URLs (SF 894486) |
| 19 |
- grepmailrc |
| 20 |
- override system paths to decompressor programs |
| 21 |
- set flags |
| 22 |
- Decode different transfer encodings before checking the pattern |
| 23 |
- Then support charset-independent patterns and mailboxes |
| 24 |
https://sourceforge.net/p/grepmail/bugs/34/ |
| 25 |
- Newest 25 messages. (Beth Scaer <[email protected]>) |
| 26 |
- grepmail -D --help doesn't display debug info. |
| 27 |
- -D should print module versions |
| 28 |
- Support ^M as a line terminator. Requested by Giovanni Bechis |
| 29 |
(https://sourceforge.net/users/gbechis). |
| 30 |
https://sourceforge.net/tracker/?func=detail&aid=1789911&group_id=2207&atid=352207 |
| 31 |
- Emit an X-UID header with an IMAP URL. Requested by Bart Schaefer |
| 32 |
(https://sourceforge.net/users/barts). |
| 33 |
https://sourceforge.net/tracker/index.php?func=detail&aid=894486&group_id=2207&atid=352207 |
| 34 |
- Michael D. Schleif <[email protected]> suggested grepmail have support for |
| 35 |
compressed mail directories. |
| 36 |
|
| 37 |
------------------------------------------------------------------------------ |
| 38 |
|
| 39 |
From Egmont Koblinger (https://sourceforge.net/users/egmont): |
| 40 |
|
| 41 |
- grepmail should operate at a higher level of semantics, interpreting the |
| 42 |
mbox format to extract the real text of the email for searching. |
| 43 |
|
| 44 |
Details, including sample code is here: |
| 45 |
https://sourceforge.net/tracker/?func=detail&aid=1058206&group_id=2207&atid=352207 |
| 46 |
|
| 47 |
Hi, |
| 48 |
|
| 49 |
I'm new to grepmail and tried it to see whether it fits my needs. |
| 50 |
Unfortunately it doesn't really. My problem is that grepmail performs the grep |
| 51 |
on the low level mailbox files, this way it is not *much* more than a simple |
| 52 |
grep, though definitely it is more. |
| 53 |
|
| 54 |
Basically I mean there are two problems: neither transfer encoding nor |
| 55 |
character set encodings are taken into accont. |
| 56 |
|
| 57 |
Mailbox format is a very complicated format which converts between human |
| 58 |
readable texts and byte sequences. The same human readable content can usually |
| 59 |
be converted into mailbox format more ways: there are more character set |
| 60 |
conversions (iso- 8859-1, iso-8859-2, koi8-r, utf-8...) and more transfer |
| 61 |
encodings (8- bit, base64, quoted-printable...) to choose from. |
| 62 |
|
| 63 |
I think that greping the low level mailbox doesn't make much sense, since I |
| 64 |
really don't care what charset or transfer encoding a message is encoded in. |
| 65 |
I'd like to grep in the _meaning_, the interpretation of each particular |
| 66 |
message. I'd like to find all letters where the sender typed a certain |
| 67 |
human-readable word. |
| 68 |
|
| 69 |
If a word in message body is split over multiple lines, for example, it is |
| 70 |
encoded in quoted-printable the mailbox file and there's an equal sign at the |
| 71 |
end of a line such as this: |
| 72 |
|
| 73 |
... this is an examp= |
| 74 |
le to show what I'm talking about |
| 75 |
|
| 76 |
then I see the "example" word in my mail client without being wrapped, but |
| 77 |
`grepmail example' doesn't find it matching. |
| 78 |
|
| 79 |
Similarly, `grepmail 8859' matches every letter encoded in some of the |
| 80 |
iso-8859-* charsets, but hey, I don't care what encoding a message uses, I'm |
| 81 |
interested in whether the real content of what my friend typed includes the |
| 82 |
number 8859. |
| 83 |
|
| 84 |
And greping for accented letters is nearly impossible as each letter uses |
| 85 |
different character set encodings, but I don't want to find a particular byte |
| 86 |
sequence, I want to find a particular sequence of human-visible characters, no |
| 87 |
matter what encodings they use. |
| 88 |
|
| 89 |
So this is what IMHO grepmail should use: |
| 90 |
|
| 91 |
- convert the pattern it founds on the command line from my locale to utf-8, |
| 92 |
- for each message found in the mailbox, separately, first decode it from its |
| 93 |
transfer encoding (quoted-printable, base64...) and then iconv it from its |
| 94 |
charset to utf-8, specially taking care of the complicated encodings used in |
| 95 |
the header fields such as Subjec, |
| 96 |
- and after all these it should perform the greping, and for matching messages |
| 97 |
it should print their original (unconverted) raw mailbox version. |
| 98 |
|
| 99 |
------------------------------------------------------------------------------ |
| 100 |
|
| 101 |
- Revise -E functionality. (Thanks to Vadim <[email protected]> for the |
| 102 |
feedback and suggestions) |
| 103 |
|
| 104 |
Dear David, |
| 105 |
|
| 106 |
in the README of your 'grepmail' I found that you are looking for |
| 107 |
feedback on the '-E' option. So I decided do comment on it. |
| 108 |
|
| 109 |
I like this feature and I want to use all the power of perl |
| 110 |
here, so there is no need for alternatives. But I think something |
| 111 |
can be improved. First of all the variable names '$email_header' |
| 112 |
'$email_body' and '$email' are too long for command-line option. I |
| 113 |
would prefer to use for example '$h', '$b' and '$a' instead. |
| 114 |
|
| 115 |
I would also suggest to add an option (say -A) similar to perl's |
| 116 |
'-M' to allow including any perl module, so the complex conditions |
| 117 |
like |
| 118 |
grepmail -E 'use Foo::Bar; ...' |
| 119 |
may be simplified to |
| 120 |
grepmail -AFoo::Bar -E '...' |
| 121 |
|
| 122 |
Also I think that modification and compilation of user's pattern |
| 123 |
for every e-mail (in function Do_Complex_Pattern_Matching) is not |
| 124 |
an efficient way to allow complex matching. I would suggest to |
| 125 |
compile user's pattern once into anonymous subroutine and call that |
| 126 |
subroutine for each e-mail. Probably it's a good idea to use |
| 127 |
Data::Alias module to avoid extra copying. Let me summarize in |
| 128 |
pseudocode: |
| 129 |
|
| 130 |
use Data::Alias; |
| 131 |
our $h; # $a and $b are always present |
| 132 |
|
| 133 |
#... |
| 134 |
my $sub_ref; |
| 135 |
if ( $opts{'E'} ) { |
| 136 |
$sub_ref = eval "sub { $opts{'E'} }" or die "..."; |
| 137 |
} |
| 138 |
|
| 139 |
# Before calling Do_Complex_Pattern_Matching |
| 140 |
alias local $a = $email; |
| 141 |
alias local $h = $email_header; |
| 142 |
alias local $b = $email_body; |
| 143 |
... = Do_Complex_Pattern_Matching(...); |
| 144 |
|
| 145 |
# In Do_Complex_Pattern_Matching |
| 146 |
if( $sub_ref ) { |
| 147 |
$matchesEmail = $sub_ref->(); |
| 148 |
} |
| 149 |
|
| 150 |
Thank you for 'grepmail' and I hope you will find something useful |
| 151 |
in my feedback. |
| 152 |
|
| 153 |
Vadim. |
| 154 |
|
| 155 |
------------------------------------------------------------------------------ |
| 156 |
|
| 157 |
- Add UTF mime support. (Thanks to Peter Jakobi <[email protected]> for the |
| 158 |
feature suggestion and patch.) |
| 159 |
|
| 160 |
See email and grepmail.jakobi* |
| 161 |
|
| 162 |
Hi, |
| 163 |
|
| 164 |
given the recent increase in utf mime mails, I was a bit annoyed at grepmail's |
| 165 |
lack of support. |
| 166 |
|
| 167 |
And living in Germany, the few umlauts make it far more likely to |
| 168 |
write/receive/archive mimed-email. From header =?...?= to real mimes. |
| 169 |
|
| 170 |
And encountering old latin1 umlauts in source, filenames and stuff on an utf-8 |
| 171 |
system is nice. Nearly as nice as not having set LC_COLLATE and wondering why |
| 172 |
[a-z]* suddenly likes to match uppercase on a new ubuntu box. |
| 173 |
|
| 174 |
Anyway, annoyance breeds code, and code lacks testing. I'd love if you could |
| 175 |
take a look at this, as I don't have enough interesting test cases on my own. |
| 176 |
Worse, as it works for me more or less now, the annoyance level is too low to |
| 177 |
properly maintain and bulletproof the patch. |
| 178 |
|
| 179 |
The basic idea is: grep a mangled mail version on -z, but return the valid one |
| 180 |
on output. Furthermore, I'm not that much interested in anything but German |
| 181 |
umlauts and the most common European one, and I want to grep for words |
| 182 |
containing them in Plain-Ascii (i.e. the eMail is mangled to Ue instead of |
| 183 |
uppercase U diaeris), where latin1==ascii==utf-8, so this kind of allows |
| 184 |
skipping the whole thorny $LANG issue during grep. As the mangled version |
| 185 |
isn't for output, this allowed to add on a basic de-html and paragraph mode to |
| 186 |
ease grepping. My few test cases were in simple mode, but as I'm outside the |
| 187 |
grep functions, -E queries should also behave. |
| 188 |
|
| 189 |
See attachments; patch is against ubuntu7.10beta's take on the ancient stable |
| 190 |
version of grepmail. |
| 191 |
|
| 192 |
what do you think? |
| 193 |
|
| 194 |
------------------------------------------------------------------------------ |