summaryrefslogtreecommitdiffstats
path: root/konfigurera.mdwn
blob: 9ba1e3a02cbfec4e094e169e9712f58178a303f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
# Konfigurera en e-postklient

*Här hittar du information om hur du konfigurerar din e-postklient för Fripost. Du kan också alltid använda [webbmejlen](https://mail.fripost.org/).*

## Automatisk konfiguration med Icedove/Tunderbird

Fripost stödjer [automatisk kontokonfiguration](https://support.mozilla.org/sv/kb/Automatic-Account-Configuration) med e-postklienten Icedove/Tunderbird (version 3.1 och senare). Allt du behöver göra är att skapa ett nytt konto och fylla i dina uppgifter. Sedan kan du hoppa över de nästa två stegen eftersom inställningarna för in- och utkommande post görs automatiskt.

För att skapa ett nytt konto, gå till `Inställningar -> Kontoinställningar`, klicka på rullgardinsmenyn `Kontoåtgärder` nere till vänster och välj `Lägg till e-postkonto`. Nu öppnas ett nytt fönster. Fyll i dina uppgifter och klicka på `Fortsätt`. Sådär! Nu kan du både skicka och ta emot e-brev i Icedove/Thunderbird.

## Inställningar för inkommande e-post

* IMAP: `imap.fripost.org`
* Port: `993`
* Anslutning: `SSL/TLS` (inte `STARTTLS`)
* Användarnamn: `USERNAME` (eller `USERNAME@fripost.org`)
* Lösenord: `XXXXXXXX`

**OBS!** E-postklienten *Evolution*, som följer med GNOME, verkar inte ha några inställningar för port. Ange därför servern `imap.fripost.org:993`

## Inställningar för utgående e-post

Fripost har numera en SMTP-server för utgående e-post. Ställ in enligt nedan.

* SMTP och värd: `smtp.fripost.org`
* Anslutning: `STARTTLS` (inte `SSL/TLS`)
* Port: `587`
* Domän (där det behövs): `fripost.org`
* Användare: `USERNAME` (eller `USERNAME@fripost.org`)

Du kan också använda din Internetleverantörs server. I så fall behöver du inte ange användare. Vi listar några vanliga här nedan.

<table class="table">
  <thead>
    <tr>
      <th>Leverantör</th>
      <th>SMTP-server</th>
      <th>Autentisering</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Bahnhof</td>
      <td>mail2.bahnhof.se</td>
      <td>Ingen</td>
    </tr>
    <tr>
      <td>Bredbandsbolaget</td>
      <td>smtp.bredband.net</td>
      <td>?</td>
    </tr>
    <tr>
      <td>ComHem</td>
      <td>mailout.comhem.se</td>
      <td>Ingen</td>
    </tr>
    <tr>
      <td>Tele2</td>
      <td>mail.tele2.se</td>
      <td>Ja</td>
    </tr>
    <tr>
      <td>Telenor</td>
      <td>smtp.telenor.se</td>
      <td>?</td>
    </tr>
    <tr>
      <td valign="top">Telia</td>
      <td valign="top">
        smtprelay1.telia.com<br/>
        mailout.telia.com<br/>
        mail1.telia.com
      </td>
      <td valign="top">?</td>
    </tr>
  </tbody>
</table>

### SMTP för mobilen

I vissa fall kan du behöva använda en separat SMTP-server när du skickar e-post från mobiltelefonen.

<table class="table">
  <thead>
    <tr>
      <th>Leverantör</th>
      <th>SMTP-server</th>
      <th>Autentisering</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Telenor</td>
      <td>smtp.euromail.se</td>
      <td>Nej</td>
    </tr>
  </tbody>
</table>


## Rekommenderade program

Vi rekommenderar dig att använda fri programvara eftersom det bara är fria datorprogram som respekterar användarens frihet och integritet.

Om du kör ett helt fritt operativsystem, t.ex. [Trisquel GNU/Linux](https://trisquel.info), är din vanliga e-postklient redan fri. Den som följer med GNOME heter till exempel Evolution och är mycket bra. Ett annat vanligt val är Icedove/Thunderbird. Nedan finns länkar till dokumentationen för flera andra fria e-postklienter.

## Övrigt

För mer hjälp, se dokumentationen för din e-postklient. I första hand bör du vända dig dit eftersom det inte är säkert att någon annan medlem vet hur just din e-postklient fungerar. Du kan också fråga på e-postlistan. I sista hand kan du även höra av dig till administratörerna. Tänk dock på att de redan har en ganska hög arbetsbelastning och att alla gör det här på sin fritid.

Här är länkar till dokumentationen för några vanliga och fria e-postklienter:

* [Evolution User Guide](https://library.gnome.org/users/evolution/stable/)
* [Thunderbird Manual](https://en.flossmanuals.net/thunderbird/)
* [The KMail Handbook](https://docs.kde.org/trunk5/en/kdepim/kmail/index.html)

Och här är ytterligare några som är vanligare bland mer avancerade användare. Flera av dessa är textbaserade och vissa kör bara i terminalläge.

* [Alpine](http://www.washington.edu/alpine/)
* [Gnus (Emacs)](http://www.gnus.org/)
* [Mutt](http://www.mutt.org/)
* [Rmail (Emacs)](http://www.gnu.org/software/emacs/manual/html_node/emacs/Rmail.html)
* [Wanderlust (Emacs)](http://www.gohome.org/wl/)

# Inställningar för särskilda program

## Msmtp för utgående e-post

Msmtp är en flexibel ersättning för Sendmail. Detta är inställningarna för användaren "user".

<pre>
# The Fripost account
account       fripost
host          smtp.fripost.org
tls_starttls  on
port          587
domain        fripost.org
from          USERNAME@fripost.org
user          USERNAME@fripost.org
password      XXXXXXXX
</pre>

## Postfix för utgående e-post

You can either use single relayhost for all messages, or configure
multiple relayhosts and let Postfix choose based on the envelope sender
address.  Pick (only one) of the following sections.

### Single relayhost (`smtp.fripost.org:587`) for all outgoing messages

Create a file `/etc/postfix/sasl/passwd`

    sudo install -m 0400 /dev/null /etc/postfix/sasl/passwd

(it should only be readable by the superuser).  Edit it and enter your
credentials in the following format:

    [smtp.fripost.org]:587    USERNAME@fripost.org:XXXXXXXX

Now you need to hash the file using `postmap(1)`:

    sudo postmap hash:/etc/postfix/sasl/passwd

(Postfix doesn't read the file directly, but the compiled lookup table.
Thus you'll have to run that command again whenever the file is updated.)

Now add the following to `/etc/postfix/main.cf`:

    mynetworks_style    = host
    inet_interfaces     = loopback-only
    relayhost           = [smtp.fripost.org]:587

    smtp_sasl_auth_enable          = yes
    smtp_sasl_password_maps        = hash:/etc/postfix/sasl/passwd
    smtp_sasl_security_options     = noanonymous, noplaintext
    smtp_sasl_tls_security_options = noanonymous

    smtp_tls_security_level         = fingerprint
    smtp_tls_fingerprint_digest     = sha256
    smtp_tls_mandatory_ciphers      = high
    smtp_tls_mandatory_protocols    = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
    smtp_tls_fingerprint_cert_match = 92:BF:5E:D5:B0:4E:10:19:20:08:C4:70:D6:F3:F7:EC:5F:6E:75:D2:1F:9B:FF:4D:49:BD:B0:8A:68:90:49:BF

(See `postconf(5)` for details on the SSL/TLS client policy.
The fingerprint of our [server certificate](http://git.fripost.org/fripost-ansible/plain/certs/public/smtp.fripost.org.pem)'s
public key can be found [here](https://fripost.org/certs.asc).)

Be sure to reload (or even restart) Postfix after changing the
configuration.  In doubt, run `service postfix restart` or `systemctl
restart postfix`.

### Sender-dependent relayhost

This is slightly more advanced than the previous configuration.  The
point here is to configure multiple relayhosts and let Postfix choose
based on the envelope sender address.  This is useful if you want to use
`smtp.fripost.org:587` for personal messages and a corporate relayhost
`smtp.example.org:587` for professional messages, for instance.

Create a file `/etc/postfix/sasl/passwd` as before (ensure that only the
superuser can read it!), and enter all your credentials:

    [smtp.fripost.org]:587    USERNAME1@fripost.org:XXXXXXXX
    [smtp.example.org]:587    USERNAME2@example.org:XXXXXXXX

Next, write your SSL/TLS client policy in `/etc/postfix/tls_policy`

    [smtp.example.org]:587  secure ciphers=high protocols=!SSLv2:!SSLv3
    [smtp.fripost.org]:587  fingerprint ciphers=high protocols=!SSLv2:!SSLv3:!TLSv1:!TLSv1.1
        match=92:BF:5E:D5:B0:4E:10:19:20:08:C4:70:D6:F3:F7:EC:5F:6E:75:D2:1F:9B:FF:4D:49:BD:B0:8A:68:90:49:BF

(see `postconf(5)` for details;
the fingerprint of our [server certificate](http://git.fripost.org/fripost-ansible/plain/certs/public/smtp.fripost.org.pem)'s
public key can be found [here](https://fripost.org/certs.asc)),
and your relayhost policy in `/etc/postfix/relayhost_map`

    @fripost.org  [smtp.fripost.org]:587
    @example.org  [smtp.example.org]:587

Here, we tell Postfix to use the `smtp.fripost.org:587` relayhost for
which the envelope sender address is under the `fripost.org` domain, and
the `smtp.example.org:587` relayhost for which the envelope sender
address is under the `example.org` domain.
(The brackets around the hostname tell Postfix not perform MX lookups.)

Ensure to compile the lookup tables for all files that have been edited:

    sudo postmap hash:/etc/postfix/sasl/passwd
    sudo postmap hash:/etc/postfix/tls_policy
    sudo postmap hash:/etc/postfix/relayhost_map

The configuration in `/etc/postfix/main.cf` is like that of the previous
section, except that we're replacing the `smtp_tls_*` options by
`smtp_tls_policy_maps`.  We also keep a default `relayhost` value for
envelope sender addresses that don't map the `relayhost_map` lookup
table.

    mynetworks_style    = host
    inet_interfaces     = loopback-only
    relayhost           = [smtp.fripost.org]:587

    smtp_sender_dependent_authentication = yes
    sender_dependent_relayhost_maps      = hash:$config_directory/relayhost_map

    smtp_sasl_auth_enable          = yes
    smtp_sasl_password_maps        = hash:/etc/postfix/sasl/passwd
    smtp_sasl_security_options     = noanonymous, noplaintext
    smtp_sasl_tls_security_options = noanonymous

    smtp_tls_policy_maps        = hash:$config_directory/tls_policy
    smtp_tls_fingerprint_digest = sha256

Be sure to reload (or even restart) Postfix after changing the
configuration.  In doubt, run `service postfix restart` or `systemctl
restart postfix`.