playground:test
Differences
This shows you the differences between two versions of the page.
playground:test [2021/04/18 14:28] – created gall0ws | playground:test [2021/04/18 14:47] (current) – typos and minor stuff gall0ws | ||
---|---|---|---|
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 | + | '' |
as a filesystem. | as a filesystem. | ||
with: | with: | ||
Line 40: | Line 40: | ||
- | If you're already using upasfs(4), the command in the previous section | + | If you're already using '' |
- | will most probably fail as you already have another mailbox | + | will most probably fail as you already have another mailbox |
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 / | % echo open / | ||
- | In this scenario the SDF mailbox will be mounted under / | + | In this scenario the SDF mailbox will be mounted under '' |
- | See upasfs(4) for more details. | + | See '' |
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 ' | + | make it trusted for the mailer just add it to the file ''mail'' inside |
- | / | + | '' |
% echo 'x509 sha256=j1iBZLD5iPEcGYJopv9oMBHjZcZAzTsfAzj7bIXA2T4' | % echo 'x509 sha256=j1iBZLD5iPEcGYJopv9oMBHjZcZAzTsfAzj7bIXA2T4' | ||
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 |
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 | + | To do that, you may want run '' |
- | rio(1), so every window created will have /mail/fs populated. | + | '' |
- | Another way to share the mail box though, | + | Another way to share the mail box is launching |
% upas/fs -s -f '/ | % upas/fs -s -f '/ | ||
- | From upasfs(4) | + | From '' |
-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: | ||
- | when mail(1) is used in this way it is just a frontend to nedmail(1). | + | when '' |
- | # TODO: expand. | + | //TODO: expand.// |
=== 1.3.2 faces(1) === | === 1.3.2 faces(1) === | ||
- | + | With '' | |
- | With faces we could monitor a mailbox for incoming mails. | + | |
% faces -i | % faces -i | ||
Line 136: | Line 133: | ||
{{: | {{: | ||
- | It uses the plumber(4) to receive " | + | It uses the '' |
- | upasfs(4) and, righ-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 |
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 '' |
- | By default it will open a new window / | + | By default it will open a new window |
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), | + | '' |
for instance the read status of a message. | for instance the read status of a message. | ||
{{: | {{: | ||
- | See acme(1) if you're not familiar with it and acmemail(1) for more | + | See '' |
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 '' | |
- | 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 |
- | [m] to enable the email address. | + | '' |
==== 2.2 rewrite(6) ==== | ==== 2.2 rewrite(6) ==== | ||
- | / | + | '' |
destination to a command to properly send the email. | destination to a command to properly send the email. | ||
By default rewrite doesn' | By default rewrite doesn' | ||
- | just use the template provided by rewrite.gateway | + | just use the template provided by '' |
% cat / | % cat / | ||
- | See rewrite(6) for more details. | + | See '' |
==== 2.3 / | ==== 2.3 / | ||
- | This script is used by / | + | This script is used by '' |
- | We can edit it in order to hardcode smtp(8) so use SDF SMTP server: | + | We can edit it in order to hardcode |
#!/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 |
- | alternative way to do that is creating a $home/ | + | alternative way to do that is creating a '' |
- | make there the changes we described, finally use bind(1) to replace | + | make there the changes we described, finally use '' |
the global one just inside our namespace: | the global one just inside our namespace: | ||
% bind -b $user/ | % bind -b $user/ | ||
- | See bind(1) for more info. | + | See '' |
==== 2.4 Add your SMTP secret to factotum ==== | ==== 2.4 Add your SMTP secret to factotum ==== | ||
Line 248: | Line 243: | ||
> / | > / | ||
- | Note that the proto in this case is cram and the username, as | + | Note that the proto in this case is '' |
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. | + | with '' |
(oh, hi!) or in general $user doesn' | (oh, hi!) or in general $user doesn' | ||
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/ | + | You may want to set this inside |
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 '' |
=== 2.6.2 acmemail(1) === | === 2.6.2 acmemail(1) === | ||
+ | '' | ||
+ | send emails directly from '' | ||
- | Mail, already introduced in 1.3.3. | + | You can start composing a new email middle-clicking |
- | 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