User Tools

Site Tools


playground:test

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

playground:test [2021/04/18 14:28]
gall0ws created
playground:test [2021/04/18 14:47] (current)
gall0ws typos and minor stuff
Line 14: Line 14:
  SMTP_SECRET - you may need to set this one up, it will be used for SMTP auth  SMTP_SECRET - you may need to set this one up, it will be used for SMTP auth
  
-===== 1. Reiceiving =====+===== 1. Receiving =====
    
  
Line 29: Line 29:
  
  
-upas/fs is used to access the remote mailbox and mounting it locally+''upas/fs'' is used to access the remote mailbox and mounting it locally
 as a filesystem.  If you're not running upas yet, you can launch it as a filesystem.  If you're not running upas yet, you can launch it
 with: with:
Line 40: Line 40:
  
  
-If you're already using upasfs(4), the command in the previous section +If you're already using ''upasfs(4)'', the command in the previous section 
-will most probably fail as you already have another mailbox "mbox".+will most probably fail as you already have another mailbox named ''mbox''.
 Of course you can have many different mailboxes, to create a separate Of course you can have many different mailboxes, to create a separate
 one for SDF: one for SDF:
Line 47: Line 47:
  % echo open /imaps/mx.sdf.org/SDF_USER sdf > /mail/fs/ctl  % echo open /imaps/mx.sdf.org/SDF_USER sdf > /mail/fs/ctl
  
-In this scenario the SDF mailbox will be mounted under /mail/fs/sdf+In this scenario the SDF mailbox will be mounted under ''/mail/fs/sdf''
  
-See upasfs(4) for more details.+See ''upasfs(4)'' for more details.
  
 For the rest of this article we're assuming that the mailbox is For the rest of this article we're assuming that the mailbox is
Line 66: Line 66:
  
 That's because the X.509 certificate is unknown to your system; to That's because the X.509 certificate is unknown to your system; to
-make it trusted for the mailer just add it to the file 'mail' inside +make it trusted for the mailer just add it to the file ''mail'' inside 
-/sys/lib/tls (most probably such file doesn't exist yet).+''/sys/lib/tls'' (most probably such file doesn't exist yet).
  
  % echo 'x509 sha256=j1iBZLD5iPEcGYJopv9oMBHjZcZAzTsfAzj7bIXA2T4' >> /sys/lib/tls/mail  % echo 'x509 sha256=j1iBZLD5iPEcGYJopv9oMBHjZcZAzTsfAzj7bIXA2T4' >> /sys/lib/tls/mail
Line 73: Line 73:
 === 1.2.3 Namespaces considerations === === 1.2.3 Namespaces considerations ===
  
-If you're running upasfs(4) inside a rio's window you'll quickly find+If you're running ''upasfs(4)'' inside a rio's window you'll quickly find
 out that a fresh new window won't inherith the previously opened mbox. out that a fresh new window won't inherith the previously opened mbox.
 That's because it was mounted in a different process group and its That's because it was mounted in a different process group and its
-namespace is not fully shared with every process.+namespace is not fully shared with every other process.
  
-To avoid that, usually you may want run upas/fs before starting +To do that, you may want run ''upas/fs'' before starting 
-rio(1), so every window created will have /mail/fs populated.+''rio(1)'', so every window created will have ''/mail/fs'' populated.
  
-Another way to share the mail box though, is launching upas/fs with the '-s' flag:+Another way to share the mail box is launching ''upas/fs'' with the ''-s'' flag:
  
  % upas/fs -s -f '/imaps/mx.sdf.org/SDF_USER'  % upas/fs -s -f '/imaps/mx.sdf.org/SDF_USER'
  
-From upasfs(4)+From ''upasfs(4)''
  
  -s causes fs to put itself in /srv with a name of  -s causes fs to put itself in /srv with a name of
Line 107: Line 107:
  
 Every file in such directories contains the relative data about the email. Every file in such directories contains the relative data about the email.
- 
 This is a great API, because it makes very easy to write your own mail This is a great API, because it makes very easy to write your own mail
 client. client.
- 
 We could also read the email directly from the shell with something We could also read the email directly from the shell with something
 like: like:
Line 123: Line 121:
  % mail  % mail
  
-when mail(1) is used in this way it is just a frontend to nedmail(1).+when ''mail(1)'' is used in this way it is just a frontend to ''nedmail(1)''.
  
-TODO: expand.+//TODO: expand.//
  
 === 1.3.2 faces(1) === === 1.3.2 faces(1) ===
  
- +With ''faces(1)'' we could monitor a mailbox for incoming mails.
-With faces we could monitor a mailbox for incoming mails.+
  
  % faces -i  % faces -i
Line 136: Line 133:
 {{:playground:faces.jpg?400|faces(1)}} {{:playground:faces.jpg?400|faces(1)}}
  
-It uses the plumber(4) to receive "notifications" from new emails from +It uses the ''plumber(4)'' to receive "notifications" from new emails from 
-upasfs(4) and, righ-cliking on a message, it plumbs the message so it +''upasfs(4)'' and, right-cliking on a message, it plumbs the message so it 
-can bn displayed by another program.+can be displayed by another program.
  
 === 1.3.3 acmemail(1) === === 1.3.3 acmemail(1) ===
  
-Mail allows you to manage your mailbox directly inside acme(1)+Mail allows you to manage your mailbox directly inside ''acme(1)''
  
 All you have to do is launch acme: All you have to do is launch acme:
Line 148: Line 145:
  % acme  % acme
  
-And then run Mail. +And then run ''Mail''
-By default it will open a new window /mail/fs/mbox where you can edit+By default it will open a new window ''/mail/fs/mbox'' where you can edit
 and read your mailbox. and read your mailbox.
  
-Rigth-clicking on a message id will open the message in a new window.+Right-clicking on a message id will open the message in a new window.
  
-Put in the mailbox context is used to save any changes to upasfs(4),+''Put'' in the mailbox context is used to save any changes to ''upasfs(4)'',
 for instance the read status of a message. for instance the read status of a message.
  
 {{:playground:acme_eread.jpg?800|Managing mailbox using acme(1)}} {{:playground:acme_eread.jpg?800|Managing mailbox using acme(1)}}
  
-See acme(1) if you're not familiar with it and acmemail(1) for more+See ''acme(1)'' if you're not familiar with it and ''acmemail(1)'' for more
 details. details.
  
 ===== 2. Sending ===== ===== 2. Sending =====
- 
  
 As mentioned in the intro, you need a META, VHOST, VPM or As mentioned in the intro, you need a META, VHOST, VPM or
Line 172: Line 168:
 ==== 2.1 SDF SMTP configuration from 9front ==== ==== 2.1 SDF SMTP configuration from 9front ====
  
- +To setup the SDF SMTP from 9front you can use ''vt(1)'' and ''ssh(1)'':
-To setup the SDF SMTP from 9front you can use vt(1) and ssh(1):+
  
  % vt  % vt
Line 193: Line 188:
  Choice?   Choice? 
  
-At this prompt you should choose [p] to set your SMTP secret and then +At this prompt you should choose ''[p]'' to set your SMTP secret and then 
-[m] to enable the email address.+''[m]'' to enable the email address.
  
 ==== 2.2 rewrite(6) ==== ==== 2.2 rewrite(6) ====
  
-/mail/lib/rewrite is used in order to convert a given email+''/mail/lib/rewrite'' is used in order to convert a given email
 destination to a command to properly send the email. destination to a command to properly send the email.
  
 By default rewrite doesn't contain any rules, for our purpose we could By default rewrite doesn't contain any rules, for our purpose we could
-just use the template provided by rewrite.gateway+just use the template provided by ''rewrite.gateway''
  
  % cat /mail/lib/rewrite.gateway > /mail/lib/rewrite  % cat /mail/lib/rewrite.gateway > /mail/lib/rewrite
  
-See rewrite(6) for more details.+See ''rewrite(6)'' for more details.
  
 ==== 2.3 /mail/lib/remotemail ==== ==== 2.3 /mail/lib/remotemail ====
  
-This script is used by /mail/lib/qmail do dispose of a remote message.+This script is used by ''/mail/lib/qmail'' do dispose of a remote message.
  
-We can edit it in order to hardcode smtp(8) so use SDF SMTP server:+We can edit it in order to hardcode ''smtp(8)'' so use SDF SMTP server:
  
  #!/bin/rc  #!/bin/rc
Line 231: Line 226:
 === 2.3.1 Avoid to overwrite defaults === === 2.3.1 Avoid to overwrite defaults ===
  
-In a shared system changing /mail/lib/* files may not be ideal, an +In a shared system changing ''/mail/lib/*'' files may not be ideal, an 
-alternative way to do that is creating a $home/lib/mail directory and +alternative way to do that is creating a ''$home/lib/mail'' directory and 
-make there the changes we described, finally use bind(1) to replace+make there the changes we described, finally use ''bind(1)'' to replace
 the global one just inside our namespace: the global one just inside our namespace:
  
  % bind -b $user/lib/main /mail/lib  % bind -b $user/lib/main /mail/lib
  
-See bind(1) for more info.+See ''bind(1)'' for more info.
   
 ==== 2.4 Add your SMTP secret to factotum ==== ==== 2.4 Add your SMTP secret to factotum ====
Line 248: Line 243:
  > /mnt/factotum/ctl  > /mnt/factotum/ctl
  
-Note that the proto in this case is cram and the username, as+Note that the proto in this case is ''cram'' and the username, as
 mentionened in the SDF FAQ, is sligthly different than usual. mentionened in the SDF FAQ, is sligthly different than usual.
  
 ==== 2.5 SMTP server certificate. ==== ==== 2.5 SMTP server certificate. ====
- 
  
 As the SMTP server is mx.sdf.org, we can just copy the cert we As the SMTP server is mx.sdf.org, we can just copy the cert we
Line 268: Line 262:
  
 With the setup described in this article you're going to send emails With the setup described in this article you're going to send emails
-with FROM set to $user@sdf.org.  Unless you're really glenda@sdf.org+with ''From'' set to $user@sdf.org.  Unless you're really glenda@sdf.org
 (oh, hi!) or in general $user doesn't match SDF_USER, please be sure (oh, hi!) or in general $user doesn't match SDF_USER, please be sure
 to have the upasname env variable set to SDF_USER: to have the upasname env variable set to SDF_USER:
Line 274: Line 268:
  % upasname=SDF_USER  % upasname=SDF_USER
  
-You may want to set this inside $home/lib/profile to prevent any+You may want to set this inside ''$home/lib/profile'' to prevent any
 error. error.
  
Line 284: Line 278:
  % echo 'this is a test' | mail -s test gurdulu@sdf.org  % echo 'this is a test' | mail -s test gurdulu@sdf.org
  
-when mail(1) is used in this way it is just a frontend to marshal(1).+when ''mail(1)'' is used in this way it is just a frontend to ''marshal(1)''.
  
 === 2.6.2 acmemail(1) === === 2.6.2 acmemail(1) ===
  
 +''Mail'', already introduced in 1.3.3.  could also be used to compose and
 +send emails directly from ''acme(1)''
  
-Mail, already introduced in 1.3.3.  could also be used to compose and +You can start composing a new email middle-clicking ''Mail'' in the mailbox
-send emails directly from acme(1) +
- +
-You can start composing a new email middle-clicking Mail in the mailbox+
 window: a new window will be opened, fill the email in and finally middle-click Post to send it. window: a new window will be opened, fill the email in and finally middle-click Post to send it.
  
playground/test.1618756128.txt.gz · Last modified: 2021/04/18 14:28 by gall0ws