* Re: [9fans] plan9 username is not desired e-mail source
@ 2002-08-04 12:55 presotto
0 siblings, 0 replies; 9+ messages in thread
From: presotto @ 2002-08-04 12:55 UTC (permalink / raw)
To: 9fans
I documented upasname recently, around the same
time that I broke the mail man page into several ones.
The new versions are out on sources. 'man marshal' is
the relevant page.
Fromfiles went in during one of our many splits, when
Lucent was in the midst of splitting from AT&T, around
'96 to get the right return address for people. Looking
around, I don't see anything execing aliasmail -f
so I don't think its used by anything anymore. I'll
look harder, I may be wrong.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
2002-08-04 20:39 ` arisawa
2002-08-04 20:45 ` arisawa
@ 2002-08-19 15:23 ` Boyd Roberts
1 sibling, 0 replies; 9+ messages in thread
From: Boyd Roberts @ 2002-08-19 15:23 UTC (permalink / raw)
To: 9fans
arisawa@ar.aichi-u.ac.jp wrote:
>if(~ $OK 1){ # sender masquering
>awk '
>/^From |^Received:|^MBOX-Line:|^Message-ID:/{f=1;next}
>/^From:/{f=1; print "From:","'$sender@ar.aichi-u.ac.jp'"; next}
>
>
>
It thought I'd just note that RFC 822 headers are case insensitive and
zero or
more LWSP [Linear White SPace] characters can occur between the header
name and the colon.
LSWP = space and tab
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
2002-08-04 20:39 ` arisawa
@ 2002-08-04 20:45 ` arisawa
2002-08-19 15:23 ` Boyd Roberts
1 sibling, 0 replies; 9+ messages in thread
From: arisawa @ 2002-08-04 20:45 UTC (permalink / raw)
To: 9fans
Sorry.
> alice@aichi-u ac.jp is converted to arisawa@ar.aichi-u.ac.jp
alice@pc.aichi-u ac.jp and alice@al.aichi-u.ac.jp is converted to
arisawa@ar.aichi-u.ac.jp
Kenji Arisawa
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
2002-08-04 13:35 Russ Cox
@ 2002-08-04 20:39 ` arisawa
2002-08-04 20:45 ` arisawa
2002-08-19 15:23 ` Boyd Roberts
0 siblings, 2 replies; 9+ messages in thread
From: arisawa @ 2002-08-04 20:39 UTC (permalink / raw)
To: 9fans
>Aliasmail -f is invoked by /mail/lib/remotemail,
>but only to get a sender's domain. The sender
>name can't be changed with it.
>
>Russ
The senders name can be chnaged in qmail.
The following is qmail for sender masquerade:
alice@aichi-u ac.jp is converted to arisawa@ar.aichi-u.ac.jp
where ar.aichi-u.ac.jp is this dom name.
Kenji Arisawa
#!/bin/rc
#
# qmail derivers a mail to a remote host
# $* are as follows:
#
# mail from arisawa@pc.aichi-u.ac.jp to junk@junk.com
# pc.aichi-u.ac.jp!arisawa net!junk.com junk
# (don't post to junk.com. this dom really exist now!)
#
# mail from postmaster to arisawa@pc.aichi-u.ac.jp:
# /dev/null net!pc.aichi-u.ac.jp arisawa
#
sender=$1
shift
addr=$1
shift
#
# for example
# $sender:
# alice -- from local mailes
# now smptd rejects a sender who pretends local
user.
# *!alice -- from remote machin
# ar!*!alice -- from remote machin via pipeto
# /dev/null -- from postmaster
# $addr:
# net!vega -- to remote hosts vega
# $*: recipient
# bob -- a user on vega
#
# OK flag
# 1: do sender masquering
# 0: no sender masquering
OK=0
#
# relay service and the sender masquering
#
dom=aichi-u.ac.jp
if(~ $sender (pc al)^.$dom!* ar!^(pc al)^.$dom!*){
ifs0=$ifs
ifs='!' s=`{echo -n $sender}
ifs=$ifs0
sender=$s(2)
if(~ $s(1) ar) sender=$s(3)
# echo $sysname: qmail-masq pettern OK $sender >> /sys/log/test
switch($sender){
case alice
OK=1
sender=arisawa
}
}
if(~ $OK 1){ # sender masquering
awk '
/^From |^Received:|^MBOX-Line:|^Message-ID:/{f=1;next}
/^From:/{f=1; print "From:","'$sender@ar.aichi-u.ac.jp'"; next}
/^[ \t]/ && f==1 {next}
/^$/{ print; while (getline>0) print $0}
/.+/{f=0;print $0}'|\
/bin/upas/qer /mail/queue mail $sender $addr $* || exit 1
/bin/upas/runq /mail/queue /mail/lib/remotemail</dev/null>/dev/null
>[2=1]
exit
}
#
# controll the sender's request to relay.
# If this is not a relay host, you should not answer the
request.
#
# relay request from a remote sender.
#
# local user can send a mail to anywhere
#
# full-path is required for $sender to be translated
correctlly
# otherwise the name is regarded as local name.
# example: if pc!arisawa is translated to
pc!arisawa@ar.aichi-u.ac.jp
#
/bin/upas/qer /mail/queue mail $sender $addr $* || exit 1
/bin/upas/runq /mail/queue /mail/lib/remotemail</dev/null>/dev/null
>[2=1]
exit 0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
@ 2002-08-04 13:35 Russ Cox
2002-08-04 20:39 ` arisawa
0 siblings, 1 reply; 9+ messages in thread
From: Russ Cox @ 2002-08-04 13:35 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 136 bytes --]
Aliasmail -f is invoked by /mail/lib/remotemail,
but only to get a sender's domain. The sender
name can't be changed with it.
Russ
[-- Attachment #2: Type: message/rfc822, Size: 1705 bytes --]
From: presotto@closedmind.org
To: 9fans@cse.psu.edu
Subject: Re: [9fans] plan9 username is not desired e-mail source
Date: Sun, 4 Aug 2002 08:55:30 -0400
Message-ID: <41cbaab5ada2aa1981ad971f54250f64@closedmind.org>
I documented upasname recently, around the same
time that I broke the mail man page into several ones.
The new versions are out on sources. 'man marshal' is
the relevant page.
Fromfiles went in during one of our many splits, when
Lucent was in the midst of splitting from AT&T, around
'96 to get the right return address for people. Looking
around, I don't see anything execing aliasmail -f
so I don't think its used by anything anymore. I'll
look harder, I may be wrong.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
@ 2002-08-03 23:48 presotto
0 siblings, 0 replies; 9+ messages in thread
From: presotto @ 2002-08-03 23:48 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 94 bytes --]
IN addition to rsc's suggestion
upasname=cdevilbiss@charter.net
in your env will do it.
[-- Attachment #2: Type: message/rfc822, Size: 1998 bytes --]
From: colin@charter.net
To: 9fans@cse.psu.edu
Subject: [9fans] plan9 username is not desired e-mail source
Date: Sat, 3 Aug 2002 13:40:53 -0500
Message-ID: <auto-000048302574@dc-mx10.cluster1.charter.net>
Reading through rewrite(6) and experimenting, it seems that it is
extremely difficult to send mail with a different origin than the
username I chose on my plan9 machine.
To be specific, my e-mail address is cdevilbiss@charter.net, but my
plan9 login name is colin; thus, all mail I send seems to come from
colin@charter.net.
Is there some way to do this that is neither deeply evil nor requires
me to change all instances of my login name in the bowels of the
system?
Thanks in advance.
--
Colin DeVilbiss
cdevilbiss@charter.net
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
@ 2002-08-03 23:41 Russ Cox
0 siblings, 0 replies; 9+ messages in thread
From: Russ Cox @ 2002-08-03 23:41 UTC (permalink / raw)
To: 9fans
echo from.local >/mail/lib/fromfiles
echo 'colin cdevilbiss@charter.net' >/mail/lib/from.local
russ
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [9fans] plan9 username is not desired e-mail source
@ 2002-08-03 19:14 cdevilbiss
0 siblings, 0 replies; 9+ messages in thread
From: cdevilbiss @ 2002-08-03 19:14 UTC (permalink / raw)
To: 9fans
Thanks for both of your suggestions.
Interestingly, the aliasmail and /mail/lib/fromfiles suggestion didn't
work for me; I probably should have mentioned that I am on a 3e
system, so maybe the following have changed in 4e.
From my mail(1):
Aliasmail
...
Under the -f option, alias files
listed in /mail/lib/fromfiles are consulted instead, and the
domain part only of the expansion is printed.
and my /mail/lib/remotemail:
#!/bin/rc
shift
sender=$1
shift
addr=$1
shift
fd=`{/bin/upas/aliasmail -f $sender}
switch($fd){
case *.*
;
case *
fd=charter.net
}
exec /bin/upas/smtp -h $fd $addr $sender $*
So it looks like $sender in remotemail is guaranteed to be the
original $1 (my login name?). The $upasname suggestion seems to have
worked like a charm (once I remembered to respawn Acme Mail so that it
would pick up a new /env).
Did 4e change the way remotemail works so /mail/lib/fromfiles is more
``powerful?'' Also, is /env/upasname documented anywhere or just in
the source?
Thanks again to both of you.
--
Colin DeVilbiss
cdevilbiss@charter.net
^ permalink raw reply [flat|nested] 9+ messages in thread
* [9fans] plan9 username is not desired e-mail source
@ 2002-08-03 18:40 colin
0 siblings, 0 replies; 9+ messages in thread
From: colin @ 2002-08-03 18:40 UTC (permalink / raw)
To: 9fans
Reading through rewrite(6) and experimenting, it seems that it is
extremely difficult to send mail with a different origin than the
username I chose on my plan9 machine.
To be specific, my e-mail address is cdevilbiss@charter.net, but my
plan9 login name is colin; thus, all mail I send seems to come from
colin@charter.net.
Is there some way to do this that is neither deeply evil nor requires
me to change all instances of my login name in the bowels of the
system?
Thanks in advance.
--
Colin DeVilbiss
cdevilbiss@charter.net
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-08-19 15:23 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-04 12:55 [9fans] plan9 username is not desired e-mail source presotto
-- strict thread matches above, loose matches on Subject: below --
2002-08-04 13:35 Russ Cox
2002-08-04 20:39 ` arisawa
2002-08-04 20:45 ` arisawa
2002-08-19 15:23 ` Boyd Roberts
2002-08-03 23:48 presotto
2002-08-03 23:41 Russ Cox
2002-08-03 19:14 cdevilbiss
2002-08-03 18:40 colin
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).