[mail]
This commit is contained in:
parent
0b6920e374
commit
6f368b37e8
25
content/mail_modoboa.rst
Normal file
25
content/mail_modoboa.rst
Normal file
@ -0,0 +1,25 @@
|
||||
apt-get install python3-imaplib
|
||||
|
||||
useradd modoboa
|
||||
su modoboa
|
||||
|
||||
mkdir venv_2.0.0-beta.3
|
||||
python3 -m venv ./venv_2.0.0-beta.3
|
||||
source ./venv_2.0.0-beta.3/bin/activate
|
||||
pip install psycopg2-binary
|
||||
> pip install psycopg2-binary==2.8.6
|
||||
pip install "git+https//github.com/modoboa/modoboa.git@2.0.0-beta.3#modoboa"
|
||||
pip install modoboa-sievefilters
|
||||
pip install modoboa-stats
|
||||
# create user modoboa and give the rights to mail database
|
||||
modoboa-admin.py deploy instance --collectstatic --domain listonmail.fr --dburl default:postgres://modoboa:modoboa_password@127.0.0.1:5432/mail
|
||||
|
||||
# fill the crontab with the good variables
|
||||
|
||||
# add the nginx/apache2 configuration
|
||||
|
||||
# add the uwsgi configuration
|
||||
|
||||
# configure uwsgi settings
|
||||
|
||||
https://github.com/modoboa/modoboa-webmail/issues/227#issuecomment-1003763831
|
||||
61
content/mail_new_domain.rst
Normal file
61
content/mail_new_domain.rst
Normal file
@ -0,0 +1,61 @@
|
||||
DOMAIN=gitu.be
|
||||
SELECTOR=mail
|
||||
IP=127.0.0.1
|
||||
|
||||
cd /etc/dkimkeys
|
||||
mkdir $DOMAIN
|
||||
opendkim-genkey --domain=$DOMAIN --selector=$SELECTOR --directory=./$DOMAIN
|
||||
chown -R opendkim: ./$DOMAIN
|
||||
|
||||
service opendkim restart
|
||||
|
||||
# Avoir un fichier ".ini" avec les details de l'accès API
|
||||
mkdir /etc/lexicon
|
||||
echo "dns_gandi_api_key = xxXXXxxx" > /etc/lexicon/gandi.ini
|
||||
TOKEN=`awk '{ print $3 }' /etc/lexicon/gandi-freepoteries.ini`
|
||||
lexicon gandi --auth-token $TOKEN --api-protocol rest --name $SELECTOR._domainkey list $DOMAIN TXT
|
||||
|
||||
# If it returns something, delete it
|
||||
lexicon gandi --auth-token $TOKEN --api-protocol rest --name $SELECTOR._domainkey delete $DOMAIN TXT
|
||||
|
||||
# Get dkim txt content in variable
|
||||
CONTENT=`cat gitu.be/mail.txt | tr -d '\n' | sed -E 's/^.*\(([^\)]*)\).*$/\1/;s/"([[:space:]])*"//g;s/ //g'`
|
||||
|
||||
# Check the content :
|
||||
echo $CONTENT
|
||||
|
||||
# Set the TXT row
|
||||
lexicon gandi --auth-token $TOKEN --api-protocol rest --name $SELECTOR._domainkey --content $CONTENT create $DOMAIN TXT
|
||||
|
||||
# DMARC
|
||||
lexicon gandi --auth-token $TOKEN --api-protocol rest --name _dmarc --content "v=DMARC1; p=quarantine; adkim=r; aspf=r;" create gitu.be TXT
|
||||
|
||||
# SPF
|
||||
lexicon gandi --auth-token $TOKEN --api-protocol rest --name '@' --content "v=spf1 mx a:mail.usinette.net ip4:91.121.171.218 ?all" create gitu.be TXT
|
||||
|
||||
# Create the domain on modoboa
|
||||
|
||||
# Set the password for domain administrator account
|
||||
|
||||
# Connect to your account using a mail client
|
||||
|
||||
# Use https://www.mail-tester.com/ to test your configuration
|
||||
|
||||
### DNS RECORDS ###
|
||||
|
||||
@ 86400 IN SOA ns1.gandi.net. hostmaster.gandi.net. 1645632008 10800 3600 604800
|
||||
10800
|
||||
@ 10800 IN A $IP
|
||||
@ 10800 IN AAAA $IPv6
|
||||
@ 10800 IN MX 10 $DOMAIN.
|
||||
@ 10800 IN MX 20 SECONDAY.MAIL.SERVER.
|
||||
@ 10800 IN TXT "v=spf1 mx a:$DOMAIN ip4:$IP ipv6:$IPv6 ?all"
|
||||
|
||||
_imap._tcp 10800 IN SRV 0 0 0 .
|
||||
_imaps._tcp 10800 IN SRV 0 1 993 listonmail.fr.
|
||||
_pop3._tcp 10800 IN SRV 0 0 0 .
|
||||
_pop3s._tcp 10800 IN SRV 10 1 995 listonmail.fr.
|
||||
_submission._tcp 10800 IN SRV 0 1 465 listonmail.fr.
|
||||
|
||||
webmail 10800 IN A $IP
|
||||
webmail 10800 IN AAAA $IPv6
|
||||
Loading…
Reference in New Issue
Block a user