public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
@ 2013-11-14 14:33 Tanstaafl
  2013-11-14 15:28 ` Tanstaafl
  0 siblings, 1 reply; 9+ messages in thread
From: Tanstaafl @ 2013-11-14 14:33 UTC (permalink / raw
  To: gentoo-user

Hi all,

I'm trying to change one of my systems from sending without AUTH 
(works), to using AUTH (fails), going by the example in

/usr/share/portage/config/make.conf.example...

With this hosts IP in mynetworks (I use postfix), this works:

PORTAGE_ELOG_MAILURI="me@example.com smtp.example.com"

Changing the above to this:

PORTAGE_ELOG_MAILURI="me@example.com smtp.example.com 
myuser:mypassword@smtp.example.com:587"

fails (IP is still in mynetworks, but my goal is to remove it) with the 
following errors (last few lines being most significant I think?):

> Traceback (most recent call last):
>   File "/usr/bin/emerge", line 50, in <module>
>     retval = emerge_main()
>   File "/usr/lib64/portage/pym/_emerge/main.py", line 1031, in emerge_main
>     return run_action(emerge_config)
>   File "/usr/lib64/portage/pym/_emerge/actions.py", line 4062, in run_action
>     emerge_config.args, spinner)
>   File "/usr/lib64/portage/pym/_emerge/actions.py", line 453, in action_build
>     retval = mergetask.merge()
>   File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1019, in merge
>     rval = self._merge()
>   File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1408, in _merge
>     self._main_loop()
>   File "/usr/lib64/portage/pym/_emerge/Scheduler.py", line 1385, in _main_loop
>     self._event_loop.iteration()
>   File "/usr/lib64/portage/pym/portage/util/_eventloop/EventLoop.py", line 268, in iteration
>     if not x.callback(f, event, *x.args):
>   File "/usr/lib64/portage/pym/portage/util/_async/PipeLogger.py", line 133, in _output_handler
>     self._unregister_if_appropriate(event)
>   File "/usr/lib64/portage/pym/_emerge/AbstractPollTask.py", line 129, in _unregister_if_appropriate
>     self.wait()
>   File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
>     self._wait_hook()
>   File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
>     self._exit_listener_stack.pop()(self)
>   File "/usr/lib64/portage/pym/_emerge/SpawnProcess.py", line 168, in _pipe_logger_exit
>     self.wait()
>   File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 57, in wait
>     self._wait_hook()
>   File "/usr/lib64/portage/pym/_emerge/AsynchronousTask.py", line 175, in _wait_hook
>     self._exit_listener_stack.pop()(self)
>   File "/usr/lib64/portage/pym/_emerge/EbuildMerge.py", line 57, in _merge_exit
>     self.exit_hook(self)
>   File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 403, in _install_exit
>     self._unlock_builddir()
>   File "/usr/lib64/portage/pym/_emerge/EbuildBuild.py", line 289, in _unlock_builddir
>     portage.elog.elog_process(self.pkg.cpv, self.settings)
>   File "/usr/lib64/portage/pym/portage/elog/__init__.py", line 175, in elog_process
>     m.process(mysettings, str(key), mod_logentries, mod_fulllog)
>   File "/usr/lib64/portage/pym/portage/elog/mod_mail.py", line 39, in process
>     portage.mail.send_mail(mysettings, mymessage)
>   File "/usr/lib64/portage/pym/portage/mail.py", line 116, in send_mail
>     myrecipient, mymailuri = mysettings["PORTAGE_ELOG_MAILURI"].split()
> ValueError: too many values to unpack
> myhost : Thu Nov 14, 09:22:57 : ~

any ideas why this is failing like this?

Thanks,

Charles


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 14:33 [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails Tanstaafl
@ 2013-11-14 15:28 ` Tanstaafl
  2013-11-14 15:55   ` Tanstaafl
  0 siblings, 1 reply; 9+ messages in thread
From: Tanstaafl @ 2013-11-14 15:28 UTC (permalink / raw
  To: gentoo-user

On 2013-11-14 9:33 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
> Hi all,
>
> I'm trying to change one of my systems from sending without AUTH
> (works), to using AUTH (fails), going by the example in
>
> /usr/share/portage/config/make.conf.example...
>
> With this hosts IP in mynetworks (I use postfix), this works:
>
> PORTAGE_ELOG_MAILURI="me@example.com smtp.example.com"
>
> Changing the above to this:
>
> PORTAGE_ELOG_MAILURI="me@example.com smtp.example.com
> myuser:mypassword@smtp.example.com:587"
>
> fails (IP is still in mynetworks, but my goal is to remove it) with the
> following errors (last few lines being most significant I think?):

Nevermind, removed the smtp.example.com entry that wasn't supposed to be 
there...

Now to get SASL_AUTH working...


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 15:28 ` Tanstaafl
@ 2013-11-14 15:55   ` Tanstaafl
  2013-11-14 16:16     ` Tanstaafl
  2013-11-14 20:30     ` Alan McKinnon
  0 siblings, 2 replies; 9+ messages in thread
From: Tanstaafl @ 2013-11-14 15:55 UTC (permalink / raw
  To: gentoo-user

On 2013-11-14 10:28 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
> Nevermind, removed the smtp.example.com entry that wasn't supposed to be
> there...
>
> Now to get SASL_AUTH working...

Ok, imnsho, the comments in /usr/share/portage/config/make.conf.example 
are not sufficiently explicit...

> #                           port:       port to use on the given smtp server (defaults to 25, values > 100000 indicate that starttls should be used on (port-100000))
> #                       Examples:
> #PORTAGE_ELOG_MAILURI="root@localhost localhost" (this is also the default setting)
> #PORTAGE_ELOG_MAILURI="user@some.domain mail.some.domain" (sends mails to user@some.domain using the mailserver mail.some.domain)
> #PORTAGE_ELOG_MAILURI="user@some.domain user:secret@mail.some.domain:100465" (this is left uncommented as a reader exercise ;)

It is unclear from this text that the first three characters of the 
specified port are IGNORED...

I had been trying user:secret@mail.some.domain:587, and it kept failing 
as if it wasn't using STARTTLS... then I started down a rabbit hole of 
trying to configure postfix's sasl client, then decided that was way 
overkill for what I was trying to accomplish...

Then in a flash of inspiration, I decided to try 100587 for the port and 
it just worked.

Anyway, on to prepping for building my first initramfs this weekend...


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 15:55   ` Tanstaafl
@ 2013-11-14 16:16     ` Tanstaafl
  2013-11-14 20:32       ` Alan McKinnon
  2013-11-14 20:30     ` Alan McKinnon
  1 sibling, 1 reply; 9+ messages in thread
From: Tanstaafl @ 2013-11-14 16:16 UTC (permalink / raw
  To: gentoo-user

On 2013-11-14 10:55 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
> I had been trying user:secret@mail.some.domain:587, and it kept failing
> as if it wasn't using STARTTLS... then I started down a rabbit hole of
> trying to configure postfix's sasl client, then decided that was way
> overkill for what I was trying to accomplish...
>
> Then in a flash of inspiration, I decided to try 100587 for the port and
> it just worked.

Ok, another bump...

I had changed the password to something simple for testing, and now, 
after changing it back to my strong password, it fails with:

"invalid SMTP AUTH configuration, trying unauthenticated"

The password has two special characters in it that I'm sure are 
problematic - a colon and a pipe symbol (I use a password generator, and 
would prefer to use my same system without modification, if possible) - 
so, how can I 'wrap' it so that it doesn't matter what characters are in 
the password?

I tried setting the username+password as a variable and using that:

USER_PASS="user:pass"

But it still failed with the same error..


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 15:55   ` Tanstaafl
  2013-11-14 16:16     ` Tanstaafl
@ 2013-11-14 20:30     ` Alan McKinnon
  2013-11-14 20:56       ` Tanstaafl
  1 sibling, 1 reply; 9+ messages in thread
From: Alan McKinnon @ 2013-11-14 20:30 UTC (permalink / raw
  To: gentoo-user

On 14/11/2013 17:55, Tanstaafl wrote:
> On 2013-11-14 10:28 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
>> Nevermind, removed the smtp.example.com entry that wasn't supposed to be
>> there...
>>
>> Now to get SASL_AUTH working...
> 
> Ok, imnsho, the comments in /usr/share/portage/config/make.conf.example
> are not sufficiently explicit...
> 
>> #                           port:       port to use on the given smtp
>> server (defaults to 25, values > 100000 indicate that starttls should
>> be used on (port-100000))
>> #                       Examples:
>> #PORTAGE_ELOG_MAILURI="root@localhost localhost" (this is also the
>> default setting)
>> #PORTAGE_ELOG_MAILURI="user@some.domain mail.some.domain" (sends mails
>> to user@some.domain using the mailserver mail.some.domain)
>> #PORTAGE_ELOG_MAILURI="user@some.domain
>> user:secret@mail.some.domain:100465" (this is left uncommented as a
>> reader exercise ;)
> 
> It is unclear from this text that the first three characters of the
> specified port are IGNORED...
> 
> I had been trying user:secret@mail.some.domain:587, and it kept failing
> as if it wasn't using STARTTLS... then I started down a rabbit hole of
> trying to configure postfix's sasl client, then decided that was way
> overkill for what I was trying to accomplish...
> 
> Then in a flash of inspiration, I decided to try 100587 for the port and
> it just worked.
> 
> Anyway, on to prepping for building my first initramfs this weekend...
> 


You used the words "it is unclear".

I think you are being way too kind. I hadn't read that doc until you
posted this thread, so when I did read it my reaction was ... let's just
say it was unprintable and involved repeated excessive use of the words
"fuck", "moron", "brain donor" and other such things. Not directed at
you of course, but at the document author.

Of all the brain-dead stupid ideas I've seen in IT, that one rates up
there with the best of them. Hidden magic behaviour triggered by hidden
magic data that is in direct opposition to how we have done port
assignments for 30 years at least.

Thanks for bringing this to the attention of the list as a whole.

-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 16:16     ` Tanstaafl
@ 2013-11-14 20:32       ` Alan McKinnon
  2013-11-15 18:19         ` Tanstaafl
  0 siblings, 1 reply; 9+ messages in thread
From: Alan McKinnon @ 2013-11-14 20:32 UTC (permalink / raw
  To: gentoo-user

On 14/11/2013 18:16, Tanstaafl wrote:
> On 2013-11-14 10:55 AM, Tanstaafl <tanstaafl@libertytrek.org> wrote:
>> I had been trying user:secret@mail.some.domain:587, and it kept failing
>> as if it wasn't using STARTTLS... then I started down a rabbit hole of
>> trying to configure postfix's sasl client, then decided that was way
>> overkill for what I was trying to accomplish...
>>
>> Then in a flash of inspiration, I decided to try 100587 for the port and
>> it just worked.
> 
> Ok, another bump...
> 
> I had changed the password to something simple for testing, and now,
> after changing it back to my strong password, it fails with:
> 
> "invalid SMTP AUTH configuration, trying unauthenticated"
> 
> The password has two special characters in it that I'm sure are
> problematic - a colon and a pipe symbol (I use a password generator, and
> would prefer to use my same system without modification, if possible) -
> so, how can I 'wrap' it so that it doesn't matter what characters are in
> the password?
> 
> I tried setting the username+password as a variable and using that:
> 
> USER_PASS="user:pass"
> 
> But it still failed with the same error..


Quoting rules. Ugh. I've found only two methods that work in real life,
neither satisfactory:

1. Start almost randomly escaping suspect characters with single,
quotes, double quotes and backslashes till you find a combination that
works. Then remove things one at a time and try infer what the rules area

2. Read the code

Not the answer you were looking for, sorry about that, but I got nothing
better.


-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 20:30     ` Alan McKinnon
@ 2013-11-14 20:56       ` Tanstaafl
  2013-11-14 22:20         ` Alan McKinnon
  0 siblings, 1 reply; 9+ messages in thread
From: Tanstaafl @ 2013-11-14 20:56 UTC (permalink / raw
  To: gentoo-user

On 2013-11-14 3:30 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> You used the words "it is unclear".
>
> I think you are being way too kind.

Heh... I know, I was like, wtf??? Why in Zeus' name wouldn't they just 
specify the actual port like every other software I've ever used does.

I guess there was probably a reason someone did this, but I'd honestly 
like to hear it before I pronounce them a moron... ;)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 20:56       ` Tanstaafl
@ 2013-11-14 22:20         ` Alan McKinnon
  0 siblings, 0 replies; 9+ messages in thread
From: Alan McKinnon @ 2013-11-14 22:20 UTC (permalink / raw
  To: gentoo-user

On 14/11/2013 22:56, Tanstaafl wrote:
> On 2013-11-14 3:30 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
>> You used the words "it is unclear".
>>
>> I think you are being way too kind.
> 
> Heh... I know, I was like, wtf??? Why in Zeus' name wouldn't they just
> specify the actual port like every other software I've ever used does.
> 
> I guess there was probably a reason someone did this, but I'd honestly
> like to hear it before I pronounce them a moron... ;)
> 


Yes, let's rather do it your way.

You show patience and tolerance, I have neither.
(I'm slowly learning a useful human skill - knowing when to shut up).



-- 
Alan McKinnon
alan.mckinnon@gmail.com



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails
  2013-11-14 20:32       ` Alan McKinnon
@ 2013-11-15 18:19         ` Tanstaafl
  0 siblings, 0 replies; 9+ messages in thread
From: Tanstaafl @ 2013-11-15 18:19 UTC (permalink / raw
  To: gentoo-user

On 2013-11-14 3:32 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
> On 14/11/2013 18:16, Tanstaafl wrote:
>> I had changed the password to something simple for testing, and now,
>> after changing it back to my strong password, it fails with:
>>
>> "invalid SMTP AUTH configuration, trying unauthenticated"
>>
>> The password has two special characters in it that I'm sure are
>> problematic - a colon and a pipe symbol (I use a password generator, and
>> would prefer to use my same system without modification, if possible) -
>> so, how can I 'wrap' it so that it doesn't matter what characters are in
>> the password?
>>
>> I tried setting the username+password as a variable and using that:
>>
>> USER_PASS="user:pass"
>>
>> But it still failed with the same error..

> Quoting rules. Ugh. I've found only two methods that work in real life,
> neither satisfactory:
>
> 1. Start almost randomly escaping suspect characters with single,
> quotes, double quotes and backslashes till you find a combination that
> works. Then remove things one at a time and try infer what the rules area
>
> 2. Read the code
>
> Not the answer you were looking for, sorry about that, but I got nothing
> better.

Thanks Alan... well, I decided this just wasn't worth the hassle, so I 
bit the bullet and made a really long (30 characters) random jumble of 
letters and numbers for the password. I had to create a special account 
in my password management app (passwordmaker firefox extension) just for 
this use, but it works, and is secure enough for me to be able to sleep 
at night. :)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-11-15 18:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-14 14:33 [gentoo-user] Changing mailuri for emailing emerge logs - AUTH version fails Tanstaafl
2013-11-14 15:28 ` Tanstaafl
2013-11-14 15:55   ` Tanstaafl
2013-11-14 16:16     ` Tanstaafl
2013-11-14 20:32       ` Alan McKinnon
2013-11-15 18:19         ` Tanstaafl
2013-11-14 20:30     ` Alan McKinnon
2013-11-14 20:56       ` Tanstaafl
2013-11-14 22:20         ` Alan McKinnon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox