Bekijk de volledige versie : Xmail 1.2 and mailutils compiled

23-12-2004, 22:44
Ok, I've made the xmail 1.20 package and GNU mailutils for wl500g. Xmail is staticaly compiled, so it will work on most system. It will be extremly memory intensive, so don't expect to run it along with a webcam :D

I have also some smaller mail tools to do pop check or smtp send, and a lighter package, nullmailler, for those needing a smaller system.

I would advice anybody not knowing what a iptable is to forget about installing the xmail package, or you will become a new source for spam.

But the package are quite big. What is the best way to post them? I don't want to split them using rar, as it will probably be a problem for some users. Size is 2,5 megs.

23-12-2004, 22:52
Xmail is this one:

Mailutils info are here:


28-12-2004, 15:42
Xmail is this one:

Mailutils info are here:


Whao - It seems to be very interesting,

Where can we get your package ?

Happy new year to all of you !

Thanks a lot.

28-12-2004, 16:57
I still have a DNS resolution bug. I'll post a binary when I'll have sorted this out.

28-12-2004, 21:13
Ok, I cannot make the DNS resolution working, but I'm sure of my compiled source. I'm posting them, hoping that someone would make them work. It's fully fonctional, but cannot resolve adress. It will work witl IP.

If anybody has a clue about the DNS, I'll gladfully hear from him.

This is a 2 part rar file, that you must unrar with windows, then copy on your box and gzip -d xmailfinal.tar.gz then tar xvf xmailfinal.tar
sorry for the rar file, but nobody answered my question about a way to split file under linux.

You must do:

export MAIL_ROOT=/path to MailRoot folder
move all files in xmail-1.20/bin to xmail-1.20/MailRoot/bin

then run xmail. you can use this how to:
http://www.ubaight.com/xmail/BeginnersGuide.html but to run the mail program, do a
./XMail -Md -Pl -Sl -Fl -Cl -Ll -Qn 3 -Ln 2

29-12-2004, 10:03
The following function is the cullprit:

int SysGetHostByName(char const *pszName, NET_ADDRESS & NetAddr)

int iErrorNo = 0;
struct hostent *pHostEnt;
struct hostent HostEnt;
char szBuffer[1024];

if ((gethostbyname_r(pszName, &HostEnt, szBuffer, sizeof(szBuffer),
&pHostEnt, &iErrorNo) != 0) || (pHostEnt == NULL) ||
(pHostEnt->h_addr_list[0] == NULL)) {
ErrSetErrorCode(ERR_BAD_SERVER_ADDR, pszName);

memcpy(&NetAddr, pHostEnt->h_addr_list[0], sizeof(NetAddr));

return (0);


gethostbyname_r function return bad value or an error.

I have my include netdb.h properly set, as all other program includes, and no compilation error or warning.

Does anyone know any incompatibility with this function? The prog is staticaly compiled against glibc and the prog is in c++.

29-12-2004, 11:37
For glibc resolver to work you need nss libraries be installed on the host and /etc/nsswitch.conf present.
Why don't you link with uclibc?

29-12-2004, 13:32
Because it won't build with -static, as stdlibc++ is made against glibc. I'm trying the snnswitch file right now. Libs was indeed needed, as I found out with a strace.

29-12-2004, 14:09
It's still not working, but it should work better with the nsswitch.conf containing
hosts: dns

It's probably a question of time before it will be working fully, but I still get no result. Libs nss are also found.

29-12-2004, 18:33
Got it working. You need a /etc/nsswitch.conf with one entry:

hosts: dns files

Also you need the following libs:

/libc.so.6 link pointing to libc-2.2.3.so

All this must be in your lib folder, from asus source, or from jocky's firmware file.

Also, if you cannot put them in your lib folder, you must make an alternate lib folder using export LD_LIBRARY_PATH=pathtolib
or using mount -o bind /pathtonewlibs /lib

A sample working running commad script is:

export LD_LIBRARY_PATH='/tmp/hd/conf/usr/lib'
export MAIL_ROOT='/tmp/hd/conf/usr/xmail/MailRoot'
/tmp/hd/conf/usr/xmail/MailRoot/bin/XMail -MD 20 -Ql -Yi 600 -Yl -Pl -Sl -Fl -Cl -Ll -Qn 3 -Ln 2

Be warned, you could be quickly blacklisted. Better use a smarthost. apart from that, it is working perfectly. This little box is really surprising!