[Keepalived-devel] smtp_alert and qmail
Status: Beta
Brought to you by:
acassen
|
From: John K. <jk...@rf...> - 2003-02-18 17:47:55
|
Using keepalived v1.0.0 along with qmail, the alert messages don't seem
to be going through. In digging through the archives I found a post
from last August where it was suggested that the problem lie in smtp.h.
After some testing this morning, I've discovered that it isn't in
smtp.h, but in the message that's getting passed to smtp_alert().
Here's a code snippet of the problem:
vrrp_smtp_notifier(vrrp_rt * vrrp)
{
if (vrrp->smtp_alert) {
if (vrrp->state == VRRP_STATE_MAST)
smtp_alert(master, NULL, vrrp, NULL,
"Entering MASTER state",
"=> VRRP Instance is now owning VRRP VIPs <=\n\n");
if (vrrp->state == VRRP_STATE_BACK)
smtp_alert(master, NULL, vrrp, NULL,
"Entering BACKUP state",
"=> VRRP Instance is nolonger owning VRRP VIPs <=\n\n");
}
}
The problem lies in the message itself with the \n\n. They don't need
to be there and cause problems with qmail (I haven't researched why, but
presumably because the mta expects \r\n for carriage returns?).
If I simply remove the \n\n from the message it sends fine and looks
fine in my inbox (remember in smtp.h the close invokes a couple of \r\n
before the final '.').
I've attached a small patch that fixes this problem throughout
keepalived.
Thanks!
John
|