xymon-mailack
list Ray Reuter
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. I had it working at a previous employer but the Linux guru there got it working for me. I do not have one of them here to lend a hand. I do not see the procmail.log file nor the Mailbox directory the man pages refer to. I may be completely missing something simple here or better yet something like promail is not installed. I do get the alerts via email from the system so that is working. Again thank you for all the help.
list Ray Reuter
I created the .procmail file as per the man pages, installed procmail but nothing seems to work when replying to the alerts sent by my xymon server. The "Mailbox" in the .procmail file is it a file or a directory? Does anyone who has this working know what the permissions and owner ship of the .procmail file should be? Everyone on this mailing list has been instrumental with helping me through some of the issue I have had. I wish I were more of a Linux guru but I am not and the company I work for does not have a true Linux engineer, he has less experience then I do.
list Ryan Novosielski
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
▸
On 10/01/2012 11:48 AM, Ray Reuter wrote:I created the .procmail file as per the man pages, installed procmail but nothing seems to work when replying to the alerts sent by my xymon server. The "Mailbox" in the .procmail file is it a file or a directory? Does anyone who has this working know what the permissions and owner ship of the .procmail file should be? Everyone on this mailing list has been instrumental with helping me through some of the issue I have had. I wish I were more of a Linux guru but I am not and the company I work for does not have a true Linux engineer, he has less experience then I do.
There will probably be a log for this somewhere of what is going on. I don't think you said what OS or any of that. Regardless, you will probably do better Googling for information about the use of the Procmail RC file (nothing much to do with Xymon). I don't remember having any particular trouble with this. You'd need to know whether your MTA even uses procmail though, I think. I personally used a .forward file that is at least used by Sendmail (which is what I'm using -- don't recall whether it supports procmail which is for mail filtering). - -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBpvF4ACgkQmb+gadEcsb6W/wCeK4NcPHNtPuZjylzsHCTq5ZwN BvMAnimPzTBPrriRk9UGQOotnX3PVgxc =QkVJ -----END PGP SIGNATURE-----
list Paul Root
This works: DEFAULT=$HOME/Mailbox LOGFILE=$HOME/procmail.log FROM=`/usr/bin/formail -x From:` FGREP=/bin/fgrep XYMON_ACKERS=$HOME/.xymon_ackers :0 w * ^Subject:.*Out of Office /dev/null :0 w * ^Subject:.*Undeliverable /dev/null :0:emailack * ? (echo "$FROM" | $FGREP -i -f $XYMON_ACKERS) | $HOME/server/bin/xymon-mailack --env=$HOME/server/etc/xymonserver.cfg :0 /dev/null Paul Root - Senior Engineer Managed Services Systems - CenturyLink
▸
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Ray Reuter
Sent: Monday, October 01, 2012 10:49 AM
To: xymon at xymon.com
Subject: [Xymon] xymon-mailack
I created the .procmail file as per the man pages, installed procmail but nothing seems to work when replying to the alerts sent by my xymon server.
The "Mailbox" in the .procmail file is it a file or a directory? Does anyone who has this working know what the permissions and owner ship of the .procmail file should be?
Everyone on this mailing list has been instrumental with helping me through some of the issue I have had. I wish I were more of a Linux guru but I am not and the company I work for does not have a true Linux engineer, he has less experience then I do.
list Ray Reuter
I am using Centos 6.2 Kernel Linux 2.6.32-200.231.el6.i686 During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.
▸
On Mon, Oct 1, 2012 at 11:53 AM, Ryan Novosielski <user-ae4522577e16@xymon.invalid>wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/01/2012 11:48 AM, Ray Reuter wrote:I created the .procmail file as per the man pages, installed procmail but nothing seems to work when replying to the alerts sent by my xymon server. The "Mailbox" in the .procmail file is it a file or a directory? Does anyone who has this working know what the permissions and owner ship of the .procmail file should be? Everyone on this mailing list has been instrumental with helping me through some of the issue I have had. I wish I were more of a Linux guru but I am not and the company I work for does not have a true Linux engineer, he has less experience then I do.There will probably be a log for this somewhere of what is going on. I don't think you said what OS or any of that. Regardless, you will probably do better Googling for information about the use of the Procmail RC file (nothing much to do with Xymon). I don't remember having any particular trouble with this. You'd need to know whether your MTA even uses procmail though, I think. I personally used a .forward file that is at least used by Sendmail (which is what I'm using -- don't recall whether it supports procmail which is for mail filtering). - -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBpvF4ACgkQmb+gadEcsb6W/wCeK4NcPHNtPuZjylzsHCTq5ZwN BvMAnimPzTBPrriRk9UGQOotnX3PVgxc =QkVJ -----END PGP SIGNATURE-----
list Ralph Mitchell
Do you even have an email receiver running on your xymon server? Try to
telnet to port 25 on the server:
telnet server.domain.com 25
If that fails to connect, you won't be able to receive email either.
Ralph Mitchell
▸
On Mon, Oct 1, 2012 at 12:46 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
I am using Centos 6.2 Kernel Linux 2.6.32-200.231.el6.i686 During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. On Mon, Oct 1, 2012 at 11:53 AM, Ryan Novosielski <user-ae4522577e16@xymon.invalid>wrote:-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 10/01/2012 11:48 AM, Ray Reuter wrote:I created the .procmail file as per the man pages, installed procmail but nothing seems to work when replying to the alerts sent by my xymon server. The "Mailbox" in the .procmail file is it a file or a directory? Does anyone who has this working know what the permissions and owner ship of the .procmail file should be? Everyone on this mailing list has been instrumental with helping me through some of the issue I have had. I wish I were more of a Linux guru but I am not and the company I work for does not have a true Linux engineer, he has less experience then I do.There will probably be a log for this somewhere of what is going on. I don't think you said what OS or any of that. Regardless, you will probably do better Googling for information about the use of the Procmail RC file (nothing much to do with Xymon). I don't remember having any particular trouble with this. You'd need to know whether your MTA even uses procmail though, I think. I personally used a .forward file that is at least used by Sendmail (which is what I'm using -- don't recall whether it supports procmail which is for mail filtering). - -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBpvF4ACgkQmb+gadEcsb6W/wCeK4NcPHNtPuZjylzsHCTq5ZwN BvMAnimPzTBPrriRk9UGQOotnX3PVgxc =QkVJ -----END PGP SIGNATURE-----
list Jeremy Laidman
▸
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
list Jeremy Laidman
On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
I am using Centos 6.2
By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail).
▸
During my install I do not remember installing anything as the mailtransport, but the alerting was working right out of the box from day one.
Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.
▸
I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.
Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ray Reuter
Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com ESMTP Postfix helo XXXXXXXXXX.lvh.com 250 XXXXXXX.lvh.com MAIL FROM: user-e6b56f093673@xymon.invalid 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company.
▸
On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>wrote:
On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:I am using Centos 6.2By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mailtransport, but the alerting was working right out of the box from day one.Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ralph Mitchell
Copy for the list, because I forget to select "Reply to All": I think you probably should not have quotes around that Subject line. Ralph Mitchell
▸
On Tue, Oct 2, 2012 at 11:29 AM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com ESMTP Postfix helo XXXXXXXXXX.lvh.com 250 XXXXXXX.lvh.com MAIL FROM: user-e6b56f093673@xymon.invalid 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>wrote:On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:I am using Centos 6.2By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mailtransport, but the alerting was working right out of the box from day one.Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from
another device, such as a Windows PC, with "telnet xymon.server.name25". If you get a "connection refused" or similar message, than you need
▸
to reconfigure Postfix to accept remote connections.I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ray Reuter
Tried it without the quotes a second ago as well.
▸
250 2.1.5 Ok
SUBJECT: xymon
221 2.7.0 Error: I can break rules, too. Goodbye.
Connection closed by foreign host.
▸
On Tue, Oct 2, 2012 at 11:44 AM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
Copy for the list, because I forget to select "Reply to All": I think you probably should not have quotes around that Subject line. Ralph Mitchell On Tue, Oct 2, 2012 at 11:29 AM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com ESMTP Postfix helo XXXXXXXXXX.lvh.com 250 XXXXXXX.lvh.com MAIL FROM: user-e6b56f093673@xymon.invalid 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>wrote:On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:I am using Centos 6.2By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mailtransport, but the alerting was working right out of the box from day one.Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Paul Root
That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf and at least set the 'myhostname' variable to the fqdn for your host?
▸
Paul Root - Senior Engineer
Managed Services Systems - CenturyLink
From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid]
Sent: Tuesday, October 02, 2012 10:30 AM
To: Jeremy Laidman
Cc: Ryan Novosielski; xymon at xymon.com; Root, Paul
Subject: Re: [Xymon] xymon-mailack
Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line.
[root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com<http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com<http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com<http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com<http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com<http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid<mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid<mailto:user-238b11cbd81e@xymon.invalid>
▸
250 2.1.5 Ok
"SUBJECT: Xymon"
221 2.7.0 Error: I can break rules, too. Goodbye.
Connection closed by foreign host.
I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this.
drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox
-rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log
-rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc
This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote.
Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company.
On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote:
On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>> wrote:
I am using Centos 6.2
By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail).
During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one.
Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server.
Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name<http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.
▸
I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.
Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section.
J
list Carl Inglis
After MAIL FROM & RCPT TO - you need a DATA command... Regards, Carl Carl Inglis Systems Administrator Rakon UK Limited Dowsett House, Sadler Road, Lincoln LN6 3RS, United Kingdom Tel: +XX (X)XXXX XXXXXX | Fax:+XX (X) XXXX XXXXXX | Mob: +44 (0) 7786 552915 user-96685bdc864b@xymon.invalid | www.rakon.com [The Queens Awards for Enterprise 2012] [Rakon Logo] We are an organisation committed to working towards accreditation for the Investors in People Standard. This message together with any attachments contains confidential information and may be subject to privilege. If you are not the intended recipient you may not distribute it in any way, you must notify the sender immediately and delete any copies of the message along with its attachments. Rakon UK Ltd is a limited company registered in England and Wales. Registered Office: Dowsett House, Sadler Road, Lincoln LN6 3RS Company Registration Number: 5128090. Please be aware that Rakon UK Limited may monitor email traffic data including the date, time, subject line, sender and recipients for the purposes of security and usage monitoring. Automated monitoring systems may also be applied to ascertain whether incoming/outgoing emails are likely to contain viruses, other destructive devices or inappropriate content.
▸
From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Ray Reuter Sent: 02 October 2012 16:30 To: Jeremy Laidman Cc: xymon at xymon.com Subject: Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com<http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com<http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com<http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com<http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com<http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid<mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid<mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name<http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ray Reuter
SUBJECT: Xymon [216807] lvhwebappold:disk CRITICAL (RED) test . 250 2.0.0 Ok: queued as D522A52F9 This is from another linux machine that I ran the telnet command from. On Tue, Oct 2, 2012 at 11:44 AM, Andrew Rakowski <user-00c59fc5f1d5@xymon.invalid> wrote:
Hi Ray,
To follow the SMTP protocol, I believe you need to add a "data" command
after your "rcpt to", then you can enter the "subject:" line (and any
other headers), followed by a blank line, then the body of the message.
I think postfix is complaining that it doesn't know what the "SUBJECT:
xxx" command is...
Cheers,
-Andrew
Andrew Rakowski | Voice: XXX.XXX.XXXX | Email:
user-00c59fc5f1d5@xymon.invalid
[CISSP] Infrastructure System Administration [GPG key:
43994A12]
Environmental Molecular Sciences Lab | Pacific Northwest National
Laboratories
P.O. Box 999 | Mailstop K8-83 | Richland, WA XXXXX [USA]
▸
On Tue, 2 Oct 2012, Ray Reuter wrote:
} Well we are getting closer. I am now able to telnet to the server. I
tried to send mail to
} the server but kicked off every time i try to do the subject line.
} [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25
} Trying 10.1.72.168...
} Connected to XXXXXXXXX.xxx.com (xx.xx.x.x).
} Escape character is '^]'.
} 220 XXXXXXXXX.lvh.com ESMTP Postfix
} helo XXXXXXXXXX.lvh.com
} 250 XXXXXXX.lvh.com
} MAIL FROM: user-e6b56f093673@xymon.invalid
} 250 2.1.0 Ok
} RCPT TO: user-238b11cbd81e@xymon.invalid
} 250 2.1.5 Ok
} "SUBJECT: Xymon"
} 221 2.7.0 Error: I can break rules, too. Goodbye.
} Connection closed by foreign host.
}
} I have the .procmailrc file set up as per the xymon man page, still not
sure if the "Mailbox"
} is a directory or file. and the directory structure of the xymon home
directory looks like
} this.
}
} drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox
} -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log
} -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc
}
} This feature is one of the most important to the company I work for and
have been trying to
} get it to work for a couple of days now. We even added an MX record for
the server so mail
} can be delivered to it directly. Telnet works locally and remote.
}
} Any recommendations would be greatly appreciated, you have all been a
huge help so far and
} this monitoring tool has done wonders for this company.
}
}
}
}
}
}
} On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>
▸
wrote:
} On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
} I am using Centos 6.2
}
}
} By default Centos (aka Red Hat) v6 boxes run postfix (rather than
Sendmail).
}
} During my install I do not remember installing anything as the mail
} transport, but the alerting was working right out of the box from
day one.
}
}
} Initially, postfix is configured so it won't accept SMTP connections
from off the box.
} So outbound emails will get sent OK, but incoming emails will not get
delivered to the
} Xymon server.
}
} Test this by attempting to telnet to the Xymon server on port 25 from
another device,
} such as a Windows PC, with "telnet xymon.server.name 25". If you get a
"connection
} refused" or similar message, than you need to reconfigure Postfix to
accept remote
} connections.
}
} I followed the man page for the mailack and created everything as
per the
} instructions, but I am not even sure the mail is reaching the
server at
} this point.
}
}
} Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file
that came with
} Postfix for instructions on setting things up, particularly the "Postfix
on a local
} network" section.
}
} J
}
}
}
}
list Ralph Mitchell
The sequence appears to be HELO server.domain.com MAIL FROM: user-4b28831ca997@xymon.invalid RCPT TO: user-06bef2435736@xymon.invalid DATA Subject: this is the subject line first line of message second line of message . QUIT I just tried that, and it delivered. with the Subject line among the headers. Odd, but it worked...
▸
Ralph Mitchell
On Tue, Oct 2, 2012 at 11:45 AM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
Tried it without the quotes a second ago as well. 250 2.1.5 Ok SUBJECT: xymon 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. On Tue, Oct 2, 2012 at 11:44 AM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:Copy for the list, because I forget to select "Reply to All": I think you probably should not have quotes around that Subject line. Ralph Mitchell On Tue, Oct 2, 2012 at 11:29 AM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com ESMTP Postfix helo XXXXXXXXXX.lvh.com 250 XXXXXXX.lvh.com MAIL FROM: user-e6b56f093673@xymon.invalid 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalidwrote:On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:I am using Centos 6.2By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mailtransport, but the alerting was working right out of the box from day one.Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ray Reuter
I have a feeling the machine I ran the telnet from can not deliver the email but as in the message below it did accept everything i put in the command.
▸
On Tue, Oct 2, 2012 at 11:59 AM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
The sequence appears to be HELO server.domain.com MAIL FROM: user-4b28831ca997@xymon.invalid RCPT TO: user-06bef2435736@xymon.invalid DATA Subject: this is the subject line first line of message second line of message . QUIT I just tried that, and it delivered. with the Subject line among the headers. Odd, but it worked... Ralph Mitchell On Tue, Oct 2, 2012 at 11:45 AM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:Tried it without the quotes a second ago as well. 250 2.1.5 Ok SUBJECT: xymon 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. On Tue, Oct 2, 2012 at 11:44 AM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:Copy for the list, because I forget to select "Reply to All": I think you probably should not have quotes around that Subject line. Ralph Mitchell On Tue, Oct 2, 2012 at 11:29 AM, Ray Reuter <user-9df4e3e828ec@xymon.invalid>wrote:Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com ESMTP Postfix helo XXXXXXXXXX.lvh.com 250 XXXXXXX.lvh.com MAIL FROM: user-e6b56f093673@xymon.invalid 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman < user-71895fb2e44c@xymon.invalid> wrote:On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:I am using Centos 6.2By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mailtransport, but the alerting was working right out of the box from day one.Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Andrew Rakowski
▸
} On Tue, Oct 2, 2012 at 11:59 AM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid> wrote: } The sequence appears to be } HELO server.domain.com } MAIL FROM: user-4b28831ca997@xymon.invalid } RCPT TO: user-06bef2435736@xymon.invalid } DATA } Subject: this is the subject line } first line of message } second line of message } . } QUIT } } } I just tried that, and it delivered. with the Subject line among the headers. �Odd, but } it worked... } } Ralph Mitchell
[...snip...]
You also need a blank (empty) line after the header lines (in your case,
the Subject: line), the remainder of the input then becomes the body of
the mail message.
-Andrew
▸
On Tue, 2 Oct 2012, Ray Reuter wrote:
} I have a feeling the machine I ran the telnet from can not deliver the email but as in the
} message below it did accept everything i put in the command.
}
}
list Ralph Mitchell
I've tried it going to Postfix and Lotus Notes, and both seem to be OK with not putting in a blank line. Looking at the raw email, it puts the Subject line among the other headers and separates the body from the headers with a blank line. It looks like maybe mailers are smart enough to interpret the first non-header as the start of the body? A blank line wouldn't hurt, though, and may be necessary for some mailers.
▸
Ralph Mitchell
On Tue, Oct 2, 2012 at 12:09 PM, Andrew Rakowski <user-00c59fc5f1d5@xymon.invalid> wrote:
} On Tue, Oct 2, 2012 at 11:59 AM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid> wrote: } The sequence appears to be } HELO server.domain.com } MAIL FROM: user-4b28831ca997@xymon.invalid } RCPT TO: user-06bef2435736@xymon.invalid } DATA } Subject: this is the subject line } first line of message } second line of message } . } QUIT } } } I just tried that, and it delivered. with the Subject line among the headers. Odd, but } it worked... } } Ralph Mitchell [...snip...] You also need a blank (empty) line after the header lines (in your case, the Subject: line), the remainder of the input then becomes the body of the mail message. -Andrew On Tue, 2 Oct 2012, Ray Reuter wrote: } I have a feeling the machine I ran the telnet from can not deliver the email but as in the } message below it did accept everything i put in the command. } }
list Ray Reuter
okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas? Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client= domain.domin.com[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=< user-6959ae01ec8c@xymon.invalid> Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=< user-a879addf7dd0@xymon.invalid>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=< user-124f4840851c@xymon.invalid>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed
▸
On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid>wrote:
That error is postfix tell you it can’t deliver. Did you edit /etc/postfix/main.cf and at least set the ‘myhostname’ variable to the fqdn for your host?**** ** ** Paul Root - Senior Engineer**** Managed Services Systems - CenturyLink**** ** ** ** ** *From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 10:30 AM *To:* Jeremy Laidman *Cc:* Ryan Novosielski; xymon at xymon.com; Root, Paul *Subject:* Re: [Xymon] xymon-mailack**** ** ** Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line.**** ** ** [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25**** Trying 10.1.72.168...**** Connected to XXXXXXXXX.xxx.com (xx.xx.x.x).**** Escape character is '^]'.**** 220 XXXXXXXXX.lvh.com ESMTP Postfix**** helo XXXXXXXXXX.lvh.com**** 250 XXXXXXX.lvh.com**** MAIL FROM: user-e6b56f093673@xymon.invalid**** 250 2.1.0 Ok**** RCPT TO: user-238b11cbd81e@xymon.invalid**** 250 2.1.5 Ok**** "SUBJECT: Xymon"**** 221 2.7.0 Error: I can break rules, too. Goodbye.**** Connection closed by foreign host.**** ** ** I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this.**** ** ** drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox**** -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log**** -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc**** ** ** This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote.**** ** ** Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company.*** • ** ** ** ** ** ** ** ** ** ** On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid> wrote:**** On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:**** I am using Centos 6.2**** ** ** By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail).**** ** ** During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. **** ** ** Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server.**** ** ** Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.**** **** I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.**** ** ** Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section.**** ** ** J**** ** ** ** **
list Paul Root
What's your procmail log file say.
▸
Paul Root - Senior Engineer
Managed Services Systems - CenturyLink
From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid]
Sent: Tuesday, October 02, 2012 11:47 AM
To: Root, Paul
Cc: Jeremy Laidman; Ryan Novosielski; xymon at xymon.com
Subject: Re: [Xymon] xymon-mailack
okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas?
Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com<http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com<http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=<user-6959ae01ec8c@xymon.invalid<mailto:user-6959ae01ec8c@xymon.invalid>> Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid<mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com<http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid<mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid<mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf<http://main.cf>; and at least set the 'myhostname' variable to the fqdn for your host?
▸
Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>] Sent: Tuesday, October 02, 2012 10:30 AM To: Jeremy Laidman Cc: Ryan Novosielski; xymon at xymon.com<mailto:xymon at xymon.com>; Root, Paul Subject: Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com<http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com<http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com<http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com<http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com<http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid<mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid<mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name<http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ray Reuter
The procmail.log file is still empty. Should they (.procmairc procmail.log Mailbox "still not sure if this is a directory or file ) be owned by xymon or root and what the permissions should be.
▸
On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid>wrote:
What’s your procmail log file say.**** ** ** Paul Root - Senior Engineer**** Managed Services Systems - CenturyLink**** ** ** ** ** *From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 11:47 AM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon] xymon-mailack**** ** ** okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas?**** ** ** Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com[10.1.5.176]**** Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client= domain.domin.com[10.1.5.176]**** Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=< user-6959ae01ec8c@xymon.invalid>**** Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=< user-a879addf7dd0@xymon.invalid>, size=1859, nrcpt=1 (queue active)**** Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com[10.1.5.176]**** Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=< user-124f4840851c@xymon.invalid>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)**** Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed**** ** ** ** ** ** **
On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid>
▸
wrote:****
That error is postfix tell you it can’t deliver. Did you edit
/etc/postfix/main.cf and at least set the ‘myhostname’ variable to the
fqdn for your host?****
****
Paul Root - Senior Engineer****
Managed Services Systems - CenturyLink****
****
****
*From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid]
*Sent:* Tuesday, October 02, 2012 10:30 AM
*To:* Jeremy Laidman
*Cc:* Ryan Novosielski; xymon at xymon.com; Root, Paul
*Subject:* Re: [Xymon] xymon-mailack****
****
Well we are getting closer. I am now able to telnet to the server. I tried
to send mail to the server but kicked off every time i try to do the
subject line.****
****
[root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25****
Trying 10.1.72.168...****
Connected to XXXXXXXXX.xxx.com (xx.xx.x.x).****
Escape character is '^]'.****
220 XXXXXXXXX.lvh.com ESMTP Postfix****
helo XXXXXXXXXX.lvh.com****
250 XXXXXXX.lvh.com****
MAIL FROM: user-e6b56f093673@xymon.invalid****
250 2.1.0 Ok****
RCPT TO: user-238b11cbd81e@xymon.invalid****
250 2.1.5 Ok****
"SUBJECT: Xymon"****
221 2.7.0 Error: I can break rules, too. Goodbye.****
Connection closed by foreign host.****
****
I have the .procmailrc file set up as per the xymon man page, still not
sure if the "Mailbox" is a directory or file. and the directory structure
of the xymon home directory looks like this.****
****
drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox****
-rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log****
-rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc****
****
This feature is one of the most important to the company I work for and
have been trying to get it to work for a couple of days now. We even added
an MX record for the server so mail can be delivered to it directly. Telnet
works locally and remote.****
****
Any recommendations would be greatly appreciated, you have all been a huge
help so far and this monitoring tool has done wonders for this company.***
• ****
****
****
****
****
On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>
wrote:****
On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:****
I am using Centos 6.2****
****
By default Centos (aka Red Hat) v6 boxes run postfix (rather than
Sendmail).****
****
During my install I do not remember installing anything as the mail
transport, but the alerting was working right out of the box from day one.
****
****
Initially, postfix is configured so it won't accept SMTP connections from
off the box. So outbound emails will get sent OK, but incoming emails will
not get delivered to the Xymon server.****
****
Test this by attempting to telnet to the Xymon server on port 25 from
another device, such as a Windows PC, with "telnet xymon.server.name 25".
If you get a "connection refused" or similar message, than you need to
reconfigure Postfix to accept remote connections.****
****
I followed the man page for the mailack and created everything as per
the instructions, but I am not even sure the mail is reaching the server at
this point.****
****
Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file
that came with Postfix for instructions on setting things up, particularly
the "Postfix on a local network" section.****
****
J****
****
****
** **
list Paul Root
yes Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] Sent: Tuesday, October 02, 2012 12:27 PM To: Root, Paul Cc: Jeremy Laidman; Ryan Novosielski; xymon at xymon.com Subject: Re: [Xymon] xymon-mailack The procmail.log file is still empty. Should they (.procmairc procmail.log Mailbox "still not sure if this is a directory or file ) be owned by xymon or root and what the permissions should be. On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid<mailto:user-76fdb6883669@xymon.invalid>> wrote: What's your procmail log file say. Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>] Sent: Tuesday, October 02, 2012 11:47 AM To: Root, Paul Cc: Jeremy Laidman; Ryan Novosielski; xymon at xymon.com<mailto:xymon at xymon.com> Subject: Re: [Xymon] xymon-mailack okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas? Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com<http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com<http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=<user-6959ae01ec8c@xymon.invalid<mailto:user-6959ae01ec8c@xymon.invalid>> Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid<mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com<http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid<mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid<mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf<http://main.cf> and at least set the 'myhostname' variable to the fqdn for your host? Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>] Sent: Tuesday, October 02, 2012 10:30 AM To: Jeremy Laidman Cc: Ryan Novosielski; xymon at xymon.com<mailto:xymon at xymon.com>; Root, Paul Subject: Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com<http://XXXXXXXX.xxx.com> 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com<http://XXXXXXXXX.xxx.com> (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com<http://XXXXXXXXX.lvh.com> ESMTP Postfix helo XXXXXXXXXX.lvh.com<http://XXXXXXXXXX.lvh.com> 250 XXXXXXX.lvh.com<http://XXXXXXX.lvh.com> MAIL FROM: user-e6b56f093673@xymon.invalid<mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid<mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name<http://xymon.server.name> 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ray Reuter
yes they should be owned by xymon with 755 as the permissions? And if they are correct where should I be looking as to why the emails are not getting parsed or even showing up in the procmail.log file
▸
On Tue, Oct 2, 2012 at 1:32 PM, Root, Paul <user-76fdb6883669@xymon.invalid>wrote:
yes**** ** ** Paul Root - Senior Engineer**** Managed Services Systems - CenturyLink**** ** ** ** ** *From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 12:27 PM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon] xymon-mailack**** ** ** The procmail.log file is still empty. **** ** ** Should they (.procmairc procmail.log Mailbox "still not sure if this is a directory or file ) be owned by xymon or root and what the permissions should be.**** ** ** ** ** ** **
On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid>
▸
wrote:****
What’s your procmail log file say.****
****
Paul Root - Senior Engineer****
Managed Services Systems - CenturyLink****
****
****
*From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid]
*Sent:* Tuesday, October 02, 2012 11:47 AM
*To:* Root, Paul
*Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com
*Subject:* Re: [Xymon] xymon-mailack****
****
okay made a lot of progress now. It arrived at the server but never seems
to either get parsed by the .procmail in the xymon home directory or not
being processed correctly. Any ideas?****
****
Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from
domain.domain.com[10.1.5.176]****
Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=
domain.domin.com[10.1.5.176]****
Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=<
user-6959ae01ec8c@xymon.invalid>****
Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<
user-a879addf7dd0@xymon.invalid>, size=1859, nrcpt=1 (queue active)****
Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from
domain.domain.com[10.1.5.176]****
Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<
user-124f4840851c@xymon.invalid>, relay=local, delay=0.02, delays=0/0.01/0/0.01,
dsn=2.0.0, status=sent (delivered to mailbox)****
Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed****
****
****
****
On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid>
wrote:****
That error is postfix tell you it can’t deliver. Did you edit
/etc/postfix/main.cf and at least set the ‘myhostname’ variable to the
fqdn for your host?****
****
Paul Root - Senior Engineer****
Managed Services Systems - CenturyLink****
****
****
*From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid]
*Sent:* Tuesday, October 02, 2012 10:30 AM
*To:* Jeremy Laidman
*Cc:* Ryan Novosielski; xymon at xymon.com; Root, Paul
*Subject:* Re: [Xymon] xymon-mailack****
****
Well we are getting closer. I am now able to telnet to the server. I tried
to send mail to the server but kicked off every time i try to do the
subject line.****
****
[root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25****
Trying 10.1.72.168...****
Connected to XXXXXXXXX.xxx.com (xx.xx.x.x).****
Escape character is '^]'.****
220 XXXXXXXXX.lvh.com ESMTP Postfix****
helo XXXXXXXXXX.lvh.com****
250 XXXXXXX.lvh.com****
MAIL FROM: user-e6b56f093673@xymon.invalid****
250 2.1.0 Ok****
RCPT TO: user-238b11cbd81e@xymon.invalid****
250 2.1.5 Ok****
"SUBJECT: Xymon"****
221 2.7.0 Error: I can break rules, too. Goodbye.****
Connection closed by foreign host.****
****
I have the .procmailrc file set up as per the xymon man page, still not
sure if the "Mailbox" is a directory or file. and the directory structure
of the xymon home directory looks like this.****
****
drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox****
-rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log****
-rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc****
****
This feature is one of the most important to the company I work for and
have been trying to get it to work for a couple of days now. We even added
an MX record for the server so mail can be delivered to it directly. Telnet
works locally and remote.****
****
Any recommendations would be greatly appreciated, you have all been a huge
help so far and this monitoring tool has done wonders for this company.***
• ****
****
****
****
****
On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid>
wrote:****
On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:****
I am using Centos 6.2****
****
By default Centos (aka Red Hat) v6 boxes run postfix (rather than
Sendmail).****
****
During my install I do not remember installing anything as the mail
transport, but the alerting was working right out of the box from day one.
****
****
Initially, postfix is configured so it won't accept SMTP connections from
off the box. So outbound emails will get sent OK, but incoming emails will
not get delivered to the Xymon server.****
****
Test this by attempting to telnet to the Xymon server on port 25 from
another device, such as a Windows PC, with "telnet xymon.server.name 25".
If you get a "connection refused" or similar message, than you need to
reconfigure Postfix to accept remote connections.****
****
I followed the man page for the mailack and created everything as per
the instructions, but I am not even sure the mail is reaching the server at
this point.****
****
Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file
that came with Postfix for instructions on setting things up, particularly
the "Postfix on a local network" section.****
****
J****
****
****
****
** **
list Ray Reuter
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
list Ralph Mitchell
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
list Ray Reuter
The server is accepting emails, the /var/mail/xymon has all of the responses I have sent back via the alerts, but they never seem to make it to the.procmailrc script or the Mailbox and nothing is logging in the procmail.log.
▸
On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid>wrote:
What’s your procmail log file say.**** ** ** Paul Root - Senior Engineer**** Managed Services Systems - CenturyLink**** ** ** ** ** *From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 11:47 AM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon] xymon-mailack**** ** ** okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas?**** ** ** Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com[10.1.5.176]**** Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client= domain.domin.com[10.1.5.176]**** Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=< user-6959ae01ec8c@xymon.invalid>**** Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=< user-a879addf7dd0@xymon.invalid>, size=1859, nrcpt=1 (queue active)**** Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com[10.1.5.176]**** Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=< user-124f4840851c@xymon.invalid>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox)**** Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed**** ** ** ** ** ** ** On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid> wrote:**** That error is postfix tell you it can’t deliver. Did you edit /etc/postfix/main.cf and at least set the ‘myhostname’ variable to the fqdn for your host?**** **** Paul Root - Senior Engineer**** Managed Services Systems - CenturyLink**** **** **** *From:* Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 10:30 AM *To:* Jeremy Laidman *Cc:* Ryan Novosielski; xymon at xymon.com; Root, Paul *Subject:* Re: [Xymon] xymon-mailack**** **** Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line.**** **** [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com 25**** Trying 10.1.72.168...**** Connected to XXXXXXXXX.xxx.com (xx.xx.x.x).**** Escape character is '^]'.**** 220 XXXXXXXXX.lvh.com ESMTP Postfix**** helo XXXXXXXXXX.lvh.com**** 250 XXXXXXX.lvh.com**** MAIL FROM: user-e6b56f093673@xymon.invalid**** 250 2.1.0 Ok**** RCPT TO: user-238b11cbd81e@xymon.invalid**** 250 2.1.5 Ok**** "SUBJECT: Xymon"**** 221 2.7.0 Error: I can break rules, too. Goodbye.**** Connection closed by foreign host.**** **** I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this.**** **** drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox**** -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log**** -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc**** **** This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote.**** **** Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company.*** • **** **** **** **** **** On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid> wrote:**** On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:**** I am using Centos 6.2**** **** By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail).**** **** During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. **** **** Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server.**** **** Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections.**** **** I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.**** **** Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section.**** **** J**** **** **** ** **
list Ray Reuter
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
list Ralph Mitchell
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
list Paul Root
Do you have the procmail hooks in the postfix config files? If not, do you have your .forward setup to send stuff to procmail?
▸
Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] Sent: Tuesday, October 02, 2012 1:57 PM To: Root, Paul Cc: Jeremy Laidman; Ryan Novosielski; xymon at xymon.com Subject: Re: [Xymon] xymon-mailack The server is accepting emails, the /var/mail/xymon has all of the responses I have sent back via the alerts, but they never seem to make it to the.procmailrc script or the Mailbox and nothing is logging in the procmail.log. On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid<mailto:user-76fdb6883669@xymon.invalid>> wrote: What's your procmail log file say. Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>] Sent: Tuesday, October 02, 2012 11:47 AM To: Root, Paul Cc: Jeremy Laidman; Ryan Novosielski; xymon at xymon.com<mailto:xymon at xymon.com> Subject: Re: [Xymon] xymon-mailack okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas? Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com<http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com<http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=<user-6959ae01ec8c@xymon.invalid<mailto:user-6959ae01ec8c@xymon.invalid>> Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid<mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com<http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid<mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid<mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf<http://main.cf>; and at least set the 'myhostname' variable to the fqdn for your host? Paul Root - Senior Engineer Managed Services Systems - CenturyLink From: Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>] Sent: Tuesday, October 02, 2012 10:30 AM To: Jeremy Laidman Cc: Ryan Novosielski; xymon at xymon.com<mailto:xymon at xymon.com>; Root, Paul Subject: Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com<http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com<http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com<http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com<http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com<http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid<mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid<mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid<mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid<mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name<http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J
list Ryan Novosielski
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there any particular reason to use procmail at all, especially if you don't use this e-mail address to receive any other type of mail? I just use .forward.
▸
On 10/02/2012 03:02 PM, Root, Paul wrote:Do you have the procmail hooks in the postfix config files? If not, do you have your .forward setup to send stuff to procmail? Paul Root - Senior Engineer Managed Services Systems - CenturyLink
*From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday,
▸
October 02, 2012 1:57 PM *To:* Root, Paul *Cc:* Jeremy Laidman;
Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon]
xymon-mailack
The server is accepting emails, the /var/mail/xymon has all of the responses I have sent back via the alerts, but they never seem to
make it to the.procmailrc script or the Mailbox and nothing is
logging in the procmail.log.
On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul
<user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>>
▸
wrote:
What’s your procmail log file say.
Paul Root - Senior Engineer
Managed Services Systems - CenturyLink
*From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012
11:47 AM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski;
xymon at xymon.com <mailto:xymon at xymon.com> *Subject:* Re: [Xymon]
▸
xymon-mailack
okay made a lot of progress now. It arrived at the server but
never seems to either get parsed by the .procmail in the xymon home
directory or not being processed correctly. Any ideas?
Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com <http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message-id=<user-6959ae01ec8c@xymon.invalid Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid <mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid <mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0,
▸
status=sent (delivered to mailbox)
Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed
On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul<user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can’t deliver. Did you edit /etc/postfix/main.cf <http://main.cf>; and at least set the
▸
‘myhostname’ variable to the fqdn for your host?
Paul Root - Senior Engineer
Managed Services Systems - CenturyLink
*From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012
10:30 AM *To:* Jeremy Laidman *Cc:* Ryan Novosielski;
xymon at xymon.com <mailto:xymon at xymon.com>; Root, Paul *Subject:* Re:
▸
[Xymon] xymon-mailack
Well we are getting closer. I am now able to telnet to the server.
I tried to send mail to the server but kicked off every time i try
to do the subject line.
[root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com<http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com <http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com <http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com <http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com <http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid <mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid <mailto:user-238b11cbd81e@xymon.invalid>
▸
250 2.1.5 Ok
"SUBJECT: Xymon"
221 2.7.0 Error: I can break rules, too. Goodbye.
Connection closed by foreign host.
I have the .procmailrc file set up as per the xymon man page, still
not sure if the "Mailbox" is a directory or file. and the
directory structure of the xymon home directory looks like this.
drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox
-rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log
-rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc
This feature is one of the most important to the company I work for
and have been trying to get it to work for a couple of days now. We
even added an MX record for the server so mail can be delivered to
it directly. Telnet works locally and remote.
Any recommendations would be greatly appreciated, you have all been
a huge help so far and this monitoring tool has done wonders for
this company.
On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman
<user-71895fb2e44c@xymon.invalid <mailto:user-71895fb2e44c@xymon.invalid>>
▸
wrote:
On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>> wrote:
I am using Centos 6.2
By default Centos (aka Red Hat) v6 boxes run postfix (rather than
Sendmail).
During my install I do not remember installing anything as the
mail transport, but the alerting was working right out of the box
from day one.
Initially, postfix is configured so it won't accept SMTP
connections from off the box. So outbound emails will get sent OK,
but incoming emails will not get delivered to the Xymon server.
Test this by attempting to telnet to the Xymon server on port 25
from another device, such as a Windows PC, with "telnetxymon.server.name <http://xymon.server.name>; 25". If you get a
▸
"connection refused" or similar message, than you need to
reconfigure Postfix to accept remote connections.
I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point.
Probably not. Have a look at the "STANDARD_CONFIGURATION_README"
file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section.
J
- -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/
iEYEARECAAYFAlBrOrkACgkQmb+gadEcsb7uegCeNo6Nk91cczZMee5TWkRzdEF6
/hMAn0HZrjiolCwQnWrkHAacw72sXCm+
=PD3/
-----END PGP SIGNATURE-----
list Paul Root
Well, the procmail setup can filter out mail bounces and such, and also parse to only accept mail from people in a given list. You could do that in your own script as well I suppose, but why reinvent the wheel.
▸
Paul Root - Senior Engineer
Managed Services Systems - CenturyLink
-----Original Message----- From: Novosielski, Ryan [mailto:user-ae4522577e16@xymon.invalid] Sent: Tuesday, October 02, 2012 2:04 PM To: Root, Paul Cc: 'Ray Reuter'; Jeremy Laidman; xymon at xymon.com Subject: Re: [Xymon] xymon-mailack -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there any particular reason to use procmail at all, especially if you don't use this e-mail address to receive any other type of mail? I just use .forward. On 10/02/2012 03:02 PM, Root, Paul wrote:Do you have the procmail hooks in the postfix config files? If not, do you have your .forward setup to send stuff to procmail? Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 1:57 PM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon] xymon-mailack The server is accepting emails, the /var/mail/xymon has all of the responses I have sent back via the alerts, but they never seem to make it to the.procmailrc script or the Mailbox and nothing is logging in the procmail.log. On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: What's your procmail log file say. Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012 11:47 AM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com <mailto:xymon at xymon.com> *Subject:* Re: [Xymon] xymon-mailack okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas? Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com <http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9:
message- id=<user-6959ae01ec8c@xymon.invalid
▸
Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid <mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid <mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf <http://main.cf>; and at least set the 'myhostname' variable to the fqdn for your host? Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012 10:30 AM *To:* Jeremy Laidman *Cc:* Ryan Novosielski; xymon at xymon.com <mailto:xymon at xymon.com>; Root, Paul *Subject:* Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com <http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com <http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com <http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com <http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com <http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid <mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid <mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid <mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name <http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J- -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBrOrkACgkQmb+gadEcsb7uegCeNo6Nk91cczZMee5TWkRzdEF6 /hMAn0HZrjiolCwQnWrkHAacw72sXCm+ =PD3/ -----END PGP SIGNATURE-----
list Ralph Mitchell
Does anything need restarting for procmail changes to take effect?
▸
Ralph
On Tue, Oct 2, 2012 at 3:20 PM, Root, Paul <user-76fdb6883669@xymon.invalid>wrote:
Well, the procmail setup can filter out mail bounces and such, and also parse to only accept mail from people in a given list. You could do that in your own script as well I suppose, but why reinvent the wheel. Paul Root - Senior Engineer Managed Services Systems - CenturyLink-----Original Message----- From: Novosielski, Ryan [mailto:user-ae4522577e16@xymon.invalid] Sent: Tuesday, October 02, 2012 2:04 PM To: Root, Paul Cc: 'Ray Reuter'; Jeremy Laidman; xymon at xymon.com Subject: Re: [Xymon] xymon-mailack -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there any particular reason to use procmail at all, especially if you don't use this e-mail address to receive any other type of mail? I just use .forward. On 10/02/2012 03:02 PM, Root, Paul wrote:Do you have the procmail hooks in the postfix config files? If not, do you have your .forward setup to send stuff to procmail? Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 1:57 PM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon] xymon-mailack The server is accepting emails, the /var/mail/xymon has all of the responses I have sent back via the alerts, but they never seem to make it to the.procmailrc script or the Mailbox and nothing is logging in the procmail.log. On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: What's your procmail log file say. Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012 11:47 AM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com <mailto:xymon at xymon.com> *Subject:* Re: [Xymon] xymon-mailack okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas? Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com <http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message- id=<user-6959ae01ec8c@xymon.invalid Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid <mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid <mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf <http://main.cf>; and at least set the 'myhostname' variable to the fqdn for your host? Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012 10:30 AM *To:* Jeremy Laidman *Cc:* Ryan Novosielski; xymon at xymon.com <mailto:xymon at xymon.com>; Root, Paul *Subject:* Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com <http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com <http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com <http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com <http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com <http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid <mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid <mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid <mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name <http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J- -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBrOrkACgkQmb+gadEcsb7uegCeNo6Nk91cczZMee5TWkRzdEF6 /hMAn0HZrjiolCwQnWrkHAacw72sXCm+ =PD3/ -----END PGP SIGNATURE-----
list Ray Reuter
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
list Ralph Mitchell
I've never used xymon-mailack, but I have used pipe-via-alias working for email delivery of status reports. However, I just took a look at the man page for xymon-mailack, and it seems likely that that alias can use the exact same pipeline as given for both procmail and qmail: | /home/xymon/server/bin/xymon-mailack .......
▸
Ralph Mitchell
On Tue, Oct 2, 2012 at 3:44 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
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
list Ray Reuter
I have the line now looking like this. xymon: "| $HOME/server/bin/xymon-mailack --env=$HOME/server/etc/xymonserver.cfg" Mail does not seem to be processed by this either. The mail never makes it to the Mailbox/new directory though so now I am not sure where the email is going;
▸
On Tue, Oct 2, 2012 at 4:15 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
I've never used xymon-mailack, but I have used pipe-via-alias working for email delivery of status reports. However, I just took a look at the man page for xymon-mailack, and it seems likely that that alias can use the exact same pipeline as given for both procmail and qmail: | /home/xymon/server/bin/xymon-mailack ....... Ralph Mitchell On Tue, Oct 2, 2012 at 3:44 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote: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
list Ralph Mitchell
Trying changing $HOME to the actual location of the xymon home. Ralph Mitchell
▸
On Oct 2, 2012 7:25 PM, "Ray Reuter" <user-9df4e3e828ec@xymon.invalid> wrote:
I have the line now looking like this. xymon: "| $HOME/server/bin/xymon-mailack --env=$HOME/server/etc/xymonserver.cfg" Mail does not seem to be processed by this either. The mail never makes it to the Mailbox/new directory though so now I am not sure where the email is going; On Tue, Oct 2, 2012 at 4:15 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:I've never used xymon-mailack, but I have used pipe-via-alias working for email delivery of status reports. However, I just took a look at the man page for xymon-mailack, and it seems likely that that alias can use the exact same pipeline as given for both procmail and qmail: | /home/xymon/server/bin/xymon-mailack ....... Ralph Mitchell On Tue, Oct 2, 2012 at 3:44 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote: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
list Ray Reuter
Here is an update, with everyone's help I was able to receive mail, then I was able to put the hooks in to main.cf for postfix to have it create the Mailbox directory with the /new /cur and /tmp directories. New mail is delivered to the new directory. But still bypasses the .prcmailrc file. So I can respond to the alerts but still not being parsed and acknowledged. I am feeling confident it is a something simple but I am just missing it. You have all been great and hopefully someone may realize what I am missing. I can send along whatever is needed to help find my missing piece. Thanks again
▸
On Tue, Oct 2, 2012 at 3:20 PM, Root, Paul <user-76fdb6883669@xymon.invalid>wrote:
Well, the procmail setup can filter out mail bounces and such, and also parse to only accept mail from people in a given list. You could do that in your own script as well I suppose, but why reinvent the wheel. Paul Root - Senior Engineer Managed Services Systems - CenturyLink-----Original Message----- From: Novosielski, Ryan [mailto:user-ae4522577e16@xymon.invalid] Sent: Tuesday, October 02, 2012 2:04 PM To: Root, Paul Cc: 'Ray Reuter'; Jeremy Laidman; xymon at xymon.com Subject: Re: [Xymon] xymon-mailack -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Is there any particular reason to use procmail at all, especially if you don't use this e-mail address to receive any other type of mail? I just use .forward. On 10/02/2012 03:02 PM, Root, Paul wrote:Do you have the procmail hooks in the postfix config files? If not, do you have your .forward setup to send stuff to procmail? Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid] *Sent:* Tuesday, October 02, 2012 1:57 PM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com *Subject:* Re: [Xymon] xymon-mailack The server is accepting emails, the /var/mail/xymon has all of the responses I have sent back via the alerts, but they never seem to make it to the.procmailrc script or the Mailbox and nothing is logging in the procmail.log. On Tue, Oct 2, 2012 at 1:05 PM, Root, Paul <user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: What's your procmail log file say. Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012 11:47 AM *To:* Root, Paul *Cc:* Jeremy Laidman; Ryan Novosielski; xymon at xymon.com <mailto:xymon at xymon.com> *Subject:* Re: [Xymon] xymon-mailack okay made a lot of progress now. It arrived at the server but never seems to either get parsed by the .procmail in the xymon home directory or not being processed correctly. Any ideas? Oct 2 12:33:31 localhost postfix/smtpd[31084]: connect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/smtpd[31084]: 4F53752F9: client=domain.domin.com <http://domain.domin.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/cleanup[31021]: 4F53752F9: message- id=<user-6959ae01ec8c@xymon.invalid Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: from=<user-a879addf7dd0@xymon.invalid <mailto:user-a879addf7dd0@xymon.invalid>>, size=1859, nrcpt=1 (queue active) Oct 2 12:33:31 localhost postfix/smtpd[31084]: disconnect from domain.domain.com <http://domain.domain.com>[10.1.5.176] Oct 2 12:33:31 localhost postfix/local[31089]: 4F53752F9: to=<user-124f4840851c@xymon.invalid <mailto:user-124f4840851c@xymon.invalid>>, relay=local, delay=0.02, delays=0/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to mailbox) Oct 2 12:33:31 localhost postfix/qmgr[29282]: 4F53752F9: removed On Tue, Oct 2, 2012 at 11:48 AM, Root, Paul <user-76fdb6883669@xymon.invalid <mailto:user-76fdb6883669@xymon.invalid>> wrote: That error is postfix tell you it can't deliver. Did you edit /etc/postfix/main.cf <http://main.cf>; and at least set the 'myhostname' variable to the fqdn for your host? Paul Root - Senior Engineer Managed Services Systems - CenturyLink *From:*Ray Reuter [mailto:user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>] *Sent:* Tuesday, October 02, 2012 10:30 AM *To:* Jeremy Laidman *Cc:* Ryan Novosielski; xymon at xymon.com <mailto:xymon at xymon.com>; Root, Paul *Subject:* Re: [Xymon] xymon-mailack Well we are getting closer. I am now able to telnet to the server. I tried to send mail to the server but kicked off every time i try to do the subject line. [root at xxxcacti2 ~]# telnet XXXXXXXX.xxx.com <http://XXXXXXXX.xxx.com>; 25 Trying 10.1.72.168... Connected to XXXXXXXXX.xxx.com <http://XXXXXXXXX.xxx.com>; (xx.xx.x.x). Escape character is '^]'. 220 XXXXXXXXX.lvh.com <http://XXXXXXXXX.lvh.com>; ESMTP Postfix helo XXXXXXXXXX.lvh.com <http://XXXXXXXXXX.lvh.com>; 250 XXXXXXX.lvh.com <http://XXXXXXX.lvh.com>; MAIL FROM: user-e6b56f093673@xymon.invalid <mailto:user-e6b56f093673@xymon.invalid> 250 2.1.0 Ok RCPT TO: user-238b11cbd81e@xymon.invalid <mailto:user-238b11cbd81e@xymon.invalid> 250 2.1.5 Ok "SUBJECT: Xymon" 221 2.7.0 Error: I can break rules, too. Goodbye. Connection closed by foreign host. I have the .procmailrc file set up as per the xymon man page, still not sure if the "Mailbox" is a directory or file. and the directory structure of the xymon home directory looks like this. drwxr-xr-x. 2 xymon xymon 4096 Oct 2 11:02 Mailbox -rw-r--r--. 1 xymon xymon 0 Oct 1 12:15 procmail.log -rwxr-xr-x. 1 xymon xymon 124 Oct 2 11:04 .procmailrc This feature is one of the most important to the company I work for and have been trying to get it to work for a couple of days now. We even added an MX record for the server so mail can be delivered to it directly. Telnet works locally and remote. Any recommendations would be greatly appreciated, you have all been a huge help so far and this monitoring tool has done wonders for this company. On Tue, Oct 2, 2012 at 1:58 AM, Jeremy Laidman <user-71895fb2e44c@xymon.invalid <mailto:user-71895fb2e44c@xymon.invalid>> wrote: On 2 October 2012 02:46, Ray Reuter <user-9df4e3e828ec@xymon.invalid <mailto:user-9df4e3e828ec@xymon.invalid>> wrote: I am using Centos 6.2 By default Centos (aka Red Hat) v6 boxes run postfix (rather than Sendmail). During my install I do not remember installing anything as the mail transport, but the alerting was working right out of the box from day one. Initially, postfix is configured so it won't accept SMTP connections from off the box. So outbound emails will get sent OK, but incoming emails will not get delivered to the Xymon server. Test this by attempting to telnet to the Xymon server on port 25 from another device, such as a Windows PC, with "telnet xymon.server.name <http://xymon.server.name>; 25". If you get a "connection refused" or similar message, than you need to reconfigure Postfix to accept remote connections. I followed the man page for the mailack and created everything as per the instructions, but I am not even sure the mail is reaching the server at this point. Probably not. Have a look at the "STANDARD_CONFIGURATION_README" file that came with Postfix for instructions on setting things up, particularly the "Postfix on a local network" section. J- -- - ---- _ _ _ _ ___ _ _ _ |Y#| | | |\/| | \ |\ | | |Ryan Novosielski - Sr. Systems Programmer |$&| |__| | | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922) \__/ Univ. of Med. and Dent.|IST/EI-Academic Svcs. - ADMC 450, Newark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlBrOrkACgkQmb+gadEcsb7uegCeNo6Nk91cczZMee5TWkRzdEF6 /hMAn0HZrjiolCwQnWrkHAacw72sXCm+ =PD3/ -----END PGP SIGNATURE-----
list Ray Reuter
Ralph, thank you so much. That worked and it actually parsed the incoming email to the script and it displayed the information to the system. I want to thank everyone for being so patient with me and my limited skill set in the Linux world.
▸
On Tue, Oct 2, 2012 at 7:27 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:
Trying changing $HOME to the actual location of the xymon home. Ralph Mitchell On Oct 2, 2012 7:25 PM, "Ray Reuter" <user-9df4e3e828ec@xymon.invalid> wrote:I have the line now looking like this. xymon: "| $HOME/server/bin/xymon-mailack --env=$HOME/server/etc/xymonserver.cfg" Mail does not seem to be processed by this either. The mail never makes it to the Mailbox/new directory though so now I am not sure where the email is going; On Tue, Oct 2, 2012 at 4:15 PM, Ralph Mitchell <user-00a5e44c48c0@xymon.invalid>wrote:I've never used xymon-mailack, but I have used pipe-via-alias working for email delivery of status reports. However, I just took a look at the man page for xymon-mailack, and it seems likely that that alias can use the exact same pipeline as given for both procmail and qmail: | /home/xymon/server/bin/xymon-mailack ....... Ralph Mitchell On Tue, Oct 2, 2012 at 3:44 PM, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote: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
list Jeremy Laidman
▸
On 3 October 2012 09:30, Ray Reuter <user-9df4e3e828ec@xymon.invalid> wrote:
I am feeling confident it is a something simple but I am just missing it. You have all been great and hopefully someone may realize what I am missing.
Postfix doesn't run procmail by default, and instead delivers directly to a
mailbox. So procmail needs to be enabled for .procmailrc to be used. Do
this by setting mailbox_command to /usr/bin/procmail (in main.cf) and
reloading postfix.
You might be able to get this to work per-user (and without changing
postfix) by creating a .forward file containing a suitable pipe command, as
shown in the procmail man page:
"|IFS=' '&&p=/usr/bin/procmail&&test -f $p&&exec $p -Yf-||exit 75
#YOUR_USERNAME"
J