9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] pipefrom fun
@ 2009-08-20 23:47 maht-9fans
  2009-08-21  0:58 ` erik quanstrom
  2009-08-21  4:39 ` Russ Cox
  0 siblings, 2 replies; 8+ messages in thread
From: maht-9fans @ 2009-08-20 23:47 UTC (permalink / raw)
  To: 9fans

All being well this is a mail routed by my pipefrom

/n/sources/contrib/maht/rc/pipefrom

It has seen the outgoing address  of "9fans" and changed it to "9fans@9fans.net"
It has seen the outgoing address of "9fans@9fans.net" and set upasname to be "maht-9fans@maht0x0r.net"





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

* Re: [9fans] pipefrom fun
  2009-08-20 23:47 [9fans] pipefrom fun maht-9fans
@ 2009-08-21  0:58 ` erik quanstrom
  2009-08-21  7:28   ` matt
  2009-08-21  4:39 ` Russ Cox
  1 sibling, 1 reply; 8+ messages in thread
From: erik quanstrom @ 2009-08-21  0:58 UTC (permalink / raw)
  To: 9fans

On Thu Aug 20 20:53:27 EDT 2009, maht-9fans@maht0x0r.net wrote:
> All being well this is a mail routed by my pipefrom
>
> /n/sources/contrib/maht/rc/pipefrom
>
> It has seen the outgoing address  of "9fans" and changed it to "9fans@9fans.net"
> It has seen the outgoing address of "9fans@9fans.net" and set upasname to be "maht-9fans@maht0x0r.net"
>

why not use /mail/lib/names.local for the first example?

i haven't read the script, though.

; ls -l  /n/sources/contrib/maht/rc/pipefrom
--rwx--x--x M 675 maht sys 1107 Aug 20 20:50 /n/sources/contrib/maht/rc/pipefrom

one thing i've thought would be useful since people mail from
many places with many names is a translation from a set of from
addresses to a mailbox name so that, e.g. the ned f command doesn't
end up creating a bunch of folders for the same person.

- erik



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

* Re: [9fans] pipefrom fun
  2009-08-20 23:47 [9fans] pipefrom fun maht-9fans
  2009-08-21  0:58 ` erik quanstrom
@ 2009-08-21  4:39 ` Russ Cox
  2009-08-21  7:59   ` matt
  1 sibling, 1 reply; 8+ messages in thread
From: Russ Cox @ 2009-08-21  4:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

pipefrom is too late to rewrite outgoing addresses,
because marshal has already written the To:
line with the local address.  Your post says
    To: 9fans@steponnopets.net
You can create /mail/box/$user/names
to get aliases that won't go out.

http://9fans.net/archive/2004/01/530
http://9fans.net/archive/2004/01/533
http://9fans.net/archive/2004/04/99  # ,s/%/@/g I think

Russ


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

* Re: [9fans] pipefrom fun
  2009-08-21  0:58 ` erik quanstrom
@ 2009-08-21  7:28   ` matt
  2009-08-21 12:33     ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: matt @ 2009-08-21  7:28 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs


>why not use /mail/lib/names.local for the first example?
>

good point, upon my brief look the answer would be, although I can
contrive upon boot to use a different file, in the general case, users
can't edit it.

>i haven't read the script, though.
>
>; ls -l  /n/sources/contrib/maht/rc/pipefrom
>--rwx--x--x M 675 maht sys 1107 Aug 20 20:50 /n/sources/contrib/maht/rc/pipefrom
>
>
I fixed that, oops thanks

>one thing i've thought would be useful since people mail from
>many places with many names is a translation from a set of from
>addresses to a mailbox name so that, e.g. the ned f command doesn't
>end up creating a bunch of folders for the same person.
>
>
I'll consider that when I get round to pipeto



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

* Re: [9fans] pipefrom fun
  2009-08-21  4:39 ` Russ Cox
@ 2009-08-21  7:59   ` matt
  2009-08-21 13:48     ` Russ Cox
  0 siblings, 1 reply; 8+ messages in thread
From: matt @ 2009-08-21  7:59 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Russ Cox wrote:

>pipefrom is too late to rewrite outgoing addresses,
>because marshal has already written the To:

I submitted a patch for marshal to do the From: part but was told I
should use pipefrom instead. I'll stick a sed in the send see how that
works out :>

>line with the local address.  Your post says
>    To: 9fans@steponnopets.net
>
>
dammit, I obviously had missed that when I was testing it

>You can create /mail/box/$user/names
>to get aliases that won't go out.
>
>http://9fans.net/archive/2004/01/530
>http://9fans.net/archive/2004/01/533
>http://9fans.net/archive/2004/04/99  # ,s/%/@/g I think
>
>
>
>
Thanks I'll give those a read





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

* Re: [9fans] pipefrom fun
  2009-08-21  7:28   ` matt
@ 2009-08-21 12:33     ` erik quanstrom
  0 siblings, 0 replies; 8+ messages in thread
From: erik quanstrom @ 2009-08-21 12:33 UTC (permalink / raw)
  To: 9fans

> >one thing i've thought would be useful since people mail from
> >many places with many names is a translation from a set of from
> >addresses to a mailbox name so that, e.g. the ned f command doesn't
> >end up creating a bunch of folders for the same person.
> >
> >
> I'll consider that when I get round to pipeto

that has nothing to do with pipeto.  it would be a big mistake
to modify the sender in an email!  the dread libcommon needs
modification.

little known fact:  mail quanstro/folder will deliver directly to
folder rather than inbox.  many email gateways dislike this,
so you can rewrite
\l\.quanstro.net!([^+]+)\+([^+]+)	alias		\1/\2

if you're using nupas, which is a good idea if you have an internet-
facing smtpd, i'll consider patches.  but i'm a little leery of adding
yet more complicated rules for frobnication of the sent message.
does your script work with mail sent through the imap server?

since you set upasname, marshal already tries to add
/mail/box/upasname/headers, this already solves all of your problem
except setting upasname automaticly.

finally, the reason your To: address did get rewritten is that send, which
is invoked by marshal does yet more rewriting of the from,

- erik



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

* Re: [9fans] pipefrom fun
  2009-08-21  7:59   ` matt
@ 2009-08-21 13:48     ` Russ Cox
  2009-08-21 14:55       ` erik quanstrom
  0 siblings, 1 reply; 8+ messages in thread
From: Russ Cox @ 2009-08-21 13:48 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Fri, Aug 21, 2009 at 12:59 AM, matt<maht-9fans@maht0x0r.net> wrote:
>> pipefrom is too late to rewrite outgoing addresses,
>> because marshal has already written the To:
>
> I submitted a patch for marshal to do the From: part but was told I should
> use pipefrom instead. I'll stick a sed in the send see how that works out :>

They're separate issues, which might not have
come across in my earlier mail.

Rewriting of To: must be done in marshal and is
supported by editing /mail/box/$user/names.

Rewriting of From: is the reason for pipefrom.

Russ


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

* Re: [9fans] pipefrom fun
  2009-08-21 13:48     ` Russ Cox
@ 2009-08-21 14:55       ` erik quanstrom
  0 siblings, 0 replies; 8+ messages in thread
From: erik quanstrom @ 2009-08-21 14:55 UTC (permalink / raw)
  To: 9fans

> Rewriting of From: is the reason for pipefrom.

in the simple case, From:  can be rewritten with
/mail/box/$upasname/headers

- erik



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

end of thread, other threads:[~2009-08-21 14:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 23:47 [9fans] pipefrom fun maht-9fans
2009-08-21  0:58 ` erik quanstrom
2009-08-21  7:28   ` matt
2009-08-21 12:33     ` erik quanstrom
2009-08-21  4:39 ` Russ Cox
2009-08-21  7:59   ` matt
2009-08-21 13:48     ` Russ Cox
2009-08-21 14:55       ` erik quanstrom

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).