9front - general discussion about 9front
 help / color / mirror / Atom feed
* rewrite rules -- explanations?
@ 2020-10-04 23:35 ori
  2020-10-04 23:55 ` [9front] " Lyndon Nerenberg
  0 siblings, 1 reply; 2+ messages in thread
From: ori @ 2020-10-04 23:35 UTC (permalink / raw)
  To: 9front

I'm looking at simplifying our default mail configuration,
and I don't understand what some of our rules are doing.
I'm aware that email has a messy history, but I don't know
enough to know what the goal of some of the rules are and
whether they're stil relevant.

This one makes sense to me: substitute aliases.
	
	# translate local aliases from /mail/lib/namefiles
	\"(.+)\"		translate	"/bin/upas/aliasmail '\1'"
	[^!@.]+			translate	"/bin/upas/aliasmail '&'"

This one kind of makes sense, though if we encourage
people to use 'upasname', it seems unnecessary to put
in here by default. The new remotemail script works if
we don't do this rewrite.

	# append the local domain to addresses without a domain
	local!"(.+)"		alias		\1@YOURDOMAIN.DOM
	local!(.*)		alias		\1@YOURDOMAIN.DOM

The following two don't make much sense to me: What generates
chains of '@'s, and why do we convert to them before converting
to '!'? Is this something old email servers used to generate?
Is it still relevant?

	# convert source domain address to a chain a@b@c@d...
	@([^@!,]*):([^!@]*)@([^!]*)		alias	\2@\3@\1
	@([^@!]*),@([^!@,]*):([^!@]*)@([^!]*)	alias	@\1:\3@\4@\2
	
	# convert a chain a@b@c@d... to ...d!c!b!a
	([^@]+)@([^@]+)@(.+)	alias		\2!\1@\3
	([^@]+)@([^@]+)		alias		\2!\1

And, sending the email makes sense:

	# send all mail to the gateway or mail server, $smtp,  for delivery
	([^!]*)!(.*) 		| 		"/mail/lib/qmail '\s' 'net!$smtp'" "'\2@\1'"



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

* Re: [9front] rewrite rules -- explanations?
  2020-10-04 23:35 rewrite rules -- explanations? ori
@ 2020-10-04 23:55 ` Lyndon Nerenberg
  0 siblings, 0 replies; 2+ messages in thread
From: Lyndon Nerenberg @ 2020-10-04 23:55 UTC (permalink / raw)
  To: 9front

> The following two don't make much sense to me: What generates
> chains of '@'s, and why do we convert to them before converting
> to '!'? Is this something old email servers used to generate?
> Is it still relevant?
>
> 	# convert source domain address to a chain a@b@c@d...
> 	@([^@!,]*):([^!@]*)@([^!]*)		alias	\2@\3@\1
> 	@([^@!]*),@([^!@,]*):([^!@]*)@([^!]*)	alias	@\1:\3@\4@\2
> 	
> 	# convert a chain a@b@c@d... to ...d!c!b!a
> 	([^@]+)@([^@]+)@(.+)	alias		\2!\1@\3
> 	([^@]+)@([^@]+)		alias		\2!\1

"Source routed" RFC822 addresses have been dead for decades.  Time to
blow that cruft out of the water.


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

end of thread, other threads:[~2020-10-04 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-04 23:35 rewrite rules -- explanations? ori
2020-10-04 23:55 ` [9front] " Lyndon Nerenberg

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