Re: Can't get OpenSMTPD to send mail to non-local addresses.

2011-08-04 Thread Gilles Chehade
On Wed, Aug 03, 2011 at 06:42:39PM -0600, Deraj Puma wrote:
> Hi!
>

Hi,

> [...]
> 
> Here's my smtpd.conf file:
> ---
> listen on dc0 tls
> map "aliases" { source db "/etc/mail/aliases.db" }
> map "secrets" { source db "/etc/mail/secrets.db" }
> accept for local alias aliases deliver to mbox
> accept from all for all deliver to mbox
> accept for all relay via "smtp.comcast.net" tls auth "secret"
> 

The ruleset is incorrect, the third rule will never be matched as the second
rule matches all sources and destinations. Right now, your ruleset says:

- mails coming from local host for local domains are delivered to mbox
- mails coming from anyone for any domain are delivered to mbox


> [...]
> command: RCPT TOargs: 
> smtp: got imsg_mfa_mail/rcpt
> 1312400157.txi0ogp2WYHpivhh: from=, relay=1000@localhost
> [IPv6:::1], stat=LocalError (530 5.0.0 Recipient rejected:
> myusern...@comcast.net)
> [...]
>

Which explains this LocalError as your local smtpd attempted to deliver
to the mbox of local user 'myusername'.

 
> All help is much appreciated!
> 

You need further tweaking of your smtpd.conf :-p

-- 
Gilles Chehade
http://u.poolp.org/~gilles/



Re: Can't get OpenSMTPD to send mail to non-local addresses.

2011-08-04 Thread Deraj Puma
On Thu, Aug 4, 2011 at 1:57 AM, Gilles Chehade  wrote:
> The ruleset is incorrect, the third rule will never be matched as the second
> rule matches all sources and destinations. Right now, your ruleset says:
>
> - mails coming from local host for local domains are delivered to mbox
> - mails coming from anyone for any domain are delivered to mbox
>

Ah, alright that makes sense.

> You need further tweaking of your smtpd.conf :-p
>

I tweaked it a bit further, and am running into an issue I don't quite
understand. I can send mail without getting an error but it never
arrives. The new conf is:
---
map secrets { source db "/etc/mail/secrets.db" }
+accept from all for domain mydomain deliver to mbox
+accept for all relay via smtp.comcast.net tls auth "secrets"

The error is:
---
lka: smtp.comcast.net secret lookup (0)
smtp.comcast.net secret not found
mta: new status for email@address: 190 secrets lookup failed

/etc/mail/secrets.db is owned by root and _smtpd is its group. I'm
guessing I'm missing something really basic again but I don't know
what. By the way, secrets is of the form username:password and I
followed the steps outlined in smtpd.conf(5) to generate the database.

> --
> Gilles Chehade
> http://u.poolp.org/~gilles/
>

Thanks a lot for your time!



Re: Can't get OpenSMTPD to send mail to non-local addresses.

2011-08-04 Thread Deraj Puma
On Thu, Aug 4, 2011 at 11:46 AM, Deraj Puma  wrote:
> The error is:
> ---
> lka: smtp.comcast.net secret lookup (0)
> smtp.comcast.net secret not found
> mta: new status for email@address: 190 secrets lookup failed
>

I deleted both secrets and secrets.db and did it over again. It works
now. I must have fatfingered my password.

Thanks, Gilles, for setting me straight initially!



Re: Can't get OpenSMTPD to send mail to non-local addresses.

2011-08-05 Thread Gilles Chehade
Hi,

On Thu, Aug 04, 2011 at 11:46:24AM -0600, Deraj Puma wrote:
>
> [...]
> 
> I tweaked it a bit further, and am running into an issue I don't quite
> understand. I can send mail without getting an error but it never
> arrives. The new conf is:
> ---
> map secrets { source db "/etc/mail/secrets.db" }
> +accept from all for domain mydomain deliver to mbox
> +accept for all relay via smtp.comcast.net tls auth "secrets"
> 
> The error is:
> ---
> lka: smtp.comcast.net secret lookup (0)
> smtp.comcast.net secret not found
> mta: new status for email@address: 190 secrets lookup failed
> 
> /etc/mail/secrets.db is owned by root and _smtpd is its group. I'm
> guessing I'm missing something really basic again but I don't know
> what. By the way, secrets is of the form username:password and I
> followed the steps outlined in smtpd.conf(5) to generate the database.
> 

Without seeing your /etc/mail/secrets, I'm going to have a hard time
helping you. Just send it back and replace your username with U and
your password with P, this way I can at least check that it has the
correct format.

Does it also fail with source plain ?
How did you generate the secrets.db ?

Gilles

-- 
Gilles Chehade
http://u.poolp.org/~gilles/



Re: Can't get OpenSMTPD to send mail to non-local addresses.

2011-08-05 Thread Gilles Chehade
On Thu, Aug 04, 2011 at 02:31:20PM -0600, Deraj Puma wrote:
> On Thu, Aug 4, 2011 at 11:46 AM, Deraj Puma  wrote:
> > The error is:
> > ---
> > lka: smtp.comcast.net secret lookup (0)
> > smtp.comcast.net secret not found
> > mta: new status for email@address: 190 secrets lookup failed
> >
> 
> I deleted both secrets and secrets.db and did it over again. It works
> now. I must have fatfingered my password.
> 
> Thanks, Gilles, for setting me straight initially!
> 

good good, less bug fixes for me ;-)

-- 
Gilles Chehade
http://u.poolp.org/~gilles/