Re: Conditional From?
Morten Bo Johansen <[email protected]> Thu, 8 Jan 2015 18:10:31 +0100
| Newsgroups | gmane.network.slrn.user |
|---|---|
| Message-ID | <[email protected]> |
On 2015-01-08 Matěj Cepl wrote:
> identity.sl is better, because it matches newsgroups by RE, not
> only by simple name. So I can have this:
> identity->add_new ("redhat", "rh\.corp\..*");
> identity->set_from ("redhat", "mcepl", "redhat.com");
> identity->set_signature ("redhat", ".signature-thunderbird");
Sure, it was just an attempt at some quick solution, in case identity.sl
needed too much of an update. The regexp matching could also be achieved
simply by changing it to this
define set_cond_from ()
{
set_string_variable ("username", "mbj");
set_string_variable ("hostname", "spamcop.net");
if (string_match (current_newsgroup, "<regexp>", 1))
{
set_string_variable ("username", "user");
set_string_variable ("hostname", "hostname");
...
(other variables)
}
}
() = register_hook ("followup_hook", "set_cond_from");
() = register_hook ("post_hook", "set_cond_from");
Morten
------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net