9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] /mail/lib/rewrite and net!$smtp
@ 2019-12-07  0:54 Alex Musolino
  2019-12-07  1:13 ` kvik
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Musolino @ 2019-12-07  0:54 UTC (permalink / raw)
  To: 9fans

What about:

	% ndb/csquery /net/cs 'net!$smtp!25'

Or even:

	% ndb/csquery /net/cs 'tcp!$smtp!25'

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

* Re: [9fans] /mail/lib/rewrite and net!$smtp
  2019-12-07  0:54 [9fans] /mail/lib/rewrite and net!$smtp Alex Musolino
@ 2019-12-07  1:13 ` kvik
  0 siblings, 0 replies; 5+ messages in thread
From: kvik @ 2019-12-07  1:13 UTC (permalink / raw)
  To: 9fans

I'd start by making sure $smtp is expanded
from the environment or the ndb at all.
The error message:
	
	translating net!$smtp!smtp:

seems to suggest it isn't.

Try poking the ndb directly, like so:

	ndb/query ipnet 9front smtp

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

* Re: [9fans] /mail/lib/rewrite and net!$smtp
@ 2019-12-08  2:25 Steven Stallion
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Stallion @ 2019-12-08  2:25 UTC (permalink / raw)
  To: 9fans

> Thanks!  Unfortunately my MX host only exposes port 587 for relaying
> mail outside of the domain.  I suppose I could update cs to permit
> specifying a port number in ndb for $smtp, but I'm not sure that's any
> better than just specifying the relay host directly in rewrite.

I did some more poking around this evening and I think I've found a
slightly better approach.  Rather than try to embed the service string
in the smtp= entry in ndb, I appended it to the upas/smtp call in
/mail/lib/remotemail.  It's not as clean as I would like, but hey, at
least I'm a member of the net!$smtp club now.

Cheers,
Steve


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

* Re: [9fans] /mail/lib/rewrite and net!$smtp
  2019-12-07 21:10 ` [9fans] " Richard Miller
@ 2019-12-07 21:46   ` Steven Stallion
  0 siblings, 0 replies; 5+ messages in thread
From: Steven Stallion @ 2019-12-07 21:46 UTC (permalink / raw)
  To: 9fans

> Don't give up yet, it works for me:
> 
> term% ndb/csquery /net/cs 'net!$smtp!smtp'
> /net/tcp/clone 93.93.130.6!25
> /net/tcp/clone 93.93.131.52!25
> /net/tcp/clone 2a00:1098::86:1000:0:2:1!25
> /net/tcp/clone 2a00:1098::82:1000:0:2:1!25
> 
> In my /lib/ndb/local I have this:
> 
> ipnet=localnet
>         ip=192.168.0.0 ipmask=255.255.0.0
>         smtp=mx.mythic-beasts.com
>         ntp=pool.ntp.org
>         dnsdomain=hamnavoe.com
>         MAILSERVER=atom

Thanks!  Unfortunately my MX host only exposes port 587 for relaying
mail outside of the domain.  I suppose I could update cs to permit
specifying a port number in ndb for $smtp, but I'm not sure that's any
better than just specifying the relay host directly in rewrite.

Cheers,
Steve


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

* Re: [9fans] /mail/lib/rewrite and net!$smtp
  2019-12-07  0:13 Steven Stallion
@ 2019-12-07 21:10 ` Richard Miller
  2019-12-07 21:46   ` Steven Stallion
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Miller @ 2019-12-07 21:10 UTC (permalink / raw)
  To: 9fans

>         % ndb/csquery /net/cs 'net!$smtp!smtp'
>         translating net!$smtp!smtp: cs: can't translate address: dns: name does not exist

Don't give up yet, it works for me:

term% ndb/csquery /net/cs 'net!$smtp!smtp'
/net/tcp/clone 93.93.130.6!25
/net/tcp/clone 93.93.131.52!25
/net/tcp/clone 2a00:1098::86:1000:0:2:1!25
/net/tcp/clone 2a00:1098::82:1000:0:2:1!25

In my /lib/ndb/local I have this:

ipnet=localnet
	ip=192.168.0.0 ipmask=255.255.0.0
	smtp=mx.mythic-beasts.com
	ntp=pool.ntp.org
	dnsdomain=hamnavoe.com
	MAILSERVER=atom


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

end of thread, other threads:[~2019-12-08  2:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-07  0:54 [9fans] /mail/lib/rewrite and net!$smtp Alex Musolino
2019-12-07  1:13 ` kvik
  -- strict thread matches above, loose matches on Subject: below --
2019-12-08  2:25 Steven Stallion
2019-12-07  0:13 Steven Stallion
2019-12-07 21:10 ` [9fans] " Richard Miller
2019-12-07 21:46   ` Steven Stallion

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).