From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <1e4b6a22f3604eb4351f1d52fb9c6518@ladd.quanstro.net> References: <20110811195500.2034be49@zinc.9fans.fr> <1e4b6a22f3604eb4351f1d52fb9c6518@ladd.quanstro.net> Date: Sun, 28 Aug 2011 20:22:10 +0200 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [9fans] mail client; general question web vs command Topicbox-Message-UUID: 169b5ad2-ead7-11e9-9d60-3106f5b1d025 Hello, On 28 August 2011 17:15, erik quanstrom wrote: >> now when I try (74.125.39.108 should be smtp.gmail.com): >> cat q | upas/smtp -a -d -h a.com 74.125.39.108 rudolf.sykora@gmail.com >> rsykora@cern.ch > > i'm confused. =C2=A0are you using plan 9 or p9p? p9p now > i would think that a.com is wrong.=C2=A0you need to use your real domain. you may well be right. I have no idea what/why I should write there. I am using a notebook that is used regularly at diferent places and the only thing I now want is to pass my e-mail to gmail via smtp (where I have an account) so that it then can be sent further. Thus I'd expect that all I need is i) the mail itself with the info to whom it should be sent, and ii) login/password for the gmail account. I don't see any reason for any other domain name... I just wrote that a.com there so that there is something (so, simply, understand that I do not understand...). > also i think you want the real target system, not an ip address. > mx lookup for google isn't broken for me. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0; fn mxquery {x=3D`{ndb/dnsquery google.com mx= | sort +1n | sed 1q}; echo $x(4)>[1=3D2]; ndb/dnsquery $x(4)} > =C2=A0 =C2=A0 =C2=A0 =C2=A0; mxquery google.com >[2=3D] > =C2=A0 =C2=A0 =C2=A0 =C2=A0aspmx.l.google.com ip =C2=A0 74.125.47.27 well, is there any difference if I use smtp.gmail.com or the corresponding ip? (for the former to work I need, I have a feeling, add sth somewhere [ndb?], so the ip was easier for the experiment). > on plan 9, upas typically uses /mail/lib/remotemail to send > to remote systems. =C2=A0my remotemail looks like > > =C2=A0 =C2=A0 =C2=A0 =C2=A0#!/bin/rc > =C2=A0 =C2=A0 =C2=A0 =C2=A0sender =3D $1; addr =3D $2; * =3D $*(3-) > =C2=A0 =C2=A0 =C2=A0 =C2=A0fd=3D`{/bin/upas/aliasmail -f $sender} > =C2=A0 =C2=A0 =C2=A0 =C2=A0switch($fd){ > =C2=A0 =C2=A0 =C2=A0 =C2=A0case *.* > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0; > =C2=A0 =C2=A0 =C2=A0 =C2=A0case * > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fd=3Dquanstro.net > =C2=A0 =C2=A0 =C2=A0 =C2=A0} > =C2=A0 =C2=A0 =C2=A0 =C2=A0exec /bin/upas/smtp -h $fd $addr $sender $* > on p9p a similar thing is also in remotemail... > this is invoked by qmail/kickqueue which are tickled > by sending mail and/or a cron job. > > =C2=A0 =C2=A0 =C2=A0 =C2=A0; cat /cron/upas/cron > =C2=A0 =C2=A0 =C2=A0 =C2=A0# kick mail retries (replace ladd with your sy= stem) > =C2=A0 =C2=A0 =C2=A0 =C2=A00,10,20,30,40,50 * * * * =C2=A0 =C2=A0 =C2=A0 = =C2=A0ladd =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/bin/upas/runq -a /mail= /queue /mail/lib/remotemail > > =C2=A0 =C2=A0 =C2=A0 =C2=A0# clean up after grey list > =C2=A0 =C2=A0 =C2=A0 =C2=A047 4 * * * =C2=A0 =C2=A0 =C2=A0ladd =C2=A0 =C2= =A0rm -rf /mail/grey/tmp/*/* > > ymmv, and there may be nupasisms in here. > > - erik Ok. But putting aside the way how different programs are invoked, finally there is always that line with /bin/upas/smtp -h $fd $addr $sender $* that actually sends the mail (which it reads from stdin). This line of yours has to have -a added since gmail needs authentication (so finally a key in factotum). So before engaging the rewrite, remotemail, vf, qer, runq, ... (?) programs, I would like to be able to send an email using just this and be sure it works... Thanks Ruda