librelist archives

« back to archive

Lamson Issue.

Lamson Issue.

From:
Date:
2009-12-28 @ 19:36
I'm having a problem with the lamson server for some reason it's not
authenticating with the smart host (postfix) yet I have it configured to do
so.

relay_config = {'host': '192.168.62.187', 'port': 25, 'username': '***',
'password': '***', 'starttls': True, 'ssl': False, 'debug': 1}

 

 

Dec 28 14:22:19 localhost postfix/smtpd[30426]: connect from
mail[192.168.62.187]

Dec 28 14:22:19 localhost postfix/smtpd[30426]: NOQUEUE: reject: RCPT from
mail[192.168.62.187]: 554 5.7.1 <mail[192.168.62.187]>: Client host
rejected: Access denied; from=<kjones12@optonline.net> to=<c**@M**.com>
proto=ESMTP helo=<localhost.localdomain>

Dec 28 14:22:19 localhost postfix/smtpd[30426]: lost connection after RSET
from mail[192.168.62.187]

 

Any ideas ? I'm completely stuck J

Regards,

Kevin

 

Re: [lamson] Lamson Issue.

From:
Zed A. Shaw
Date:
2009-12-28 @ 19:48
On Mon, Dec 28, 2009 at 02:36:31PM -0500, kjones12@optonline.net wrote:
> I'm having a problem with the lamson server for some reason it's not
> authenticating with the smart host (postfix) yet I have it configured to do
> so.
> 
> relay_config = {'host': '192.168.62.187', 'port': 25, 'username': '***',
> 'password': '***', 'starttls': True, 'ssl': False, 'debug': 1}

> Any ideas ? I'm completely stuck J

Hmm, I'd say first make sure you can do it with a normal mail client
that can do this.  It looks like a postfix config, probably something to
do with either TLS restrictions or how you've configured the auth.  For
example, maybe it's got a different kind of username than you suspect,
like it's not an email address?

Also, try it without the TLS to see if that's the cause.

When you're testing this, use the lamson send command.  It uses the same
code as the relay to do the sending and has the same config options.
You can then test it from the command line and watch the debug output
right there.  Much easier.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [lamson] Lamson Issue.

From:
Date:
2009-12-28 @ 20:20
That's the odd thing using lamson send command works fine with it with
authentication. Why I thought I was missing something.
Kevin

-----Original Message-----
From: lamson@librelist.com [mailto:lamson@librelist.com] On Behalf Of Zed A.
Shaw
Sent: Monday, December 28, 2009 2:49 PM
To: lamson@librelist.com
Subject: Re: [lamson] Lamson Issue.

On Mon, Dec 28, 2009 at 02:36:31PM -0500, kjones12@optonline.net wrote:
> I'm having a problem with the lamson server for some reason it's not
> authenticating with the smart host (postfix) yet I have it configured to
do
> so.
> 
> relay_config = {'host': '192.168.62.187', 'port': 25, 'username': '***',
> 'password': '***', 'starttls': True, 'ssl': False, 'debug': 1}

> Any ideas ? I'm completely stuck J

Hmm, I'd say first make sure you can do it with a normal mail client
that can do this.  It looks like a postfix config, probably something to
do with either TLS restrictions or how you've configured the auth.  For
example, maybe it's got a different kind of username than you suspect,
like it's not an email address?

Also, try it without the TLS to see if that's the cause.

When you're testing this, use the lamson send command.  It uses the same
code as the relay to do the sending and has the same config options.
You can then test it from the command line and watch the debug output
right there.  Much easier.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [lamson] Lamson Issue.

From:
Gonzalo Delgado
Date:
2009-12-28 @ 20:50
El Mon, 28 Dec 2009 15:20:53 -0500
kjones12@optonline.net escribió:

> That's the odd thing using lamson send command works fine with it with
> authentication. Why I thought I was missing something.

Which version of Python are you running?
I think  smtplib.SMTP_SSL and/or starttls are not available in old (<=2.4)
python versions.

-- 
Gonzalo Delgado <gonzalodel@gmail.com>
http://gonzalodelgado.com.ar/

Re: [lamson] Lamson Issue.

From:
Date:
2009-12-28 @ 21:06
Ah that might be the issue I am running python 2.4.3

-----Original Message-----
From: lamson@librelist.com [mailto:lamson@librelist.com] On Behalf Of 
Gonzalo Delgado
Sent: Monday, December 28, 2009 3:51 PM
To: lamson@librelist.com
Subject: Re: [lamson] Lamson Issue.

El Mon, 28 Dec 2009 15:20:53 -0500
kjones12@optonline.net escribió:

> That's the odd thing using lamson send command works fine with it with 
> authentication. Why I thought I was missing something.

Which version of Python are you running?
I think  smtplib.SMTP_SSL and/or starttls are not available in old (<=2.4)
python versions.

--
Gonzalo Delgado <gonzalodel@gmail.com>
http://gonzalodelgado.com.ar/

Re: [lamson] Lamson Issue.

From:
Zed A. Shaw
Date:
2009-12-28 @ 20:37
On Mon, Dec 28, 2009 at 03:20:53PM -0500, kjones12@optonline.net wrote:
> That's the odd thing using lamson send command works fine with it with
> authentication. Why I thought I was missing something.

Weird, lamson send works but the relay doesn't?  Try this:

1) run lamson send and save the output to a file.
2) clear out logs/*
3) run your service and get it to do the same send from within lamson.
4) cut out the same portion from the logs (i think lamson.err) as you
got from the lamson send output.
5) diff them.  I'm sure you'll see some really obvious difference that
way.


-- 
Zed A. Shaw
http://zedshaw.com/

Re: [lamson] Lamson Issue.

From:
Date:
2009-12-28 @ 22:20
Via lamson send command
send: 'AUTH PLAIN AGNzLm15d2Vla2x5bWVhbHBsYW5uZXIAMzU1MTkyNg==\r\n'
reply: '235 2.7.0 Authentication successful\r\n'
reply: retcode (235); Msg: 2.7.0 Authentication successful
send: 'mail FROM:<root@localhost> size=181\r\n'
reply: '250 2.1.0 Ok\r\n'
reply: retcode (250); Msg: 2.1.0 Ok
send: 'rcpt TO:<customerservice@myweeklymealplanner.com>\r\n'
reply: '250 2.1.5 Ok\r\n'
reply: retcode (250); Msg: 2.1.5 Ok
send: 'data\r\n'
reply: '354 End data with <CR><LF>.<CR><LF>\r\n'
reply: retcode (354); Msg: End data with <CR><LF>.<CR><LF>
data: (354, 'End data with <CR><LF>.<CR><LF>')
send: 'MIME-Version: 1.0\r\nFrom: root@localhost\r\nSubject: Lamson\r\nTo:
customerservice@myweeklymealplanner.com\r\nContent-Type: text/plain;
charset="us-ascii"\r\nContent-Transfer-Encoding: 7bit\r\n\r\ntest\r
\n.\r\n'
reply: '250 2.0.0 Ok: queued as 1943C2215C\r\n'
reply: retcode (250); Msg: 2.0.0 Ok: queued as 1943C2215C
data: (250, '2.0.0 Ok: queued as 1943C2215C')
send: 'quit\r\n'
reply: '221 2.0.0 Bye\r\n'
reply: retcode (221); Msg: 2.0.0 Bye

Via the lamson server.
send: u'mail FROM:<kjones12@optonline.net> size=2573\r\n'
reply: '250 2.1.0 Ok\r\n'
reply: retcode (250); Msg: 2.1.0 Ok
send: u'rcpt TO:<customerservice@MyWeeklyMealPlanner.com>\r\n'
reply: '554 5.7.1 <mail[192.168.62.187]>: Client host rejected: Access
denied\r\n'
reply: retcode (554); Msg: 5.7.1 <mail[192.168.62.187]>: Client host
rejected: Access denied
send: 'rset\r\n'
reply: '250 2.0.0 Ok\r\n'
reply: retcode (250); Msg: 2.0.0 Ok

It doesn't try to authenticate.
Regards,
Kevin
P.S. confirmed I'm on python 2.6


-----Original Message-----
From: lamson@librelist.com [mailto:lamson@librelist.com] On Behalf Of Zed A.
Shaw
Sent: Monday, December 28, 2009 3:37 PM
To: lamson@librelist.com
Subject: Re: [lamson] Lamson Issue.

On Mon, Dec 28, 2009 at 03:20:53PM -0500, kjones12@optonline.net wrote:
> That's the odd thing using lamson send command works fine with it with
> authentication. Why I thought I was missing something.

Weird, lamson send works but the relay doesn't?  Try this:

1) run lamson send and save the output to a file.
2) clear out logs/*
3) run your service and get it to do the same send from within lamson.
4) cut out the same portion from the logs (i think lamson.err) as you
got from the lamson send output.
5) diff them.  I'm sure you'll see some really obvious difference that
way.


-- 
Zed A. Shaw
http://zedshaw.com/

Re: [lamson] Lamson Issue.

From:
Zed A. Shaw
Date:
2009-12-28 @ 22:54
On Mon, Dec 28, 2009 at 05:20:04PM -0500, kjones12@optonline.net wrote:
> Via lamson send command
...
> It doesn't try to authenticate.

Ohhhhhhhhhh, duh.  Did you by chance forget to change the config/boot.py
so that it used these config options?  By default it doesn't use any
options other than what's needed for normal send without auth.  You
probably just need to set them and you're set.

-- 
Zed A. Shaw
http://zedshaw.com/

Re: [lamson] Lamson Issue.

From:
Date:
2009-12-28 @ 23:46
That was it :) Thanks for all your help Zed.
Best Regards,
Kevin

-----Original Message-----
From: lamson@librelist.com [mailto:lamson@librelist.com] On Behalf Of Zed A.
Shaw
Sent: Monday, December 28, 2009 5:55 PM
To: lamson@librelist.com
Subject: Re: [lamson] Lamson Issue.

On Mon, Dec 28, 2009 at 05:20:04PM -0500, kjones12@optonline.net wrote:
> Via lamson send command
...
> It doesn't try to authenticate.

Ohhhhhhhhhh, duh.  Did you by chance forget to change the config/boot.py
so that it used these config options?  By default it doesn't use any
options other than what's needed for normal send without auth.  You
probably just need to set them and you're set.

-- 
Zed A. Shaw
http://zedshaw.com/