On 2017-03-28 15:09, Tom Damon wrote:
> Hi,
>
> I'm new to the list, so my apologies if this isn't the appropriate
> place for this question.
>
> I'm trying to use the following rule to send an email formatted in a
> particular way. Usually, '\n' works with the mail command to signal a
> new line, but just comes through as '\n' as this rule is written. I've
> tried several other methods with no luck, is there a proper way to do
> this?
>
> type=single
>
> ptype=regexp
>
> pattern=.*?A user account was locked out.*?Account Name: (\S+)\$
> Account Domain: (\S+).*?Account Name: (\S+).*?Caller Computer Name:
> ?(\S+)\|.*
>
> desc=(WARNING) reload requested for $1
>
> action=pipe 'Domain Controller= $2\nUser Domain= $2\nUser Login=
> $3\nLock Origin = $4\n\nOriginal Message:$0' mail -s 'User account
> lockout' admin@email
>
> Tom Damon
Enclose the whole thing in single quotes, and double quote the vars:
'"$0"\n\n1\) bleah \n2\) meh'
That is what is working for me at least.
James
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users