PDA

Bekijk de volledige versie : Xmail 1.2 and mailutils compiled



hugo
23-12-2004, 21: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.

hugo
23-12-2004, 21:52
Xmail is this one:
http://xmailserver.org/


Mailutils info are here:

http://www.gnu.org/software/mailutils/mailutils.html

oldudu
28-12-2004, 14:42
Xmail is this one:
http://xmailserver.org/


Mailutils info are here:

http://www.gnu.org/software/mailutils/mailutils.html

Whao - It seems to be very interesting,

Where can we get your package ?

Happy new year to all of you !

Thanks a lot.

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

hugo
28-12-2004, 20: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

hugo
29-12-2004, 09: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);
return (ERR_BAD_SERVER_ADDR);
}

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++.

Oleg
29-12-2004, 10: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?

hugo
29-12-2004, 12: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.

hugo
29-12-2004, 13: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.

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

hosts: dns files


Also you need the following libs:

/libnss_dns.so.2
libresolv.so.2
/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:


#!/bin/sh
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!