1

Is it possible to use the ommail module that comes with rsyslog to send email through a local postfix install. I use gmail as my smtp and ommail doesn't do authentication. Will using something like the following in an rsyslog .conf file work?

module(load="ommail")

template (name="mailBody"  type="string" string="RSYSLOG Alert\\r\\nmsg='%msg%'")
template (name="mailSubject" type="string" string="Emergency logged on %hostname%")

    if $msg contains "hard disk fatal failure" then {
       action(type="ommail" server="localhost" port="25"
              mailfrom="rsyslog@localhost"
              mailto="root"
              subject.template="mailSubject"
              action.execonlyonceeveryinterval="21600")
    }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.