$template HostnameFile,"/var/log/remote/%HOSTNAME%"
$template FromHostFile,"/var/log/remote/%fromhost%"

# Do not filter duplicated messages for remote hosts
$RepeatedMsgReduction off

# If hostname is syslogd, it's a startup message from a roach's syslogd
:hostname, isequal, "syslogd" ?FromHostFile

# If previous rule was matched, do not process message any further
& ~

# If hostname is exiting, it's an exiting message from a roach's syslogd
:hostname, isequal, "exiting" ?FromHostFile

# If previous rule was matched, do not process message any further
& ~

# If hostname is localhost, it's from some poor computer that doesn't know its
# own name, so use FromHostFile
:hostname, isequal, "localhost" ?FromHostFile

# If previous rule was matched, do not process message any further
& ~

# If hostname is three digits, it's a message from the HP V1810 1 GbE switch
:hostname, regex, "^[0-9][0-9][0-9]$" ?FromHostFile

# If previous rule was matched, do not process message any further
& ~

# If hostname is not paper2, log it to host-specific logfile
:hostname, !isequal, "paper2" ?HostnameFile

# If previous rule was matched, do not process message any further
& ~

# Turn duplicated messages filter back on
$RepeatedMsgReduction on
