-
Notifications
You must be signed in to change notification settings - Fork 1
/
mailConfig
58 lines (47 loc) · 1.62 KB
/
mailConfig
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
#instructions from https://samhobbs.co.uk/2013/12/raspberry-pi-email-server-part-1-postfix
# https://samhobbs.co.uk/2013/12/raspberry-pi-email-server-part-2-dovecot
sudo apt-get update
sudo apt-get install postfix
cd /etc/postfix/
nano /etc/postfix/main.cf
#change myhostname to fully qualified domain name, eg. raspberrypi.com
sudo service postfix restart
nano /etc/postfix/main.cf
# add lines:
# home_mailbox = Maildir/
# mailbox_command =
sudo apt-get update
sudo apt-get install dovecot-common dovecot-imapd
sudo maildirmake.dovecot /etc/skel/Maildir
sudo maildirmake.dovecot /etc/skel/Maildir/.Drafts
sudo maildirmake.dovecot /etc/skel/Maildir/.Sent
sudo maildirmake.dovecot /etc/skel/Maildir/.Spam
sudo maildirmake.dovecot /etc/skel/Maildir/.Trash
sudo maildirmake.dovecot /etc/skel/Maildir/.Templates
sudo cp -r /etc/skel/Maildir /home/USER/
sudo chown -R USER:USER /home/USER/Maildir
sudo chmod -R 700 /home/USER/Maildir
nano /etc/dovecot/dovecot.conf
# add or change line: listen = *
sudo service dovecot restart
nano /etc/dovecot/conf.d/10-mail.conf
# change line to: mail_location = maildir:~/Maildir
nano /etc/postfix/main.cf
# add lines:
# smtpd_sasl_type = dovecot
# smtpd_sasl_path = private/auth
# smtpd_sasl_auth_enable = yes
nano /etc/dovecot/conf.d/10-master.conf
# replace line with:
# service auth {
# unix_listener /var/spool/postfix/private/auth {
# mode = 0660
# user = postfix
# group = postfix
# }
# }
disable_plaintext_auth = no
auth_mechanisms = plain login
sudo adduser kamera
sudo service postfix restart
sudo service dovecot restart