Re: [xmail] POP3 UIDL PROBLEM

2015-06-06 Thread U.Mutlu via xmail

Oversea Site via xmail wrote on 06/04/2015 04:25 PM:

I have over 1 EMAILS but when I test UIDL, Sometimes, it's not sorting by 
ID.

it's a file system

-rw-rw-r--  1 root root30558 Jun  1 04:46
1433105179992.70d12960.34c.3f8be2.bravo
-rw-rw-r--  1 root root  989 Jun  1 05:04
1433106257177.5ace6960.34c.3fafbd..bravo
-rw-rw-r--  1 root root   162486 Jun  1 13:04
1433135071576.71513960.34c.43c7a9.bravo
-rw-rw-r--  1 root root21401 Jun  1 13:47
1433137677235.6fd10960.34c.4428cc.bravo
-rw-rw-r--  1 root root54084 Jun  1 22:24
1433168674933.6ed0e960.34c.48d596.bravo
-rw-rw-r--  1 root root 9112 Jun  2 02:35
1433183738295.6ed0e960.34c.4acc30..bravo
-rw-rw-r--  1 root root 9142 Jun  2 02:35
1433183738434.5f4ef960.34c.4acc39.bravo
-rw-rw-r--  1 root root 5342 Jun  2 03:26
1433186769695.70511960.34c.4b30b7.bravo
-rw-rw-r--  1 root root 1238 Jun  2 04:02
1433188925598.6dd0c960.34c.4b7832.bravo
-rw-rw-r--  1 root root 1020 Jun  2 04:02
1433188949218..69d04960.34c.4b78f7.bravo
-rw-rw-r--  1 root root22474 Jun  2 06:32
1433197934458.6f50f960.34c.4ca2e8.bravo
-rw-rw-r--  1 root root 2615 Jun  2 07:40
1433202046360.59ce4960.34c.4d2b2f.bravo
-rw-rw-r--  1 root root 2678 Jun  2 07:43
1433202184456.4fcd0960.34c.4d2fbe.bravo
-rw-rw-r--  1 root root 3272 Jun  2 08:04
1433203475828.55cdc960.34c.4d5ab8.bravo
-rw-rw-r--  1 root root 2863 Jun  2 08:26
1433204809317.57ce0960.34c.4d8766.bravo
-rw-rw-r--  1 root root41748 Jun  2 11:30
1433215840379.72d16960.34c.4f3bf6.bravo
-rw-rw-r--  1 root root 1857 Jun  2 11:39
1433216376230.73d18960.34c..4f5305.bravo
-rw-rw-r--  1 root root 6157 Jun  2 11:44
1433216684073.71d14960.34c.4f5e9a.bravo
-rw-rw-r--  1 root root 5402 Jun  2 12:55
1433220946062.6f50f960.34c.500170.bravo
-rw-rw-r--  1 root root29790 Jun  2 14:03
1433224988810.70511960.34c.5092ca.bravo
-rw-rw-r--  1 root root10473 Jun  2 22:11
1433254291563.4a4c5960.34c.553526.bravo
-rw-rw-r--  1 root root 1238 Jun  3 04:02
1433275327112.6f50f960.34c.580f59.bravo
-rw-rw-r--  1 root root 1020 Jun  3 04:02
1433275353273.654fb960.34c.581041.bravo
-rw-rw-r--  1 root root  988 Jun  3 05:14
1433279643381.5ecee960.34c.589f69.bravo
-rw-rw-r--  1 root root15235 Jun  3 07:50
1433289052265.614f3960.34c.59db64.bravo
-rw-rw-r--  1 root root  3985615 Jun  3 08:36
1433291762335.49cc4960.34c.5a40b9.bravo
-rw-rw-r--  1 root root30149 Jun  3 14:52
1433314331266.71513960.34c.5dab73.bravo
-rw-rw-r--  1 root root 5382 Jun  3 14:54
1433314498740.6dd0c960.34c.5db2ce.bravo
-rw-rw-r--  1 root root44713 Jun  3 16:55
1433321724856.74d1a960.34c.5ed68c.bravo
-rw-rw-r--  1 root root   110709 Jun  3 17:54
1433325240897.6dd0c960.34c.5f65fa.bravo
-rw-rw-r--  1 root root   322169 Jun  3 18:56
143332954.6e50d960.34c.5fff22.bravo
-rw-rw-r--  1 root root14174 Jun  3 20:57
146272368.6e50d960.34c.610ed5.bravo
-rw-rw-r--  1 root root27877 Jun  4 00:03
1433347390242.7fc51afdd700.bca.152b.bravo
-rw-rw-r--  1 root root 8116 Jun  4 03:06
1433358408984.5c450960.24ad.336b.bravo
-rw-rw-r--  1 root root 9831 Jun  4 14:05
1433397936295.7347e960.24ad.635a7.bravo
-rw-rw-r--  1 root root90604 Jun  4 19:59
1433399979747.5ec55960.24ad.6860d.bravo
-rw-rw-r--  1 root root  2193650 Jun  4 20:00
1433412426056.43c1f960.24ad.8919a.bravo
-rw-rw-r--  1 root root 2783 Jun  4 20:07
1433419665957.6ead6960.649d.6e32.bravo
-rw-rw-r--  1 root root 4651 Jun  4 20:23
1433420596561.73ae0960.649d.90c8.bravo

13873 1433105179992.70d12960.34c.3f8be2.bravo
13874 1433106257177.5ace6960.34c.3fafbd.bravo
13875 1433135071576.71513960.34c.43c7a9.bravo
13876 1433137677235.6fd10960.34c.4428cc.bravo
13877 1433168674933.6ed0e960.34c..48d596.bravo
13878 1433183738295.6ed0e960.34c.4acc30.bravo
13879 1433183738434.5f4ef960.34c.4acc39.bravo
13880 1433186769695.70511960.34c.4b30b7.bravo
13881 1433188925598.6dd0c960.34c.4b7832.bravo
13882 1433188949218.69d04960.34c.4b78f7.bravo
13883 1433197934458.6f50f960.34c.4ca2e8.bravo
13884 1433202046360.59ce4960.34c.4d2b2f.bravo
13885 1433202184456.4fcd0960.34c.4d2fbe.bravo
13886 1433203475828.55cdc960.34c.4d5ab8.bravo
13887 1433204809317.57ce0960.34c.4d8766.bravo
13888 1433215840379.72d16960.34c.4f3bf6.bravo
13889 1433216376230.73d18960.34c.4f5305.bravo
13890 1433216684073.71d14960.34c.4f5e9a.bravo
13891 1433220946062.6f50f960.34c.500170.bravo
13892 1433224988810.70511960.34c.5092ca.bravo
13893 1433254291563.4a4c5960.34c.553526.bravo
13894 1433275327112.6f50f960.34c.580f59.bravo
13895 1433275353273.654fb960.34c.581041.bravo
13896 1433279643381.5ecee960.34c.589f69.bravo
13897 1433289052265.614f3960.34c.59db64.bravo
13898 1433291762335.49cc4960.34c.5a40b9.bravo
13899 1433314331266.71513960.34c.5dab73.bravo
13900 1433314498740.6dd0c960.34c.5db2ce.bravo
13901 1433321724856.74d1a960.34c.5ed68c.bravo
13902 1433325240897.6dd0c960.34c.5f65fa.bravo
13903 143332954.6e50d960.34c.5fff22.bravo
13904 146272368.6e50d960.34c.610ed5.bravo
13905 

Re: [xmail] new maintainer for the 1.27 branch

2015-06-01 Thread U.Mutlu via xmail

bugs--- via xmail wrote on 06/02/2015 01:31 AM:

Hi List,

I already made some fixes. See http://www.econtrario.ch/tools/. Maybe
you can use them.


Yes, it's already on the todo list. Thx.

--
cu
Uenal

___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


Re: [xmail] BUG : XMAIL 1.27 with SSL

2015-05-26 Thread U.Mutlu via xmail

Bart Mortelmans via xmail wrote on 05/26/2015 03:55 PM:

It might be difficult to determine if the problem is with XMail or with the
client. And even if for example Tencent actually closes the connection
incorrectly, it should be better if XMail would be able to handle such an
improperly closed connection.
But I'm not sure if you'll find somebody in this forum that will be able to
fix this problem. Maybe you could try to get K9 developers involved in this?
That seems to be managed much more actively than XMail. With a bit of luck,
they can at least find out what they are doing differently compared to for
example Outlook and that could cause this problem.


Regarding FIN_WAIT2:
I suspect it is caused by a firewall issue where some FIN's or ACK's
are blocked or wrongly filtered out, or the client side doesn't properly
close the socket, or some of the sockets it allocates.
One really cannot trust any interpreted scripting language many mobiles do use.
Using iptables one can diagnose this by logging the FIN's, ACK's.

cu
Uenal


Oversea Site via xmail schreef op 26/05/15 om 15:09:

Now I am using original XMAIL-1.27.tar.gz source without simultaneous POP3
logins, no STUNNEL, use NATIVE XMAIL SSL. The problem still exists, K9-MAIL
will report IllegalFormatConversonException when I receive more then 100-200
emails. So It should be XMAIL SSL problem. Because When I reuse STUNNEL to
do a POP3 tunnel again, the problem will fix.


___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


Re: [xmail] BUG : XMAIL 1.27 with SSL

2015-05-26 Thread U.Mutlu via xmail

Oversea Site via xmail wrote on 05/26/2015 03:09 PM:

Now I am using original XMAIL-1.27.tar.gz source without simultaneous POP3
logins, no STUNNEL, use NATIVE XMAIL SSL. The problem still exists, K9-MAIL
will report IllegalFormatConversonException when I receive more then
100-200 emails. So It should be XMAIL SSL problem. Because When I reuse
STUNNEL to do a POP3 tunnel again, the problem will fix.


But since you said that no error happens with normal mail-clients
(Outlook etc.), then the error must lie in the mobile clients you listed.
They seem to not handle properly the closing of the sockets they create.

cu
Uenal



 Original Message  From: Bart Mortelmans b...@bim.be To:
t...@os.st, XMail Users Mailing List xmail@xmailserver.org Sent: Tue,
May 26, 2015, 3:13 PM Subject: Re: [xmail] BUG : XMAIL 1.27 with SSL

Is there any way for you to test if the problem exists if you don't allow
simultaneous POP3 logins?


Oversea Site via xmail schreef op 26/05/15 om 08:14:

POP3Utils.cpp - ADD POP3 Concurrent Login. I used this function over 5
years.. I don't know C++ programming. Sorry :)





}

if (pPOPMD-ulFlags  POPF_MSG_DELETED) { UPopSendErrorResponse(hBSock,
ERR_MSG_DELETED, pPOPSD-iTimeout);

ErrSetErrorCode(ERR_MSG_DELETED); return ERR_MSG_DELETED; }

UsrGetMailboxPath(pPOPSD-pUI, szMsgFilePath, sizeof(szMsgFilePath),
1); StrNCat(szMsgFilePath, pPOPMD-szMsgName, sizeof(szMsgFilePath));
/* * ADDED CODE START */

FILE *pMsgFile = fopen(szMsgFilePath, rb); if (pMsgFile == NULL) {
UPopSendErrorResponse(hBSock, ERR_FILE_OPEN, pPOPSD-iTimeout);

ErrSetErrorCode(ERR_FILE_OPEN); return ERR_FILE_OPEN; }
fclose(pMsgFile);

/* * ADDED CODE END */

SysSNPrintf(szResponse, sizeof(szResponse) - 1, +OK  SYS_OFFT_FMT 
bytes, pPOPMD-llMsgSize); if (BSckSendString(hBSock, szResponse,
pPOPSD-iTimeout)  0) return ErrGetErrorCode();

if (pPOPMD-llMsgSize  0 



 Original Message  From: Oversea Site via xmail
xmail@xmailserver.org To: XMail Users Mailing List
xmail@xmailserver.org Sent: Tue, May 26, 2015, 1:56 PM Subject: Re:
[xmail] BUG : XMAIL 1.27 with SSL

FEDORA 4 X86_64 GLIBC 2.3.6-3 (I can't upgrade it to the lastest
version.. Because I have a chiliasp 3.6.2 32-bit run ASP VBSCRIPT on
APACHE 1.3 32-bit software, it need GLIBC 2.3.x and Kernel 2.6)

KERNEL 3.3 MOD FROM FC15 (It will display KERNEL 2.6.43 Number).
Kernel is not a main problem. Because I have been test 2.6.32 or
other. same problem was found.

REAL HARDWARE - INTEL B85M i3-4150 16G RAM SATA3 RAID 1 LINUX
SOFTRAID1 MDADM

Corp. Email System is not heavily use when I test it in HK TIME
midnight..

Anyway I will test this issue in other linux distribution in VM, such
as CentOS. (You can give me any linux distribution, let's build the
same platform in VM. I use virtualbox.

[root@bravo logs]# uname -a Linux bravo 2.6.43-gcc402 #3 SMP Sun May
17 23:10:29 HKT 2015 x86_64 x86_64 x86_64 GNU/Linux [root@bravo
logs]# [root@bravo logs]# ldd /var/MailRoot/bin/XMail127v3
linux-vdso.so.1 =  (0x77f0e000) libssl.so.0.9.8 =
/usr/local/ssl/lib/libssl.so.0.9.8 (0x7f43b00bc000)
libcrypto.so.0.9.8 = /usr/local/ssl/lib/libcrypto.so.0.9.8
(0x7f43afd35000) libdl.so.2 = /lib64/libdl.so.2
(0x003e1820) libpthread.so.0 = /lib64/libpthread.so.0
(0x003e1860) libstdc++.so.6 = /usr/lib64/libstdc++.so.6
(0x7f43afa37000) libm.so.6 = /lib64/libm.so.6
(0x003e1800) libgcc_s.so.1 = /lib64/libgcc_s.so.1
(0x003e1940) libc.so.6 = /lib64/libc.so.6
(0x003e17d0) /lib64/ld-linux-x86-64.so.2
(0x003e17b0)

***
/var/MailRoot/bin/XMail127v3 -Md -Ms /var/MailRoot -Sl -Pl -Cl \ -SI
0.0.0.0:8025 -SI 0.0.0.0:25 \ -PI 0.0.0.0:8110 -PI 0.0.0.0:110 \ -BI
0.0.0.0:995 \ -XI 0.0.0.0:465 \ -Ql -Ln 256 -Pt 60 -St 150 -F- -SX
2048 -Mx 64 \ -Qn 64 -PX 2048 -Qr 1 -Qt 1 -QT 150 -Qg -CX 256
***


 Original Message  From: U.Mutlu um4...@mutluit.com To:
t...@os.st, XMail Users Mailing List xmail@xmailserver.org Sent:
Tue, May 26, 2015, 1:06 PM Subject: Re: [xmail] BUG : XMAIL 1.27
with SSL

Oversea Site via xmail wrote on 05/26/2015 05:14 AM:

No Log Error. No Fatal Error log. No Core Dump

It's not RAM or HW problem. It's XMAIL internal issue, because
when I switch to stunnel, all problems solved. And then when I
test K9-MAIL with XMAIL+STUNNEL, K9 Client will not have any JAVA
somethings Exception Error

Two tests

1. Very Important Thing in Xmail 1.27 Native SSL

If the emailbox has many emails such as 1, Microsoft Outlook
with SSL or NON-SSL download them, it WILL NOT have this issue.
Some Tencent Foxmail for Windows, after finish ssl session, it
will take the server be FIN_WAIT2 (some version, not all) But
K9-MAIL for Android, Download first 1000, it will appear the
error in 

Re: [xmail] BUG : XMAIL 1.27 with SSL

2015-05-26 Thread U.Mutlu via xmail

U.Mutlu via xmail wrote on 05/26/2015 04:38 PM:

Bart Mortelmans via xmail wrote on 05/26/2015 03:55 PM:

It might be difficult to determine if the problem is with XMail or with the
client. And even if for example Tencent actually closes the connection
incorrectly, it should be better if XMail would be able to handle such an
improperly closed connection.
But I'm not sure if you'll find somebody in this forum that will be able to
fix this problem. Maybe you could try to get K9 developers involved in this?
That seems to be managed much more actively than XMail. With a bit of luck,
they can at least find out what they are doing differently compared to for
example Outlook and that could cause this problem.


Regarding FIN_WAIT2:
I suspect it is caused by a firewall issue where some FIN's or ACK's
are blocked or wrongly filtered out, or the client side doesn't properly
close the socket, or some of the sockets it allocates.
One really cannot trust any interpreted scripting language many mobiles do use.
Using iptables one can diagnose this by logging the FIN's, ACK's.

cu
Uenal


Oversea Site via xmail schreef op 26/05/15 om 15:09:

Now I am using original XMAIL-1.27.tar.gz source without simultaneous POP3
logins, no STUNNEL, use NATIVE XMAIL SSL. The problem still exists, K9-MAIL
will report IllegalFormatConversonException when I receive more then 100-200
emails. So It should be XMAIL SSL problem. Because When I reuse STUNNEL to
do a POP3 tunnel again, the problem will fix.


One more thought:

If an application throws an exception without catching and handling it,
like is the case above, then this means that the application is badly 
programmed. A good application would catch the exception and do what is

necessary in that state of of the program.
In this case one can simply say the app or part of it just badly crashed;
no app should behave so. Exceptions can and must be handled by the app.

cu
Uenal

___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


Re: [xmail] Tip: Speeding up xmail by pointing envvar XMAIL_TEMP to a ramdisk

2015-05-25 Thread U.Mutlu via xmail

Bart Mortelmans via xmail wrote on 05/25/2015 02:24 PM:

Are you sure this will actually speed up XMail? Have you been able to compare,
specifically for XMail?


It will help for files xmail creates in /tmp and doesn't move
to an other drive (for example when the realtime filters get fired
during mail acceptance, the passed file always lies in /tmp).
Since a /tmp on a ramdisk is ultra-fast I concluded that this
will speed things up. But I'm not sure yet if xmail moves that
file to main disk.


As far as I understand how XMail processes e-mails, it actually only creates a
file one time and then moves that file around between temp-folder, spool
folder and local POP3 folders. Moving a file on the same filesystem means the
file isn't re-rewritten. If you move a file between different filesystems, it
does need to be re-written. That could actually mean that having the temp
folder on a RAM-disk might slow things down if there would be an event in
which XMail moves a file from spool to temp to local POP3 folder. When they
are all on the same filesystem, this would mean the file would need to be
written only once (and then moved around). If the temp folder is on a
different file-system, this would cause the file to be writting to the hard
drive twice and to the RAM-drive once.


Hmm. yes, true.
But there are use cases where ramdisk will be w/o question useful,
for example starting the filter-programs from ramdisk.


All mails will not only pass through the temp-folder, but will also end up in
the spool-folder. If most mails only pass through the server (and don't need
to be stored locally) then you might be able to see a speed improvement by
also placing the spool folder on a ramdisk. But this would mean that all mails
pending delivery are lost at server restart (so this isn't really recommended).


Yes, true, putting spool on ramdisk is not that a good idea :-)

cu
Uenal



Sincerely,
Bart Mortelmans


U.Mutlu via xmail schreef op 25/05/15 om 01:09:

Tip: Speeding up xmail by pointing envvar XMAIL_TEMP to a ramdisk
(here on Linux using a 64 MB ramdisk mounted to /mnt/ramdisk )

mkdir -p /mnt/ramdisk

in /etc/fstab:
tmpfs  /mnt/ramdisk  tmpfs  nodev,size=64M  0  0

then either reboot or use this cmd:
mount /mnt/ramdisk

in xmail start script:
export XMAIL_ROOT=/var/MailRoot
export XMAIL_TEMP=/mnt/ramdisk
export
PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

...

and restart xmail.

The ramdisk size should be bigger than MaxMessageSize (unit KB) in
server.tab.

This will speed up mail processing (at least incoming mails) significantly.
Here's more info about speed gains:
http://www.jamescoyle.net/knowledge/951-the-difference-between-a-tmpfs-and-ramfs-ram-disk

The major benefit to memory based file systems is that they are very fast –
10s of times faster than modern SSDs. Read and write performance is
massively increased for all workload types.

One can even copy the mostly called programs (for example filters) onto the
ramdisk, but then one must use such a PATH line (instead of the above one):
export 
PATH=/mnt/ramdisk:$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin




___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


Re: [xmail] BUG : XMAIL 1.27 with SSL

2015-05-25 Thread U.Mutlu via xmail

Oversea Site via xmail wrote on 05/25/2015 09:23 PM:

I found the bug on XMAIL 1.27 with SSL (POP3S is main), SSMTP service maybe
has a same bug too

1. it will have too many FIN_WAIT_2 on POP3S with two many requests, It is
because of some non-popular WINDOWS CLIENT e.g. tencent foxmail , outlook will
not have this issue.

2. If you're using XMAIL'S internal SSL POP3S with any openssl lib. (tested
0.9.8za 1.0.0, tested gcc 4.0.2/4.0.4/4.3.6) and the email account contain too
many emails (1000-2000 emails), the mobile client POP3 such as Samsung
internal Email Client is using SSL, K9-MAIL on any android devices using SSL,
some iPhone devices (connect with XMAIL SSL port 995), will not download them
successfully (Android Error - Java Exception Error) and some
iPhone device will stuck with it, it will not download all emails
successfully. But if you disable XMAIL'S internal POP3S with -B- startup
option, and switch stunnel 5.17 port 995 tunnel to port 110, it will solve
this problem and kick out FIN_WAIT_2

* stunnel 5.17 config *
[pop3s]
accept  = 995
connect = 110
cert = /etc/stunnel/stunnel.pem
***



What do the logs (server, client) say about the errors?

I think you need a faster server HW and/or need to optimize the resources,
for example the number of threads, and possibly also RAM.
An excerpt from the doc:

If you have an heavily loaded server remember to setup the best number of 
XMAIL threads by specifying the '-Qn nthreads' option (you must do some 
tentatives to find the best value for your needs). Also you can limit the 
number of SMTP, POP3 and CTRL service threads by specifying the options '-SX 
maxthreads', '-PX maxthreads' and '-CX maxthreads'.



If there are mail filters, you can put them into a ramdisk and set PATH 
accordingly, or use an absolute path to them. See also XMAIL_TEMP in the doc.


In task manager / system monitor you can see how the resource usage is, 
especially CPU, memory, and network.


--
cu
Uenal

___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


Re: [xmail] BUG : XMAIL 1.27 with SSL

2015-05-25 Thread U.Mutlu via xmail

U.Mutlu via xmail wrote on 05/26/2015 07:06 AM:

Oversea Site via xmail wrote on 05/26/2015 05:14 AM:

No Log Error. No Fatal Error log. No Core Dump

It's not RAM or HW problem. It's XMAIL internal issue, because when I switch
to stunnel, all problems solved. And then when I test K9-MAIL with
XMAIL+STUNNEL, K9 Client will not have any JAVA somethings Exception Error

Two tests

1. Very Important Thing in Xmail 1.27 Native SSL

If the emailbox has many emails such as 1, Microsoft Outlook with SSL or
NON-SSL download them, it WILL NOT have this issue.
Some Tencent Foxmail for Windows, after finish ssl session, it will take the
server be FIN_WAIT2 (some version, not all)
But K9-MAIL for Android, Download first 1000, it will appear the error in
K9-MAIL randomly.


2. Xmail 1.27 + Stunnel Proxy

If the emailbox has many emails such as 1, Microsoft Outlook with SSL or
NON-SSL download them, it WILL NOT have this issue.
Some Tencent Foxmail for Windows, after finish ssl session, it WILL NOT have
any problem. Server WILL NOT TAKE FIN_WAIT_2
K9-MAIL for Android, Download first 1000, it will NOT DISPLAY any error when
it finished download emails.


I would need full description about the server HW and SW (OS version,
xmail start params etc., any xmail patches applied etc.).

There is of course also the possibility that the bug lies in the
said mobile client program, especially if it goes online via
unstable mobile links as it seems to be a link latency problem,
or the client does not close the socket cleanly. Take a look at these:
https://github.com/Automattic/socket.io/issues/1380
http://stackoverflow.com/questions/5328155/preventing-fin-wait2-when-closing-socket


Check this too:

# cat /proc/sys/net/ipv4/tcp_fin_timeout
60

The following page is informative too:
http://httpd.apache.org/docs/2.0/misc/fin_wait_2.html

--
cu
Uenal

___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


[xmail] HOWTO quick-testing spamassassin (spamd + spamc) at home

2015-05-24 Thread U.Mutlu via xmail

Hi Spros  All,
this maybe might interest some of you:


HOWTO quick-testing spamassassin (spamd + spamc) at home

spamd is the daemon program (runs in background)
spamc is the client pgm to interact with spamd

1.) install spamassassin pkg (Debian-Linux: apt-get install spamassassin)
2.) enable the spamd daemon (in file /etc/default/spamassassin set ENABLED=1)
3.) start spamd (/etc/init.d/spamassassin start or service spamassassin 
start
depending on your init-system (syvinit/upstart/systemd))
4.) in your mailclient save a single mail to disk for testing
5.) spamc -R  mailfile.eml
This gives the result of spam testing

Example:

$ spamc -R  test3.eml
-0.5/5.0
Spam detection software, running on the system xx,
has NOT identified this incoming email as spam.
...
Content analysis details:   (-0.5 points, 5.0 required)
 pts rule name  description
 -- --
 0.0 URIBL_BLOCKED  ADMINISTRATOR NOTICE: The query to URIBL was 
blocked.
See

http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
 for more information.
[URIs: srpsecure.de]
 0.0 TVD_RCVD_SPACE_BRACKET No description available.
-0.6 RP_MATCHES_RCVDEnvelope sender domain matches handover relay domain
 0.0 T_FRT_CONTACT  BODY: ReplaceTags: Contact
 0.0 HTML_MESSAGE   BODY: HTML included in message
 0.0 DC_PNG_UNO_LARGO   Message contains a single large inline gif



After testing you can stop spamd, deaktive it or uninstall if desired.

In real life one would install spamassassin on the mailserver and
create a filter to pass the to be checked mail to it, and analyse
its return value etc...

More info @ http://wiki.apache.org/spamassassin/

cu
Uenal


Spyros Tsiolis via xmail wrote on 05/24/2015 06:34 PM:

I was introduced to XMail by a colleague of mine.
At first it seemed cryptic and it still is for some stuff I am interested in.
I've been using it since 2003 and never looked back.

---

On Sun, 24/5/15, U.Mutlu via xmail xmail@xmailserver.org wrote:

  Subject: Re: [xmail] new maintainer for the 1.27 branch
  To: Bart Mortelmans b...@bim.be, XMail Users Mailing List 
xmail@xmailserver.org
  Date: Sunday, 24 May, 2015, 19:07

  Hi Bart  All,

  Bart Mortelmans via xmail wrote on 05/16/2015 10:27 PM:
   I have been using XMail for what must have been almost
  15 years. I still
   prefer XMail for anything that does not need IMAP.

  I have no experience yet with Dovecot, but what does it mean
  when
  they say If you already have XMail Setup and just want to
  add in IMAP
  support See : dovecot-setup.html  on this webpage:
  http://xmail.nomadcf.com/xmail-dovecot



I think what it's trying to say is : if you have already XMail setup for
pop3/smtp, all you need is dovecot for lmtp/imap.

I have working installations with XMail / dovecot / Horde and it works
like a dream. No problems there. That has been for about seven years;
Since 2008 I think.




   I made some small changes to the code. If anybody would
  be willing to pick
   up XMail and start development again, I hope that these
  changes can also

   get into the new version. If you need more details, let

  me know!

  Thx, since Davide is not reachable for a very long time now
  (3+ yrs?),


WOW ! 3 Years ? I know he has a life (no pun intended) apart from
his XMail project. I also know he has developed other stuff
(see here : http://xmailserver.org/davide.html) but I never expected for
him to just abandon XMail. It's a good project. Why would he do this ?



  I hereby accounce my general interest in bugfixing and
  adding new
  features (patches and wishes of users) into the current 1.27
  branch,
  if time permits. I'll also setup an svn repository.


There are many nice things one could add to XMail. However I am
not a developer and I can only propose stuff.
One feature I longed for is the ability to view e-mail traffic in real-time
and also XMail be able to log incoming and outgoing messages.



  The only problem is: at this time I can't support any other
  OS beyond Linux.

  will brand the new version something like v1.27.n.linux
  where n is a counter.

   - Change the default error message for a failed
  pre-date or post-data

   filter to code 451 (by default this would otherwise be

  554 which means
   there won’t be an other attempt). For me 451 makes
  much more sense.

  Can you explain how this is meant?
  Is it the return code of the filter program like discussed
  here? :
  http://xmailforum.marketmix.com/index.php?showtopic=3362

   - Added basic support for LMTP. That way I can have
  XMail deliver mails to
   dovecot directly. For this, I just had to add the LHLO
  message next to the
   HELO and EHLO. This works for me, as with my
  configuration there shouldn’t
   be any event in which XMail tries to deliver one e

Re: [xmail] new maintainer for the 1.27 branch

2015-05-24 Thread U.Mutlu via xmail

Hi Bart  All,

Bart Mortelmans via xmail wrote on 05/16/2015 10:27 PM:

I have been using XMail for what must have been almost 15 years. I still
prefer XMail for anything that does not need IMAP.


I have no experience yet with Dovecot, but what does it mean when
they say If you already have XMail Setup and just want to add in IMAP
support See : dovecot-setup.html  on this webpage:
http://xmail.nomadcf.com/xmail-dovecot


I made some small changes to the code. If anybody would be willing to pick
up XMail and start development again, I hope that these changes can also
get into the new version. If you need more details, let me know!


Thx, since Davide is not reachable for a very long time now (3+ yrs?),
I hereby accounce my general interest in bugfixing and adding new
features (patches and wishes of users) into the current 1.27 branch,
if time permits. I'll also setup an svn repository.

The only problem is: at this time I can't support any other OS beyond Linux.

I will brand the new version something like v1.27.n.linux
where n is a counter.


- Change the default error message for a failed pre-date or post-data
filter to code 451 (by default this would otherwise be 554 which means
there won’t be an other attempt). For me 451 makes much more sense.


Can you explain how this is meant?
Is it the return code of the filter program like discussed here? :
http://xmailforum.marketmix.com/index.php?showtopic=3362


- Added basic support for LMTP. That way I can have XMail deliver mails to
dovecot directly. For this, I just had to add the LHLO message next to the
HELO and EHLO. This works for me, as with my configuration there shouldn’t
be any event in which XMail tries to deliver one e-mail to multiple
recipients via LTMP. I’m not sure if there might be other configurations
for which more work would be needed for LMTP to work.


This sounds not trivial :-) I must admit I have no experience yet with LMTP,
but I saw wikipedia has a page about it:
https://en.wikipedia.org/wiki/Local_Mail_Transfer_Protocol
https://tools.ietf.org/html/rfc2033


- Made XMail log a line to SMAIL log in case of delivery failure (posted
details on this in an e-mail to this mailing list very recently).


Yeah, I would need that feature too.

I recently added this feature into xmail:

spamassassin (spamd via spamc) reports, with default config,
to every mail received by xmail the following bad score of 1.3:
 1.3 RDNS_NONE   Delivered to internal network by a host with no rDNS
After much research and experimenting I figured out what the reason is:
it is the Received: line xmail prepends to the mail depending on
ReceivedHdrType in server.tab. There are choices from 0 to 4, and
I added one more (5), and now spamassassin no more gives the above spam-score.


If anybody is taking feature requests: I would be interested in a way of
XMail talking to a “filter” via a socket. Now, for every e-mail to be
filtered, a process has to be started. It would be much more efficient if
XMail could talk a filter-server via a socket. That filter server could be
anything, but maybe we could even get it to talk directly to spamd and
clamd…


Yes, that's a good idea. I'll study the xmail sources.

--
Thx
Uenal

___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


[xmail] Tip: Speeding up xmail by pointing envvar XMAIL_TEMP to a ramdisk

2015-05-24 Thread U.Mutlu via xmail

Tip: Speeding up xmail by pointing envvar XMAIL_TEMP to a ramdisk
(here on Linux using a 64 MB ramdisk mounted to /mnt/ramdisk )

mkdir -p /mnt/ramdisk

in /etc/fstab:
tmpfs  /mnt/ramdisk  tmpfs  nodev,size=64M  0  0

then either reboot or use this cmd:
mount /mnt/ramdisk

in xmail start script:
export XMAIL_ROOT=/var/MailRoot
export XMAIL_TEMP=/mnt/ramdisk
export 
PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

...

and restart xmail.

The ramdisk size should be bigger than MaxMessageSize (unit KB) in server.tab.

This will speed up mail processing (at least incoming mails) significantly.
Here's more info about speed gains:
http://www.jamescoyle.net/knowledge/951-the-difference-between-a-tmpfs-and-ramfs-ram-disk
The major benefit to memory based file systems is that they are very fast – 
10s of times faster than modern SSDs. Read and write performance is massively 
increased for all workload types.


One can even copy the mostly called programs (for example filters) onto the 
ramdisk, but then one must use such a PATH line (instead of the above one):
export 
PATH=/mnt/ramdisk:$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


--
cu
Uenal

___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


[xmail] thx to xmail and its author

2015-05-16 Thread U.Mutlu via xmail

Hi folks,

I'm using xmail for a long time now (maybe 7 yrs), and I'm still
very satisfied with it. OTOH I must admit I'm using it only for
a small number of users, and I've used (before xmail)
only one other mail-system (it was qmail iirc).

I'm using a self-compiled version of xmail (the crippled version
in the debian repository I tried about 2 yrs ago was unusable
due to cfg-files spread around to many OS-system dirs;
I like it compact under a single app-dir and its subdirs).

The only thing I don't like much is the usage of TAB as delimiter in the 
cfg-files.


What I would like to ask is:

- What are the shortcomings or missing features other users experience with 
xmail?
- What about the new developments regarding ssl and crypto since Snowden,
  and their relevance to xmail?
- What new features should xmail have implemented?


--
Thx
Uenal
___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail


[xmail] non-delivered mails not listed in the logs

2015-04-30 Thread U.Mutlu via xmail

Hi, anybody left here? :-)

Can anybody confirm this? :

It seems xmail does not make a log entry for a non-deliverable mail.
Though it sends an error mail to the sender (Subject Error sending message 
...).

This is not optimal, since the mail admin should have the possibility
to inform himself about such problems from the logs.

Thx
___
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail