Re: Mailer does not work
It looks to me as if the dot is send in the wrong place. Attached patch would fix that. https://www.ietf.org/rfc/rfc2821.txt the character sequence "." ends the mail text. Could you guy's take a look? mlist schreef op 15-7-2015 om 14:23: At the end of each smtp session, we see a packet with Reset + Acknowledge nits set: tcp.flags = RST + ACK Roberto -Original Message- From: Baptiste [mailto:bed...@gmail.com] Sent: mercoledì 15 luglio 2015 12.01 To: mlist Cc: haproxy@formilux.org Subject: Re: Mailer does not work On Wed, Jul 15, 2015 at 9:48 AM, mlist wrote: We compiled from source haproxy-1.6-dev2.tar.gz. New Mailers mechanism does not seems to work, we configured as on manual: mailers apsmailer1 mailer smtp1 :10025 … … backend somebackend_https mode http balance roundrobin … email-alert mailers apsmailer1 email-alert from email-alert to email-alert level info … We see in haproxy.log server status change: Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is UP, reason: Layer4 check passed, check duration: 0ms. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is UP, reason: Layer6 check passed, check duration: 1ms. 2 active and 0 backup servers online. 0 sessions requeued, 0 total in queue. But no mail alerts are sent, no error or warning logged about sending mail. haproxy -f /etc/haproxy/haproxy.cfg –c does not return any error. All seems to be right, but mail alerts are not sent. Roberto Hi Roberto, Could you please take a tcpdump on port 10025 and confirm HAProxy tries to get connected to the SMTP server? Baptiste From ba3e1593b313752e0a3ff54aae06b18ba17c1435 Mon Sep 17 00:00:00 2001 From: Pieter Baauw Date: Thu, 16 Jul 2015 22:38:19 +0200 Subject: [PATCH] mailer, DATA part must be terminated with CRLF.CRLF --- src/checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks.c b/src/checks.c index 2179d4f..e386bee 100644 --- a/src/checks.c +++ b/src/checks.c @@ -3243,8 +3243,8 @@ static int enqueue_one_email_alert(struct email_alertq *q, const char *msg) "Subject: [HAproxy Alert] ", msg, "\n", "\n", msg, "\n", - ".\r\n", "\r\n", + ".\r\n", NULL }; -- 1.9.5.msysgit.1
Re: Mailer does not work
unsubscribe 2015-07-15 9:17 GMT-03:00 mlist : > We take a tcpdump. Following the tcp traffic we can see each step. > Reproducing manually the mail was sent. Probably HAProxy SMTP communication > has an error on the final stage . as of that all goes right. > > Follows manual communication with mmail server reproducing tpcdump smto > command seguence. > EHLO smtp1 > 250-MAIL1 Hello [192.168.1.x] > 250-SIZE 10485760 > 250-PIPELINING > 250-DSN > 250-ENHANCEDSTATUSCODES > 250-STARTTLS > 250-AUTH > 250-8BITMIME > 250-XEXCH50 > 250 XSHADOW > MAIL FROM: > 250 2.1.0 Sender OK > RCPT TO: > 250 2.1.5 Recipient OK > DATA > 354 Start mail input; end with . > From: loadbha1@domain > To: alerts@domain > Date: Wed, 15 Jul 2015 12:50:48 +0200 (CEST) > Subject: [HAproxy Alert] Server /webhost1 is DOWN, reason: Layer4 > timeout, check duration: 5002ms. 1 active and 0 backup servers left. 0 > sessions active, 0 requeued, 0 remaining in queue > > Server /webhost1 is DOWN, reason: Layer4 timeout, check duration: > 5002ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, > 0 remaining in queue > . > 250 2.6.0 <7c4f8f74-8d6b-446e-a504-e7a45fc58baf@MAIL> [InternalId=293812] > Queued mail for delivery > > Entering manually all these commands we correctly receive the email. > > > Dr. Roberto Cazzato > Divisione ICT e Sicurezza > Senior IT Designer > gsm +39 348 22 00 850 > > A.P. SYSTEMS s.r.l. > 20013 Magenta (Milano) > Via Milano 89/91 (ang.Via Cimarosa) Italia - www.apsystems.it > tel. +39 02 97226.1 - fax 02 97226.339 > > > -Original Message- > From: Baptiste [mailto:bed...@gmail.com] > Sent: mercoledì 15 luglio 2015 12.01 > To: mlist > Cc: haproxy@formilux.org > Subject: Re: Mailer does not work > > On Wed, Jul 15, 2015 at 9:48 AM, mlist wrote: > > We compiled from source haproxy-1.6-dev2.tar.gz. New Mailers mechanism > does > > not seems to work, we configured as on manual: > > > > > > > > mailers apsmailer1 > > > >mailer smtp1 :10025 > > > > > > > > … > > > > … > > > > > > > > backend somebackend_https > > > >mode http > > > >balance roundrobin > > > >… > > > >email-alert mailers apsmailer1 > > > >email-alert from > > > >email-alert to > > > > email-alert level info > > > >… > > > > > > > > We see in haproxy.log server status change: > > > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ > is > > UP, reason: Layer4 check passed, check duration: 0ms. 2 active and 0 > backup > > servers online. 0 sessions requeued, 0 total in queue. > > > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ > is > > UP, reason: Layer6 check passed, check duration: 1ms. 2 active and 0 > backup > > servers online. 0 sessions requeued, 0 total in queue. > > > > > > > > But no mail alerts are sent, no error or warning logged about sending > mail. > > > > > > > > haproxy -f /etc/haproxy/haproxy.cfg –c > > > > does not return any error. All seems to be right, but mail alerts are not > > sent. > > > > > > Roberto > > > > Hi Roberto, > > Could you please take a tcpdump on port 10025 and confirm HAProxy > tries to get connected to the SMTP server? > > Baptiste > > -- > Il messaggio e' stato analizzato alla ricerca di virus o > contenuti pericolosi da MailScanner, ed e' > risultato non infetto. > > -- Atte Jorge Severino Numero movil Personal: 08-7775834
RE: Mailer does not work
At the end of each smtp session, we see a packet with Reset + Acknowledge nits set: tcp.flags = RST + ACK Roberto -Original Message- From: Baptiste [mailto:bed...@gmail.com] Sent: mercoledì 15 luglio 2015 12.01 To: mlist Cc: haproxy@formilux.org Subject: Re: Mailer does not work On Wed, Jul 15, 2015 at 9:48 AM, mlist wrote: > We compiled from source haproxy-1.6-dev2.tar.gz. New Mailers mechanism does > not seems to work, we configured as on manual: > > > > mailers apsmailer1 > >mailer smtp1 :10025 > > > > … > > … > > > > backend somebackend_https > >mode http > >balance roundrobin > >… > >email-alert mailers apsmailer1 > >email-alert from > >email-alert to > > email-alert level info > >… > > > > We see in haproxy.log server status change: > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is > UP, reason: Layer4 check passed, check duration: 0ms. 2 active and 0 backup > servers online. 0 sessions requeued, 0 total in queue. > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is > UP, reason: Layer6 check passed, check duration: 1ms. 2 active and 0 backup > servers online. 0 sessions requeued, 0 total in queue. > > > > But no mail alerts are sent, no error or warning logged about sending mail. > > > > haproxy -f /etc/haproxy/haproxy.cfg –c > > does not return any error. All seems to be right, but mail alerts are not > sent. > > > Roberto > Hi Roberto, Could you please take a tcpdump on port 10025 and confirm HAProxy tries to get connected to the SMTP server? Baptiste -- Il messaggio e' stato analizzato alla ricerca di virus o contenuti pericolosi da MailScanner, ed e' risultato non infetto.
RE: Mailer does not work
We take a tcpdump. Following the tcp traffic we can see each step. Reproducing manually the mail was sent. Probably HAProxy SMTP communication has an error on the final stage . as of that all goes right. Follows manual communication with mmail server reproducing tpcdump smto command seguence. EHLO smtp1 250-MAIL1 Hello [192.168.1.x] 250-SIZE 10485760 250-PIPELINING 250-DSN 250-ENHANCEDSTATUSCODES 250-STARTTLS 250-AUTH 250-8BITMIME 250-XEXCH50 250 XSHADOW MAIL FROM: 250 2.1.0 Sender OK RCPT TO: 250 2.1.5 Recipient OK DATA 354 Start mail input; end with . From: loadbha1@domain To: alerts@domain Date: Wed, 15 Jul 2015 12:50:48 +0200 (CEST) Subject: [HAproxy Alert] Server /webhost1 is DOWN, reason: Layer4 timeout, check duration: 5002ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue Server /webhost1 is DOWN, reason: Layer4 timeout, check duration: 5002ms. 1 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue . 250 2.6.0 <7c4f8f74-8d6b-446e-a504-e7a45fc58baf@MAIL> [InternalId=293812] Queued mail for delivery Entering manually all these commands we correctly receive the email. Dr. Roberto Cazzato Divisione ICT e Sicurezza Senior IT Designer gsm +39 348 22 00 850 A.P. SYSTEMS s.r.l. 20013 Magenta (Milano) Via Milano 89/91 (ang.Via Cimarosa) Italia - www.apsystems.it tel. +39 02 97226.1 - fax 02 97226.339 -Original Message- From: Baptiste [mailto:bed...@gmail.com] Sent: mercoledì 15 luglio 2015 12.01 To: mlist Cc: haproxy@formilux.org Subject: Re: Mailer does not work On Wed, Jul 15, 2015 at 9:48 AM, mlist wrote: > We compiled from source haproxy-1.6-dev2.tar.gz. New Mailers mechanism does > not seems to work, we configured as on manual: > > > > mailers apsmailer1 > >mailer smtp1 :10025 > > > > … > > … > > > > backend somebackend_https > >mode http > >balance roundrobin > >… > >email-alert mailers apsmailer1 > >email-alert from > >email-alert to > > email-alert level info > >… > > > > We see in haproxy.log server status change: > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is > UP, reason: Layer4 check passed, check duration: 0ms. 2 active and 0 backup > servers online. 0 sessions requeued, 0 total in queue. > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is > UP, reason: Layer6 check passed, check duration: 1ms. 2 active and 0 backup > servers online. 0 sessions requeued, 0 total in queue. > > > > But no mail alerts are sent, no error or warning logged about sending mail. > > > > haproxy -f /etc/haproxy/haproxy.cfg –c > > does not return any error. All seems to be right, but mail alerts are not > sent. > > > Roberto > Hi Roberto, Could you please take a tcpdump on port 10025 and confirm HAProxy tries to get connected to the SMTP server? Baptiste -- Il messaggio e' stato analizzato alla ricerca di virus o contenuti pericolosi da MailScanner, ed e' risultato non infetto.
Re: Mailer does not work
On Wed, Jul 15, 2015 at 9:48 AM, mlist wrote: > We compiled from source haproxy-1.6-dev2.tar.gz. New Mailers mechanism does > not seems to work, we configured as on manual: > > > > mailers apsmailer1 > >mailer smtp1 :10025 > > > > … > > … > > > > backend somebackend_https > >mode http > >balance roundrobin > >… > >email-alert mailers apsmailer1 > >email-alert from > >email-alert to > > email-alert level info > >… > > > > We see in haproxy.log server status change: > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is > UP, reason: Layer4 check passed, check duration: 0ms. 2 active and 0 backup > servers online. 0 sessions requeued, 0 total in queue. > > Jul 15 09:42:00 localhost.localdomain haproxy[3342]: Server …/ is > UP, reason: Layer6 check passed, check duration: 1ms. 2 active and 0 backup > servers online. 0 sessions requeued, 0 total in queue. > > > > But no mail alerts are sent, no error or warning logged about sending mail. > > > > haproxy -f /etc/haproxy/haproxy.cfg –c > > does not return any error. All seems to be right, but mail alerts are not > sent. > > > Roberto > Hi Roberto, Could you please take a tcpdump on port 10025 and confirm HAProxy tries to get connected to the SMTP server? Baptiste