Re: Conditional From?

Morten Bo Johansen <[email protected]> Wed, 7 Jan 2015 21:31:52 +0100
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
On 2015-01-06 Matěj Cepl wrote:

> is it possible to make slrn to set different From header for 
> different newsgroups? I generally use the same address as here, 
> but I would need to use our company address for the company 
> newsgroups. Is it possible to persuade slrn to do The Right 
> Thing?


As an alternative, the following example should do what you want. Put in
a file e.g. "set_cond_from.sl" and place in your slrn macro directory:
    
    define set_cond_from ()
    {
       if (current_newsgroup == "gmane.network.slrn.user");
         {
            set_string_variable ("username", "user");
            set_string_variable ("hostname", "hostname");
         }
    }
    
    () = register_hook ("followup_hook", "set_cond_from");
    () = register_hook ("post_hook", "set_cond_from");

Adapt to your needs.

and then in .slrnrc

    interpret ("set_cond_from.sl")
    

  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