Re: Test e-mailservice

2009-11-11 Thread Eero Volotinen

Cameron Smith wrote:


Fixed!

The solution was to set in the mail servers:
relayhost = your.server.com 

All the instructions when setting up behind a firewall seemed to say 
leave that at relayhost =  but adding my gateway IP makes it work so I 
am happy :)


Yes, that is the way. It is also wise only allow direct smtp connections 
from your gateway (block connections to tcp/25 on main firewall) to 
prevent smtp zombies and spammers.


--
Eero,
RHCE


Re: Test e-mailservice

2009-11-11 Thread Cameron Smith
On Wed, Nov 11, 2009 at 2:29 PM, Eero Volotinen wrote:

> Phillip Smith wrote:
>
>> 2009/11/12 Michael Saldivar :
>>
>>> I use the open-source monitoring tool http://www.nagios.org/ combined
>>> with
>>> NRPE to monitor all my servers and services.
>>>
>>
>> +1
>>
>> NRPE allows you to connect to the system being monitored, and execute
>> any command on the local system, returning the result to the Nagios
>> server. In your case, you could either check for TCP connectivity on
>> 127.0.0.1:10024 or use the check_procs plugin to see if the process is
>> running -- or both.
>>
>
> This page also contains nice trick to check server against rbl list:
>
> http://www.linuxjournal.com/content/monitoring-email-nagios
>
> It is also possible to use snmp to monitor, restart or execute (snmp exec /
> procfix) commands on remote system:
>
> http://www.logix.cz/michal/devel/nagios/ and
> http://www.packetmischief.ca/network/monitoring/postfix/#snmp
>
> --
> Eero
>


Fixed!

The solution was to set in the mail servers:
relayhost = your.server.com

All the instructions when setting up behind a firewall seemed to say leave
that at relayhost =  but adding my gateway IP makes it work so I am happy :)

Thanks!
Cameron


Re: Test e-mailservice

2009-11-11 Thread Eero Volotinen

Phillip Smith wrote:

2009/11/12 Michael Saldivar :

I use the open-source monitoring tool http://www.nagios.org/ combined with
NRPE to monitor all my servers and services.


+1

NRPE allows you to connect to the system being monitored, and execute
any command on the local system, returning the result to the Nagios
server. In your case, you could either check for TCP connectivity on
127.0.0.1:10024 or use the check_procs plugin to see if the process is
running -- or both.


This page also contains nice trick to check server against rbl list:

http://www.linuxjournal.com/content/monitoring-email-nagios

It is also possible to use snmp to monitor, restart or execute (snmp 
exec / procfix) commands on remote system:


http://www.logix.cz/michal/devel/nagios/ and
http://www.packetmischief.ca/network/monitoring/postfix/#snmp

--
Eero


Re: Test e-mailservice

2009-11-11 Thread Phillip Smith
2009/11/12 Michael Saldivar :
> I use the open-source monitoring tool http://www.nagios.org/ combined with
> NRPE to monitor all my servers and services.

+1

NRPE allows you to connect to the system being monitored, and execute
any command on the local system, returning the result to the Nagios
server. In your case, you could either check for TCP connectivity on
127.0.0.1:10024 or use the check_procs plugin to see if the process is
running -- or both.

If firewalls etc prevent you configuring the Monitoring server
connecting to the Mail Server to initiate NRPE checks, then you can
use NSCA which is basically the same thing, except the machine being
monitored is responsible for checking the status, and sending
notifications to the monitoring server ("passive checks").


Re: Test e-mailservice

2009-11-11 Thread Michael Saldivar
On Wed, Nov 11, 2009 at 1:54 AM, Martijn de Munnik wrote:

> Hi,
>
> Of course I don't want this to happen again in the future. How do people
> test their mail server periodically? So far we use webmin which tries to
> connect to port 25, 110 and 143 and checks if the greeting is correct. If
> one of these connections fail we get a phone call. I can't check services
> which are only running on localhost because webmin is checking from a
> remote host.
>
> Thanks,
> Martijn
>


>


I use the open-source monitoring tool http://www.nagios.org/ combined with
NRPE to monitor all my servers and services.

-- 
Mike Saldivar
Direct Financial Solutions
Information Systems Manager
Desk: 435-774-8252
Cell: 435-881-3778


RE: Test e-mailservice

2009-11-11 Thread Martijn de Munnik
On Wed, 11 Nov 2009 12:17:01 +0100, Peter Sørensen  wrote:
> Hi Martin,
> 
> I will do that. I probably have to do a little bit of cleanup/docs
before
> I send it. Will do that in the next couple of days. Hope this is OK for
> you.

Sure that's fine with me.

Thank you very much!
> 
> Best regards
> 
> Peter
>   
>   
> 
> -Original Message-
> From: owner-postfix-us...@postfix.org
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Martijn de Munnik
> Sent: 11. november 2009 11:31
> To: Peter Sørensen
> Cc: postfix-users@postfix.org
> Subject: RE: Test e-mailservice
> 
> Hi Peter,
> 
> On Wed, 11 Nov 2009 10:08:34 +0100, Peter Sørensen 
wrote:
>> Hi,
>> 
>> We have a server outside Our network which will send an mail every 5
>> minutes to
>> a specific mailbox on Our exchange system. This has a limit on 0 which
>> means that
>> it will bounce the mail back to the sender. 
>> 
>> We use this to document a baseline. 
>> 
>> When sending we generate a Uniq Message-id - save this in a Database
>> (MySql) along with the
>> timestamp. When the bounced mail get back we grap the Message-id and
>> timeinfo and all this 
>> is saved in the DB. 
> 
> Could you make this script public, it sounds very helpful to me. I would
> like to test it and maybe extend it with pop and imap checks too.
>> 
>> You could use this info test if mailloop is to long.
>> 
>> Best regards
>> 
>> Peter Sørensen
>> 
>> Phone.6550 2858
>> Fax 6550 2860
>> mail   mas...@sdu.dk
>> Web http://intern.sdu.dk/it-service/ansatte/ps-238/
>> Adr.Campusvej 55, 5230 Odense M
>> 
>> University of Southern Denmark
>> ___
>> Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk
>>          
>>  
>> -Original Message-
>> From: owner-postfix-us...@postfix.org
>> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Martijn de Munnik
>> Sent: 11. november 2009 09:54
>> To: postfix-users@postfix.org
>> Subject: Test e-mailservice
>> 
>> Hi,
>> 
>> Last night we had a issue with our mail server which went unnoticed
till
>> this morning. Our spam filter crashed and postfix couldn't feed mails
> for
>> check to localhost:10024. The mails stayed in the queue till we noticed
>> that we didn't received any mail this morning. I restarted the spam
> filter
>> and now the queue is being processed.
>> Of course I don't want this to happen again in the future. How do
people
>> test their mail server periodically? So far we use webmin which tries
to
>> connect to port 25, 110 and 143 and checks if the greeting is correct.
> If
>> one of these connections fail we get a phone call. I can't check
> services
>> which are only running on localhost because webmin is checking from a
>> remote host. Does anybody use a check which checks the complete mail
> loop?
>> I was thinking of sending a mail from a remote host (with webmin) to a
> test
>> mail account and see if I can download the mail with imap and then with
> pop
>> which removes the mail. The test mail account should also send a reply
> to
>> the original sender (maybe explaining it's a test address) and the test
>> server should also check for this reply.
>> Does anybody have such a test setup?
>> 
>> Thanks,
>> Martijn

-- 
YoungGuns
Kasteleinenkampweg 7b
5222 AX 's-Hertogenbosch
T. 073 623 56 40
F. 073 623 56 39
www.youngguns.nl
KvK 18076568


RE: Test e-mailservice

2009-11-11 Thread Peter Sørensen
Hi Martin,

I will do that. I probably have to do a little bit of cleanup/docs before
I send it. Will do that in the next couple of days. Hope this is OK for you.

Best regards

Peter



-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Martijn de Munnik
Sent: 11. november 2009 11:31
To: Peter Sørensen
Cc: postfix-users@postfix.org
Subject: RE: Test e-mailservice

Hi Peter,

On Wed, 11 Nov 2009 10:08:34 +0100, Peter Sørensen  wrote:
> Hi,
> 
> We have a server outside Our network which will send an mail every 5
> minutes to
> a specific mailbox on Our exchange system. This has a limit on 0 which
> means that
> it will bounce the mail back to the sender. 
> 
> We use this to document a baseline. 
> 
> When sending we generate a Uniq Message-id - save this in a Database
> (MySql) along with the
> timestamp. When the bounced mail get back we grap the Message-id and
> timeinfo and all this 
> is saved in the DB. 

Could you make this script public, it sounds very helpful to me. I would
like to test it and maybe extend it with pop and imap checks too.
> 
> You could use this info test if mailloop is to long.
> 
> Best regards
> 
> Peter Sørensen
> 
> Phone.6550 2858
> Fax 6550 2860
> mail   mas...@sdu.dk
> Web http://intern.sdu.dk/it-service/ansatte/ps-238/
> Adr.Campusvej 55, 5230 Odense M
> 
> University of Southern Denmark
> ___
> Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk
>   
>   
> -Original Message-
> From: owner-postfix-us...@postfix.org
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Martijn de Munnik
> Sent: 11. november 2009 09:54
> To: postfix-users@postfix.org
> Subject: Test e-mailservice
> 
> Hi,
> 
> Last night we had a issue with our mail server which went unnoticed till
> this morning. Our spam filter crashed and postfix couldn't feed mails
for
> check to localhost:10024. The mails stayed in the queue till we noticed
> that we didn't received any mail this morning. I restarted the spam
filter
> and now the queue is being processed.
> Of course I don't want this to happen again in the future. How do people
> test their mail server periodically? So far we use webmin which tries to
> connect to port 25, 110 and 143 and checks if the greeting is correct.
If
> one of these connections fail we get a phone call. I can't check
services
> which are only running on localhost because webmin is checking from a
> remote host. Does anybody use a check which checks the complete mail
loop?
> I was thinking of sending a mail from a remote host (with webmin) to a
test
> mail account and see if I can download the mail with imap and then with
pop
> which removes the mail. The test mail account should also send a reply
to
> the original sender (maybe explaining it's a test address) and the test
> server should also check for this reply.
> Does anybody have such a test setup?
> 
> Thanks,
> Martijn

-- 
YoungGuns
Kasteleinenkampweg 7b
5222 AX 's-Hertogenbosch
T. 073 623 56 40
F. 073 623 56 39
www.youngguns.nl
KvK 18076568


RE: Test e-mailservice

2009-11-11 Thread Martijn de Munnik
Hi Peter,

On Wed, 11 Nov 2009 10:08:34 +0100, Peter Sørensen  wrote:
> Hi,
> 
> We have a server outside Our network which will send an mail every 5
> minutes to
> a specific mailbox on Our exchange system. This has a limit on 0 which
> means that
> it will bounce the mail back to the sender. 
> 
> We use this to document a baseline. 
> 
> When sending we generate a Uniq Message-id - save this in a Database
> (MySql) along with the
> timestamp. When the bounced mail get back we grap the Message-id and
> timeinfo and all this 
> is saved in the DB. 

Could you make this script public, it sounds very helpful to me. I would
like to test it and maybe extend it with pop and imap checks too.
> 
> You could use this info test if mailloop is to long.
> 
> Best regards
> 
> Peter Sørensen
> 
> Phone.6550 2858
> Fax 6550 2860
> mail   mas...@sdu.dk
> Web http://intern.sdu.dk/it-service/ansatte/ps-238/
> Adr.Campusvej 55, 5230 Odense M
> 
> University of Southern Denmark
> ___
> Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk
>   
>   
> -Original Message-
> From: owner-postfix-us...@postfix.org
> [mailto:owner-postfix-us...@postfix.org] On Behalf Of Martijn de Munnik
> Sent: 11. november 2009 09:54
> To: postfix-users@postfix.org
> Subject: Test e-mailservice
> 
> Hi,
> 
> Last night we had a issue with our mail server which went unnoticed till
> this morning. Our spam filter crashed and postfix couldn't feed mails
for
> check to localhost:10024. The mails stayed in the queue till we noticed
> that we didn't received any mail this morning. I restarted the spam
filter
> and now the queue is being processed.
> Of course I don't want this to happen again in the future. How do people
> test their mail server periodically? So far we use webmin which tries to
> connect to port 25, 110 and 143 and checks if the greeting is correct.
If
> one of these connections fail we get a phone call. I can't check
services
> which are only running on localhost because webmin is checking from a
> remote host. Does anybody use a check which checks the complete mail
loop?
> I was thinking of sending a mail from a remote host (with webmin) to a
test
> mail account and see if I can download the mail with imap and then with
pop
> which removes the mail. The test mail account should also send a reply
to
> the original sender (maybe explaining it's a test address) and the test
> server should also check for this reply.
> Does anybody have such a test setup?
> 
> Thanks,
> Martijn

-- 
YoungGuns
Kasteleinenkampweg 7b
5222 AX 's-Hertogenbosch
T. 073 623 56 40
F. 073 623 56 39
www.youngguns.nl
KvK 18076568


Re: Test e-mailservice

2009-11-11 Thread Barney Desmond
2009/11/11 Martijn de Munnik :
> remote host. Does anybody use a check which checks the complete mail loop?
> I was thinking of sending a mail from a remote host (with webmin) to a test
> mail account and see if I can download the mail with imap and then with pop
> which removes the mail. The test mail account should also send a reply to
> the original sender (maybe explaining it's a test address) and the test
> server should also check for this reply.

This sounds a little elaborate to me, actually polling the mailbox via
pop/imap, but it's comprehensive if nothing else. I should note that I
only touch webmin very rarely; I find it curious that it'd have some
sort of testing/probing functionality built in. Seeing as it's an
administration tool, I suspect it's not the best tool for the job (but
hey, if it's already there and it works, stay with it).

We don't have an end-to-end monitoring setup, but I can think of
something that should work. We use Nagios, which is free and flexible
(but it can get a bit complex, and there's a learning curve). We have
checks on a few points:
* connect to the port and check the banner
* check the length of the mailqueue on the machine

This works well for us and catches most problems, but it wouldn't
quite work for your scenario which is end-to-end latency-sensitive. I
can think of something that would probably work with Nagios though:
1. inject an email periodically, directed to a special testing address
(say, every 5min, via cron)
2. this should pass through the rest of the system like regular mail
3. at the "end" of the mail flow, pass the mail through a script
(piping the mail out from /etc/aliases would do the job)
4. the script submits a "passive" check result to nagios (NSCA). this
could be as simple as simply "freshing" the check, or you could
analyse the headers for timestamps and look for a delay.
4a. you could turn this into an "active" check by having the script
touch a file, then use an NRPE check to alert people if the file is
too old.


RE: Test e-mailservice

2009-11-11 Thread Peter Sørensen
Hi,

We have a server outside Our network which will send an mail every 5 minutes to
a specific mailbox on Our exchange system. This has a limit on 0 which means 
that
it will bounce the mail back to the sender. 

We use this to document a baseline. 

When sending we generate a Uniq Message-id - save this in a Database (MySql) 
along with the
timestamp. When the bounced mail get back we grap the Message-id and timeinfo 
and all this 
is saved in the DB. 

You could use this info test if mailloop is to long.

Best regards

Peter Sørensen

Phone.6550 2858
Fax 6550 2860
mail   mas...@sdu.dk
Web http://intern.sdu.dk/it-service/ansatte/ps-238/
Adr.Campusvej 55, 5230 Odense M

University of Southern Denmark
___
Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk


-Original Message-
From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
On Behalf Of Martijn de Munnik
Sent: 11. november 2009 09:54
To: postfix-users@postfix.org
Subject: Test e-mailservice

Hi,

Last night we had a issue with our mail server which went unnoticed till
this morning. Our spam filter crashed and postfix couldn't feed mails for
check to localhost:10024. The mails stayed in the queue till we noticed
that we didn't received any mail this morning. I restarted the spam filter
and now the queue is being processed.
Of course I don't want this to happen again in the future. How do people
test their mail server periodically? So far we use webmin which tries to
connect to port 25, 110 and 143 and checks if the greeting is correct. If
one of these connections fail we get a phone call. I can't check services
which are only running on localhost because webmin is checking from a
remote host. Does anybody use a check which checks the complete mail loop?
I was thinking of sending a mail from a remote host (with webmin) to a test
mail account and see if I can download the mail with imap and then with pop
which removes the mail. The test mail account should also send a reply to
the original sender (maybe explaining it's a test address) and the test
server should also check for this reply.
Does anybody have such a test setup?

Thanks,
Martijn

-- 
YoungGuns
Kasteleinenkampweg 7b
5222 AX 's-Hertogenbosch
T. 073 623 56 40
F. 073 623 56 39
www.youngguns.nl
KvK 18076568


RE: Test e-mailservice

2009-11-11 Thread Kammen van, Marco, Springer SBM NL

>-Original Message-
>From: owner-postfix-us...@postfix.org [mailto:owner-postfix-us...@postfix.org] 
>On Behalf Of Martijn de Munnik
>Sent: Wednesday, November 11, 2009 9:54 AM
>To: postfix-users@postfix.org
>Subject: Test e-mailservice
>
>Does anybody have such a test setup?
>
>Thanks,
>Martijn

There are expensive commercial tools available to do that.
We use MOM/SCOM/Spectrum/Ehealth to monitor mail flows and services.

You can also write your own monitoring scripts in your favourite 
programming/scripting languague...
I can send you a simple perl script that monitors postfix services and does 
some connectivity tests, if you like.

Marco.  



Test e-mailservice

2009-11-11 Thread Martijn de Munnik
Hi,

Last night we had a issue with our mail server which went unnoticed till
this morning. Our spam filter crashed and postfix couldn't feed mails for
check to localhost:10024. The mails stayed in the queue till we noticed
that we didn't received any mail this morning. I restarted the spam filter
and now the queue is being processed.
Of course I don't want this to happen again in the future. How do people
test their mail server periodically? So far we use webmin which tries to
connect to port 25, 110 and 143 and checks if the greeting is correct. If
one of these connections fail we get a phone call. I can't check services
which are only running on localhost because webmin is checking from a
remote host. Does anybody use a check which checks the complete mail loop?
I was thinking of sending a mail from a remote host (with webmin) to a test
mail account and see if I can download the mail with imap and then with pop
which removes the mail. The test mail account should also send a reply to
the original sender (maybe explaining it's a test address) and the test
server should also check for this reply.
Does anybody have such a test setup?

Thanks,
Martijn

-- 
YoungGuns
Kasteleinenkampweg 7b
5222 AX 's-Hertogenbosch
T. 073 623 56 40
F. 073 623 56 39
www.youngguns.nl
KvK 18076568