***************
*** 13,31 ****
  use XML::RSS;
  use Time::Local;
  use LWP::UserAgent;
  
  my @mailboxes		= qw(INBOX);
  my $NUMBER_OF_MESSAGES	= 2;
  #my $URL		= q(http://localhost/~greg/blog/index.rdf);
- my $URL			= q(http://www.linux.hr/backend.php);
  my $CACHE_MINUTES	= 120;
  
  my $debug = 1;
  
  sub new {
  	my $proto	= shift;
  	my $class	= ref($proto) || $proto;
- 	my $server	= shift;
  
  	my $ua		= new LWP::UserAgent (
  		agent => 'Net-IMAP-Server-RSSBridge/0.01',
--- 13,36 ----
  use XML::RSS;
  use Time::Local;
  use LWP::UserAgent;
+ use Data::Dumper;
  
  my @mailboxes		= qw(INBOX);
  my $NUMBER_OF_MESSAGES	= 2;
  #my $URL		= q(http://localhost/~greg/blog/index.rdf);
+ #my $URL = q(http://www.linux.hr/backend.php);
+ my $URL = q{http://www.kuro5hin.org/backend.rdf};
  my $CACHE_MINUTES	= 120;
+ my $feeds;	# hash in 'inbox_name' => 'feed url' form
  
  my $debug = 1;
  
  sub new {
  	my $proto	= shift;
  	my $class	= ref($proto) || $proto;
+ 	my $args	= {@_};
+ 	my $server	= $args->{'server'} || die "need server arg";
+ 	my $feeds	= $args->{'feeds'} || die "need feeds";
  
  	my $ua		= new LWP::UserAgent (
  		agent => 'Net-IMAP-Server-RSSBridge/0.01',
***************
*** 201,207 ****
  sub rss {
  	my $self	= shift;
  	my $url		= shift;
- 	$url		= $URL if ($url eq 'INBOX');
  	
  	no warnings 'uninitialized';
  	if (ref(my $rss = $self->_feed_cache->{ $url }[2]) and (time - $self->_feed_cache->{ $url }[0] < ($CACHE_MINUTES * 60))) {
--- 209,220 ----
  sub rss {
  	my $self	= shift;
  	my $url		= shift;
+ 	if ($feeds->{$url}) {
+ 		$url = $feeds->{$url};
+ 	} else {
+ 		# fall back to default feed
+ 		$url = $URL;
+ 	}
  	
  	no warnings 'uninitialized';
  	if (ref(my $rss = $self->_feed_cache->{ $url }[2]) and (time - $self->_feed_cache->{ $url }[0] < ($CACHE_MINUTES * 60))) {
