Sorry, I send the instruction in Bahasa.
Masalah e-mail yang sering diterima dobel sangatlah mengganggu, ini
disebabkan akses smtp/qmqp lewat WAN link yg lambat atau sering
putus-putus (intermittent).
By default, timeout setting utk koneksi qmqpc adalah 60 detik, disini kita
akan melakukan patch pada file qmail-qmqpc.c agar kita bisa mengubah qmqpc
timeout menjadi 1200 detik. Buat patch dibawah ini kedalam file
timeout-qmqpc.patch :
--- qmail-qmqpc.c.orig 2004-04-14 02:16:01.000000000 +0700
+++ qmail-qmqpc.c 2004-04-14 02:15:05.000000000 +0700
@@ -39,6 +39,7 @@
void die_format(void) { _exit(91); }
int timeoutconnect = 60;
+int timeout = 60;
int lasterror = 55;
int qmqpfd;
@@ -65,7 +66,7 @@
switch (r) {
case Z_OK:
if (stream.avail_out == 0) {
- r = timeoutwrite(60,qmqpfd,zbuf,sizeof(zbuf));
+ r = timeoutwrite(timeout,qmqpfd,zbuf,sizeof(zbuf));
if (r <= 0) die_conn();
stream.avail_out = sizeof(zbuf);
stream.next_out = zbuf;
@@ -80,7 +81,7 @@
} while (r!=Z_STREAM_END);
if (stream.avail_out != sizeof(zbuf)) {
/* write left data */
- r = timeoutwrite(60,qmqpfd,zbuf,sizeof(zbuf)-stream.avail_out);
+ r = timeoutwrite(timeout,qmqpfd,zbuf,sizeof(zbuf)-stream.avail_out);
if (r <= 0) die_conn();
}
if (deflateEnd(&stream) != Z_OK) die_format();
@@ -90,7 +91,7 @@
int saferead(int fd, void *buf, int len)
{
int r;
- r = timeoutread(60,qmqpfd,buf,len);
+ r = timeoutread(timeout,qmqpfd,buf,len);
if (r <= 0) die_conn();
return r;
}
@@ -105,7 +106,7 @@
switch (r) {
case Z_OK:
if (stream.avail_out == 0) {
- r = timeoutwrite(60,qmqpfd,zbuf,sizeof(zbuf));
+ r = timeoutwrite(timeout,qmqpfd,zbuf,sizeof(zbuf));
if (r <= 0) die_conn();
stream.avail_out = sizeof(zbuf);
stream.next_out = zbuf;
@@ -117,7 +118,7 @@
} while (stream.avail_in != 0);
return len;
#endif
- r = timeoutwrite(60,qmqpfd,buf,len);
+ r = timeoutwrite(timeout,qmqpfd,buf,len);
if (r <= 0) die_conn();
return r;
}
@@ -253,6 +254,9 @@
if (control_readint(&timeoutconnect,"control/timeoutconnect") == -1)
die_control();
+ if (control_readint(&timeout,"control/timeoutqmqpc") == -1)
+ die_control();
+
if (control_rldef(&outgoingip, "control/qmqpcip", 0, "0.0.0.0") == -1)
die_control();
if (!stralloc_0(&outgoingip)) nomem();
--EOF--
Pindahkan file diatas ke direktori /usr/local/src lalu lakukan patching
qmail :
mv timeout-qmqpc.patch /usr/local/src
cd /usr/local/src/qmail-1.03
patch < ../usr/local/src/timeout-qmqpc.patch
Lalu compile dan install :
qmailctl stop
make setup check
Tambahkan file timeoutqmqpc isi dengan nilai 1200 kemudian restart qmail :
echo "1200" >/var/qmail/control/timeoutqmqpc
qmailctl restart
EN
> Quoting Edward Nainggolan <[EMAIL PROTECTED]>:
>
>> I have the same problem too, and that because of connection problems
>> between
>> the two server.
>>
>> It solved with timeoutqmqpc.patch, you should compile qmail-ldap/qmqpc.c
>> on
>> both server with that patch.
>
> Know where that patch can be found?