[CentOS] Re: Rsyslog problems

Sun Apr 17 19:41:26 UTC 2016
Yamaban <foerster at lisas.de>

On Sun, 17 Apr 2016 20:51, Adrian P. van Bloois <adrian at ...> wrote:

> Hi,
> My rsyslog is not working as expected.
> I have some thing in rsyslog.d that do well, like this:
> # Log all iptables stuff separately
> :msg, contains, "iptables: " {
>     action(type="omfile" file="/var/log/iptraf/info")
> }
>
>
> No problems with that.
> Bu what's in /etc/rsyslog.conf  like:
> mail.*  /var/log/mail/info
>
> don't do anything at all.
> Rsyslogd -N1   is OK, rsyslogd -D -N1 looks good too as does
> rsyslogd -d -N1.
> Here is my rsyslog.conf.
> What am I doing wrong?

Nothing I can see as "wrong". In full "Rainerscript"
the mail part would be written as (copy from my config,
please adapt the file="" part as you like):
[code]
if      ($syslogfacility-text == 'mail') then {
         action(type="omfile" file="/var/log/mail/all")
         stop
}
[/code]

Try and check, if this works, well OK, if not, ask again.

Ah, and please check if there is a SELinux problem with the
logfile, it could be a permission problem.

  - Yamaban