unified conf syntax proposal..
Fabien Tassin
fta at sofaraway.org
Tue Mar 6 15:47:00 UTC 2001
I've planned to implement a parser for the following syntax RSN.
Some remaining points..
- should a condition import 'default' by default or nor ?
- are 'option's in a program block needed or not ? This is the place for
non-peer outgoing parameters but there's no way to use them except for
'builtin'.
It is also impossible to specify parameters for the incoming system
(builtin too) but OTOH, alternate incoming systems can be specified.
- Some (including Russ) dislike named terms. I agree that the names are
useless in the semantic but I want to be able to manipulate terms by name
like in 'ctlinntd del peer foo term fromme1'.
Please comment..
####################################################
condition default { # 'default' is the only magic condition
groups "*,@*poison*";
distributions "*,!local";
}
condition small {
# 'condition default' used
size 128KB orlower;
}
condition big {
size 129KB orgreater;
}
condition full {
no default; # 'condition default' skipped
groups "*";
}
condition full-n-big {
no default;
condition full;
size 129KB orgreater;
}
program inpaths {
command "/news/bin/inpaths";
arguments "-p -d /news/log/path/inpaths.%d";
method "Tc,WP" # ugly !!
}
program builtin { # 'builtin' is the only magic program
# 'command', 'arguments' and 'method' fields ignored
option "key1: value1";
option "key2: [ value21 value22 ]";
}
peer foo { # there's no magic peer
term tome {
from addresses [ news.foo.org 1.2.3.4 ]; # 'condition default' used
then accept;
}
term fromme1 {
from { # 'condition default' used
condition small;
excludepath [ foo news-small.foo.org ];
}
then {
address news-small.foo.org;
port 456;
send using builtin; # or just 'send' as 'builtin' is the default method
}
}
term fromme2 {
from {
condition big;
excludepath [ foo news-big.foo.org ];
}
then sendto news-big.foo.org:1119; # like 'send' but with an argument
}
}
# 'default' applying in both ways
peer bar {
term in {
from addresses [ news.bar.org ];
then accept;
}
term out {
from excludepath [ bar ];
then sendto news.bar.org;
}
}
peer path {
term Inpath {
from groups "*,!local.*";
then send using inpaths;
}
}
####################################################
--
Fabien Tassin -+- fta at sofaraway.org
More information about the inn-workers
mailing list