1 |
Neil Bothwick schrieb: |
2 |
> On Sun, 23 Jul 2006 14:27:22 +0200, Alexander Skwar wrote: |
3 |
> |
4 |
>> >> Sending mail with directly speaking SMTP isn't. That's the job |
5 |
>> >> of a MTA. |
6 |
>> > |
7 |
>> > What if you don't have an MTA installed, which is how this question |
8 |
>> > arose? |
9 |
>> |
10 |
>> Then you install one. |
11 |
> |
12 |
> That's not an acceptable answer for a core system service. |
13 |
|
14 |
Yes, it is, as sending out mail isn't a core system service. |
15 |
|
16 |
> Portage |
17 |
> should, and can, be able to do its job using the standard Python mail |
18 |
> transport methods. |
19 |
|
20 |
Portage can only send out mail after a network connection has been |
21 |
setup. Thus, we're already after the "core system setup". Finally, |
22 |
system software like some cron daemons (eg. fcron) already depend |
23 |
on an MTA (although I don't quite understand, why fcron depends on |
24 |
an MTA and vixie-cron doesn't. This doesn't make sense to me.). |
25 |
|
26 |
>> > Talking SMTP is how all my mail-sending software communicates with |
27 |
>> > it. |
28 |
>> |
29 |
>> cron? |
30 |
> |
31 |
> Fair comment, I forgot about that one, which uses ssmtp. |
32 |
|
33 |
No, it doesn't use ssmtp, it uses /usr/sbin/sendmail. |
34 |
|
35 |
Now, ssmtp provides this "interface", that's of course true. But |
36 |
cron works equally well, if the ssmtp MTA is replaced by, say, postfix. |
37 |
|
38 |
> In my defence, |
39 |
> our month-old grandson stayed with us last night - sleep-deprivation is a |
40 |
> b*******! |
41 |
|
42 |
;) Tell me about it. It's so freaking hot in Germany lately, that |
43 |
it's hard to find sleep (at least for me it is hard). |
44 |
|
45 |
>> >> > Why not let portage work with the same SMTP server you use for all |
46 |
>> >> > other mail? |
47 |
>> >> |
48 |
>> >> Why make me configure SMTP in two places (MTA and Portage)? |
49 |
>> > |
50 |
>> > That's a separate question. |
51 |
>> |
52 |
>> No, it's not. |
53 |
> |
54 |
> It is, but it doesn't matter.You should not be "made" to configure mail |
55 |
> in two places if you have an MTA, I never disagreed with that. But |
56 |
> equally, you should not be forced to install an MTA. |
57 |
|
58 |
But you aren't forced - by default, portage doesn't even send out |
59 |
mails. The user has to configure this. |
60 |
|
61 |
But it would actually be *very* easy to make this a default, if |
62 |
the IMO stupid dependency on SMTP would be dumped. If it were, |
63 |
it could always use /usr/sbin/sendmail to send mails to, lets |
64 |
say, portage@localhost and the user could then set up an alias |
65 |
to get the mail to the wanted place. No *NEED* to configure the |
66 |
recipient address in make.conf anymore. |
67 |
|
68 |
Now, if there isn't a (working) /usr/sbin/sendmail, then |
69 |
no mail is sent out. Just like it's now right after install. |
70 |
But as soon as standard methods (/usr/sbin/sendmail) become |
71 |
available, portage mails "just work". |
72 |
|
73 |
>> > It's trivial to configure portage to use a |
74 |
>> > local MTA if you have one. |
75 |
>> |
76 |
>> No, it's not *trivial*. It's not hard, but trivial... No. |
77 |
> |
78 |
> Uncommenting the relevant line and changing the email address to your own |
79 |
> seems trivial to me. |
80 |
|
81 |
That's not quite true. Eg. if you've got a username with an @, you're |
82 |
in trouble, see <https://bugs.gentoo.org/show_bug.cgi?id=116984>. |
83 |
|
84 |
This could be circumvented (or shifted to another place) by dumping |
85 |
the use of SMTP. |
86 |
|
87 |
>> > If you want to use sendmail instead, why not |
88 |
>> > submit a bug report, preferably with a patch? |
89 |
>> |
90 |
>> PORTAGE_ELOG_COMMAND exists. I'd rather suggest to dump the |
91 |
>> wasteful SMTP support. But I doubt that such a good suggestion |
92 |
>> would be welcome - rather the Windows is chosen. |
93 |
> |
94 |
> It's not wasteful, as it provides an easy option for many people and it |
95 |
> uses existing software. |
96 |
|
97 |
It IS wasteful, as it doesn't use existing, standard software and |
98 |
as it re-implements a functionality, which is very likely to be |
99 |
present already. |
100 |
|
101 |
> Look at the code and you'll see that all it does |
102 |
> is parse the address etc. from the config file and use it to send the |
103 |
> message via an smtplib function. Using sendmail would require about the |
104 |
> same amount of code, giving a choice of the two would only add a couple |
105 |
> of lines, which should suit everyone. |
106 |
|
107 |
Here some lines, there some lines. That's how waste and bloat |
108 |
is made. This bloat and waste can be circumvented, by using |
109 |
standard tools. |
110 |
|
111 |
>> > But don't force all those people without an MTA to install one just |
112 |
>> > because it's easier for you. |
113 |
>> |
114 |
>> Well, don't force me to use SMTP, just because it's easier for you! |
115 |
> |
116 |
> I'm not, I didn't write portage! |
117 |
|
118 |
That's lame :) I don't force you to do anything either, for the |
119 |
exact same reason. |
120 |
|
121 |
>> And also don't force me, to write "complicated" scripts, just because |
122 |
>> it's easier for you! |
123 |
> |
124 |
> It's easier for me because it's there and it works. |
125 |
|
126 |
It's harder for me and many other people, as an MTA will very likely |
127 |
be present. |
128 |
|
129 |
So, don't force me to do something, just because it's easier for you! |
130 |
|
131 |
>> If portage would use the standard ways of sending |
132 |
>> mail, ie. /usr/sbin/sendmail, than this script wouldn't be necessary. |
133 |
>> MAYBE SMTP could be added as an *OPTION* - but I'd not add this, it's |
134 |
>> bloat. |
135 |
> |
136 |
> It's not bloat, because the code is already there. |
137 |
|
138 |
It is bloat, as the same function is handled by a seperate, and |
139 |
more standard implementation. Function := Get mail off the system with |
140 |
SMTP. |
141 |
|
142 |
>> > Or |
143 |
>> > will ssmtp handle this correctly? |
144 |
>> |
145 |
>> What "this"? |
146 |
> |
147 |
> Sending mail from portage as per the OP's question. |
148 |
|
149 |
No, SSMTP doesn't do this, as Portage doesn't use standard |
150 |
Unix ways to send out mail, because Portage only can do |
151 |
SMTP and not use /usr/sbin/sendmail. The OP wanted to talk to |
152 |
localhost - ssmtp isn't a SMTP server, and thus doesn't listen |
153 |
on localhost. |
154 |
|
155 |
>> With my howto, /usr/sbin/sendmail is used to send out |
156 |
>> mail. Benefit of this is, that the "SMTP configuration" (ie. name |
157 |
>> of (smart-)host and possibly username+password) only has to be set |
158 |
>> at one spot - in the configuration file of the MTA. What MTA is |
159 |
>> chosen, is basically upto the user - but Gentoo seems to prefer |
160 |
>> ssmtp, which is totally fine and also is, what I'd suggest, as ssmtp |
161 |
>> is so easy to configure and offer's all, that's needed. |
162 |
> |
163 |
> As I said, file a request on bugzilla. It sounds a reasonable option. |
164 |
|
165 |
https://bugs.gentoo.org/show_bug.cgi?id=141513 |
166 |
|
167 |
Alexander Skwar |
168 |
-- |
169 |
"I am ... a woman ... and ... technically a parasitic uterine growth" |
170 |
-- Sean Doran the Younger [allegedly] |
171 |
-- |
172 |
gentoo-user@g.o mailing list |