Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131249 - xmail DNS resolution problems
Summary: xmail DNS resolution problems
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Net-Mail Packages
URL:
Whiteboard:
Keywords: PMASKED
Depends on:
Blocks:
 
Reported: 2006-04-25 11:27 UTC by Kandalincev Alexandre
Modified: 2008-08-24 10:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
etc patch for the init-script (xmail.diff,559 bytes, patch)
2006-08-06 12:01 UTC, Andre Meyer
Details | Diff
xmail 1.24 ebuild (xmail-1.24.ebuild,4.99 KB, text/plain)
2007-03-02 22:18 UTC, Andre Meyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kandalincev Alexandre 2006-04-25 11:27:31 UTC
XMail will not send any emails because it cant resolve any hostname. The problem is that libnss_files.so.2, libnss_dns.so.2 and libresolv.so.2 missing in /chroot/xmail/lib

Bug easly reprodusable: just emerge xmail and try to send any message outside server. 
Here this problem described:
http://www.mail-archive.com/xmail@xmailserver.org/msg14085.html
http://xmailforum.homelinux.net/index.php?showtopic=3104
...

Bug only apears in chroot.

Please solve it.
Comment 1 Andre Meyer 2006-08-06 12:01:38 UTC
Created attachment 93610 [details, diff]
etc patch for the init-script

(In reply to comment #0)
> XMail will not send any emails because it cant resolve any hostname. The
> problem is that libnss_files.so.2, libnss_dns.so.2 and libresolv.so.2 missing
> in /chroot/xmail/lib
> 
this was not enough for me, i had to copy the /etc/resolv.conf into the chroot
Comment 2 Kandalincev Alexandre 2006-08-19 15:23:56 UTC
i can submit new ebuild and startup script with many fixes. Will gentoo team accept updates from me to the portage?
Comment 3 Andrej Kacian (RETIRED) gentoo-dev 2006-12-20 05:33:53 UTC
(In reply to comment #2)
> i can submit new ebuild and startup script with many fixes. Will gentoo team
> accept updates from me to the portage?
> 

Yes please. We're on the verge of removing xmail from Portage completely, as we couldn't find anyone to take care of it.

I will even offer to proxy-maintain xmail for you, if you want (and can promise the devotion).
Comment 4 Kandalincev Alexandre 2006-12-21 11:58:42 UTC
Andrej, give me please 4 days to fix two bugs in scripts. I will post all files soon.
Comment 5 Kandalincev Alexandre 2006-12-27 10:44:03 UTC
Oops, i need litle more time to resolve paths mess. Sorry  :(
Comment 6 Kandalincev Alexandre 2007-01-03 17:46:36 UTC
Version bump, i need some time to adapt ebuild and scripts. 70% completed.
Comment 7 Andre Meyer 2007-03-02 22:18:08 UTC
Created attachment 111857 [details]
xmail 1.24 ebuild

this is an ebuild for 1.24, not many changes but maybe it helps a bit.

would it be possible to make a version without chroot (USE-flag?)?
Comment 8 Torsten Veller (RETIRED) gentoo-dev 2008-06-11 18:21:18 UTC
net-mail/xmail is masked and will be removed in 30 days.
It has bugs and no maintainer.
Comment 9 Kandalincev Alexandre 2008-06-15 13:06:22 UTC
Sorry for long answer. I can write working ebuild. The are two problems:
1) It will be incompatible with current ebuilds(full deinstall before installation requried). This because my ebuild doesn't use chroot and iptables(as it provides soo many problems, bugs, and touches other programs). Instead it binds to default SMTP and POP3 port and after this drops root privs.

2) To drop root privs I wrote simple patch. But it was not accepted due to arhitecture reasons by upstream (my unix code is "inside a system independent source file"). Patch avaliable here: http://exe.messir.net/tempo/xmail_security.patch

This is why I didn't write ebuild. If this two things are acceptable for gentoo team I will provide new ebuild.
Comment 10 Tobias Scherbaum (RETIRED) gentoo-dev 2008-06-15 13:11:02 UTC
(In reply to comment #9)
> 2) To drop root privs I wrote simple patch. But it was not accepted due to
> arhitecture reasons by upstream (my unix code is "inside a system independent
> source file"). Patch avaliable here:
> http://exe.messir.net/tempo/xmail_security.patch

At least I am not interested in keeping packages around which needs patches to work which were refused by the upstream authors ...
Comment 11 Andre Meyer 2008-06-15 13:47:59 UTC
I made an ebuild that doesnt use chroot and fixes the problems. It uses configurable (conf.d) port redirection and does not need root privs. I can fix it up and attach it here. The ebuild is not compatible to the existing one.
Comment 12 Kandalincev Alexandre 2008-06-15 14:28:53 UTC
I think its a dirty hack to make port redirects. It will require: iptables, kernel with iptables, REDIRECT target and some amount of firewall rules. Thats not good way to solve the problem. Other network software works well without port redirects. Better to drop root privs after binding to port or use CAP_NET_BIND_SERVICE. Don't you want to use CAP_NET_BIND_SERVICE?
Comment 13 Torsten Veller (RETIRED) gentoo-dev 2008-08-24 10:01:42 UTC
xmail is gone