Xymon Mailing List Archive search

xymon-mailack

list Ray Reuter
Tue, 2 Oct 2012 15:44:19 -0400
Message-Id: <CACHnTzCR+A3E1C5XQV4qWObs+RHR_W=user-41d15c7a5b61@xymon.invalid>

So is this how you made the mailack work for xymon?

I am not sure what my alias should be pointing to?Not sure what your script
does.

Again thank you

On Tue, Oct 2, 2012 at 3:01 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
Sorry, didn't type that bit...  Anywhere in /etc/aliases will do, then run
 "newaliases" to recreate the db files that the mailer actually reads from.

Ralph


On Tue, Oct 2, 2012 at 2:59 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
Thank you Ralph, where would the line below go?


On Tue, Oct 2, 2012 at 2:56 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
I don't know about procmail as such, but I have had some success using
email aliases.  You can add a line like this:

xymon: "| /usr/local/bin/email_processor.sh"

then run "newaliases", then any email arriving for the xymon user gets
piped through the script.  Everything up to the first blank line is a
header.  Everything after that blank line is the body of the email.

I know procmail does something similar, I just don't know what, or how...

Ralph Mitchell


On Tue, Oct 2, 2012 at 2:49 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
The messages are making it to var/mail/xymon without an issue now.

But the .procmailrc file and rocmail.log file do not seem to either get
engaged in to the process or something else is missing.


On Mon, Oct 1, 2012 at 11:21 PM, Jeremy Laidman <
user-71895fb2e44c@xymon.invalid> wrote:
On 29 September 2012 02:51, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
I have created the .procmailrc file it looks like this. The file is
in /home/xymon 755 permissions and owned by xymon:xymon I tried the
ownership as root as well.

DEFAULT=$HOME/Mailbox
LOGFILE=$HOME/procmail.log
:0
| $HOME/server/bin/xymon-mailack --env=/home/xymon/server/etc/xymonserver.cfg


When I run it on the CLI using this command

./xymon-mailack --env=/home/xymon/server/etc/xymonserver.cfg --debug

I get nothing, it just returns an empty line, and sits there. I must
be missing something.
Yes you are.  The xymon-mailack program expects an email message on
standard input, and if run on the command-line your keyboard becomes
standard input.  You can do something like this:

xymon-mailack --env=... < sample-email

But first you need to put an email message into the file
"sample-mail".  You could create a file like this by temporarily removing
the .procmailrc file (to let messages go into the xymon user's mailbox) and
then sending the xymon user an email, and then copying a mail message from
/var/mail/xymon.  Note that the mailbox file can contain multiple messages
each separated by blank line+"From " (from-space), and you only want one of
them.

J