You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2004/01/25 04:22:27 UTC
Re: A tool for extracting URL's from mail messages
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Gary Funck writes:
>Probably better would be to use the Spamassassin API and let SA do the
>parsing ...]
true! Gary -- a great way to do this would be using the new plugin API ;)
Like so:
1. define a local eval rule, "DUMP_URIS", like so:
loadplugin DumpUrisPlugin /path/to/dumpurisplugin.pm
body DUMP_URIS eval:dump_uris()
2. create a simple plugin module that registers an eval function
for that, dump_uris(), which would look like this:
sub dump_uris {
my ($self, $permsgstatus) = @_;
my @uris = $permsgstatus->get_uri_list();
# ... process those uris in whatever way you want,
# and output them to stdout, a file, or whatever.
}
3. run "mass-check" on the folders.
that's it!
- --j.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
Comment: Exmh CVS
iD8DBQFAEzZzQTcbUG5Y7woRAopmAJ0V5T/WfuSlexGbzZX1OZHilac6rACdHoL3
mMq5AhkmlC4YFOGvwug4AZI=
=QPCP
-----END PGP SIGNATURE-----