Gentoo Archives: gentoo-dev

From: Corey Crawford <ccrawford@×××××××.net>
To: Gentoo Developers <gentoo-dev@g.o>
Subject: Re: [gentoo-dev] vpopmail's emerge directory structure
Date: Sun, 02 Nov 2003 00:46:36
Message-Id: 00f401c3a0da$c1ad4a60$6401a8c0@SevenLt
In Reply to: Re: [gentoo-dev] vpopmail's emerge directory structure by "Robin H. Johnson"
1 I guess I'm confused.
2
3 Since my vpopmail user isn't allowed to write a new file in /etc, using the
4 default configure option of '--enable-tcpserver-file=/etc/tcp.smtp' breaks
5 qmail-smtpd's tcpserver tcprule rule. This is not because the tcprule is
6 pointing to the wrong file but rather that vpopmail can't even update this
7 file.
8
9 When you use vpopmail's ebuild does it now create the vpopmail user with
10 permissions to write (and create new files) in /etc?
11
12 What other program than tcpserver/tcprules uses /etc/tcp.smtp?
13
14 I still don't see why vpopmail's ebuild can't use
15 /var/vpopmail/etc/tcp.smtp. Or, I suppose, it could link to /etc/tcp.smtp
16 but build it's own tcp.smtp.cdb file in /var/vpopmail/etc/ (since it doesn't
17 actually edit tcp.smtp but rather updates tcp.smtp.cdb).
18
19 With the current default emerge of vpopmail, does POP-before-SMTP auth even
20 work?
21
22 >From the looks of it, it doesn't.
23
24 You yourself say you don't want arbitrary users to be able to write to
25 config files in /etc, but then why does the now-default ebuild of vpopmail
26 require this?
27
28 You also say that it'd require a recompile of vpopmail to turn off
29 POP-before-SMTP but this isn't true. You simply have to remove the
30 tcprule -x arg from your qmail-smtpd startup script. You could also modify
31 the tcp.smtp file to allow all IPs.
32
33 ---
34 Corey Crawford
35 ccrawford@×××××××.net
36
37
38 ----- Original Message -----
39 From: "Robin H. Johnson" <robbat2@g.o>
40 To: "Martin Lesser" <gentoo@××××××××××.de>; "Gentoo Developers"
41 <gentoo-dev@g.o>
42 Sent: Saturday, November 01, 2003 5:15 AM
43 Subject: Re: [gentoo-dev] vpopmail's emerge directory structure
44
45 On Sat, Nov 01, 2003 at 09:52:41AM +0100, Martin Lesser wrote:
46 > > The file doesn't belong to vpopmail exclusively. It really belongs to
47 > > qmail, and vpopmail wants to add and remove items from it for it's
48 > > misguiding implementation of relaying.
49 > What do you mean with misguiding? vpopmail - like others - only tries to
50 > record the REMOTEIP for SMTP after POP purposes.
51 I personally believe that /etc/tcp.smtp should not be writable by
52 anybody other than the root user himself, setting it up.
53
54 > > Qmail looks at /etc/tcp.smtp via tcpserver, which only allows a single
55 > > file to be specified, so there is also a tcp.smtp is in
56 > > /var/vpopmail/etc, then qmail NEVER looks at it, as it really needs
57 > > /etc/tcp.smtp.
58 > Just for clarifying: tcpserver (and not qmail) looks into a cdb-file
59 > which you define as option for tcpserver with -x /path/to/file.cdb.
60 That is exactly what I said: 'Qmail looks at /etc/tcp.smtp via
61 tcpserver'.
62
63 > So if one uses vpopmail the run-file for qmail-smtpd could be changed in
64 > a way that tcpserver looks in another cdb-file for which vpopmail has
65 > write access. The vanilla vpopmail suggests this IIRC.
66 The problem is that tcpserver only takes the last '-x' parameter it is
67 passed, so you cannot give it multiple cdbfiles.
68
69 I'd like to enforce a clean seperation between the tcp.smtp that is set
70 by the administrator and the tcp.smtp that vpopmail wants to create.
71
72 No application should ever re-write configuration files as it goes,
73 there is too much potential for disaster, and ideally should have no
74 permissions to write to the files even.
75
76 [snip standard information about how qmail-smtpd uses tcpserver].
77
78 Worst case scenario:
79 somebody finds a way to exploit vpopmail and add arbitrary information
80 to your cdb-file. now they use your mail server to send spam etc. I can
81 simply turn off the extra relaying added in by vpopmail, and leave my
82 original (and seperate) tcp.smtp file intact.
83
84 > > A much better overall solution is to use the relay-ctrl package (see my
85 > > notes in the latest qmail conf-smtpd and courier-imap stuff about it).
86 > Ack.
87 Why 'Ack'? The relay-ctrl package is simply the RELAYCLIENT stuff
88 abstracted and made a lot more useful. It also doesn't violate my
89 configuration files. I don't see any convincing reasons why it is less
90 suitable than vpopmail's less than idea implementation of relay after
91 auth.
92
93 Another nastiness with vpopmail, is that is I wanted to remove the relay
94 after auth only, I'd have to recompile it, versus just flipping a
95 configuration setting.
96
97 --
98 Robin Hugh Johnson
99 E-Mail : robbat2@××××××××××××××.net
100 Home Page : http://www.orbis-terrarum.net/?l=people.robbat2
101 ICQ# : 30269588 or 41961639
102 GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
103
104
105
106
107
108 --
109 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] vpopmail's emerge directory structure Martin Lesser <gentoo@××××××××××.de>