DeadmanDAO Mail Server: Difference between revisions
No edit summary |
No edit summary |
||
Line 21: | Line 21: | ||
* Sixth Pass: Deb 10, two instances, more relaxed exploration now that the traxel list is working. | * Sixth Pass: Deb 10, two instances, more relaxed exploration now that the traxel list is working. | ||
== Short Term Solution | == Create Instance == | ||
=== Interserver Web Interface === | |||
# go to interserver | |||
# create an instance | |||
## Single Slice ($6/mo at this time) | |||
## Debian 9 (Deb 9 has Mailman 2, Deb 10 has Mailman 3) | |||
## KVM | |||
# set reverse DNS to diffie.deadmandao.com | |||
# Note the IP address | |||
=== Update to Latest === | |||
Log in root@ip.address using password you provided | |||
<pre> | |||
apt-get update | |||
apt-get -y upgrade | |||
apt-get -y dist-upgrade # if needed | |||
reboot | |||
</pre> | |||
=== Add User Account === | |||
Log in root@ip.address | |||
<pre> | |||
apt-get -y install sudo | |||
adduser bob | |||
usermod -G sudo bob | |||
exit | |||
</pre> | |||
Log in to bob@ip.address | |||
== Set SPF == | |||
<pre> | |||
sudo apt-get install net-tools | |||
sudo ifconfig | |||
</pre> | |||
That'll give you the ip4 and ip6 addresses, which go into the DNS text record: | |||
* v=spf1 ip4:66.23.226.216 ip6:fe80::216:3eff:fe24:10e1 -all | |||
== Set Other DNS == | |||
* A Record, diffie, 66.23.226.216 | |||
* A Record, @, 66.23.226.216 | |||
* CNAME Record, www, diffie.deadmandao.com | |||
* CNAME Record, mail, diffie.deadmandao.com | |||
* TXT Record, diffe, v=spf1 ip4:66.23.226.216 ip6:fe80::216:3eff:fe24:10e1 -all | |||
* MX Record, deadmandao.com, mail.deadmandao.com, 10 | |||
== Set Hostname == | |||
<pre> | |||
sudo apt-get install emacs-nox | |||
sudo emacs -nw /etc/hostname | |||
> diffie | |||
sudo emacs -nw /etc/hosts | |||
> 66.23.226.216 diffie.deadmandao.com diffie | |||
sudo reboot | |||
</pre> | |||
Log in to bob@diffie.deadmandao.com | |||
<pre> | |||
hostname | |||
hostname --all-fqdn | |||
dnsdomainname | |||
</pre> | |||
== SMTP Server == | |||
<pre> | |||
sudo apt-get install postfix | |||
</pre> | |||
* Internet Site | |||
* deadmandao.com is the host domain | |||
* send a test email | |||
<pre> | |||
echo "Subject: sendmail test" | /usr/sbin/sendmail -v emailaddress | |||
</pre> | |||
Had trouble with IPv6 in Debian 9 ("Network is unreachable"). Used the following in main.cf to switch to IPv4 only. | |||
<pre> | |||
# inet_protocols = all | |||
inet_protocols = ipv4 | |||
</pre> | |||
== Mailman Install == | |||
=== install === | |||
<pre> | |||
sudo apt install mailman | |||
</pre> | |||
=== init list === | |||
<pre> | |||
sudo newlist | |||
> roundtable | |||
</pre> | |||
It tells me that I should put the following in aliases: | |||
<pre> | |||
## roundtable mailing list | |||
roundtable: "|/var/lib/mailman/mail/mailman post roundtable" | |||
roundtable-admin: "|/var/lib/mailman/mail/mailman admin roundtable" | |||
roundtable-bounces: "|/var/lib/mailman/mail/mailman bounces roundtable" | |||
roundtable-confirm: "|/var/lib/mailman/mail/mailman confirm roundtable" | |||
roundtable-join: "|/var/lib/mailman/mail/mailman join roundtable" | |||
roundtable-leave: "|/var/lib/mailman/mail/mailman leave roundtable" | |||
roundtable-owner: "|/var/lib/mailman/mail/mailman owner roundtable" | |||
roundtable-request: "|/var/lib/mailman/mail/mailman request roundtable" | |||
roundtable-subscribe: "|/var/lib/mailman/mail/mailman subscribe roundtable" | |||
roundtable-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe roundtable" | |||
</pre> | |||
<pre> | |||
Enter the name of the list: test | |||
Enter the email of the person running the list: bob@traxel.com | |||
Initial test password: | |||
To finish creating your mailing list, you must edit your /etc/aliases (or | |||
equivalent) file by adding the following lines, and possibly running the | |||
`newaliases' program: | |||
## test mailing list | |||
test: "|/var/lib/mailman/mail/mailman post test" | |||
test-admin: "|/var/lib/mailman/mail/mailman admin test" | |||
test-bounces: "|/var/lib/mailman/mail/mailman bounces test" | |||
test-confirm: "|/var/lib/mailman/mail/mailman confirm test" | |||
test-join: "|/var/lib/mailman/mail/mailman join test" | |||
test-leave: "|/var/lib/mailman/mail/mailman leave test" | |||
test-owner: "|/var/lib/mailman/mail/mailman owner test" | |||
test-request: "|/var/lib/mailman/mail/mailman request test" | |||
test-subscribe: "|/var/lib/mailman/mail/mailman subscribe test" | |||
test-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe test" | |||
</pre> | |||
== Version 2 Instructions for Mailman == | |||
* https://docs.mailman3.org/en/latest/pre-installation-guide.html | |||
=== Install PIP === | |||
<pre> | |||
sudo apt install python3-pip | |||
</pre> | |||
Lots of dependencies | |||
=== Side Note: Django Command Reference === | |||
Run the dev webserver | |||
<pre> | |||
cd /path/to/project | |||
sudo python manage.py runserver | |||
</pre> | |||
Pull all the static files to a single location (for serving via Apache, for example) | |||
<pre> | |||
python manage.py collectstatic | |||
</pre> | |||
=== Install Mailman3 Full Suite === | |||
Lots of dependencies here. | |||
<pre> | |||
sudo apt install mailman3-full | |||
</pre> | |||
== Webserver Install == | |||
<pre> | |||
sudo apt install apache2 | |||
</pre> | |||
=== Enable UWSGI, Link Mailman === | |||
Something Like | |||
<pre> | |||
sudo apt install libapache2-mod-uwsgi | |||
sudo a2enmod proxy_uwsgi | |||
sudo ln -s /etc/mailman3/apache.conf /etc/apache2/sites-available/100-mailman.conf | |||
sudo a2ensite 100-mailman | |||
sudo service apache2 restart | |||
</pre> | |||
=== Add TLS/SSL === | |||
https://certbot.eff.org/instructions?ws=apache&os=debianbuster | |||
==== Add Snapd ==== | |||
<pre> | |||
sudo apt update | |||
sudo apt install snapd | |||
sudo snap install core | |||
sudo snap refresh core | |||
</pre> | |||
==== Snap Install Certbot ==== | |||
<pre> | |||
sudo snap install --classic certbot | |||
sudo ln -s /snap/bin/certbot /usr/bin/certbot | |||
</pre> | |||
==== Get a Cert for Apache ==== | |||
<pre> | |||
sudo certbot --apache -d deadmandao.com -d www.deadmandao.com | |||
</pre> | |||
Verified to here. | |||
== Mailman Core Configuration == | |||
https://docs.mailman3.org/en/latest/config-core.html | |||
= Short Term Solution = | |||
Using interserver.systemicbias.com | Using interserver.systemicbias.com | ||
Line 46: | Line 274: | ||
</pre> | </pre> | ||
Revision as of 00:05, 12 January 2022
AWS SES may be the solution: https://docs.aws.amazon.com/ses/latest/dg/lists-and-subscriptions.html
No, it doesn't have nearly the capabilities of a real mailing list system.
Mailchimp is out because it was bought for so much money that the money squeeze is going to be intense.
Other commercial providers are not significantly less risky than Mailchimp.
Mailman is robust once deployed and the initial build-out is not too painful.
DeadmanDAO Mailman Build-out
- MailingListDeadmanFirstPass (Deb 10, Mailman 3: installed Apache and Certbot before Mailman, which made it hard to deploy the Mailman web console)
- MailingListDeadmanSecondPass (Deb 10, Mailman 3: had trouble getting the Snap/PIP/VirtualEnv version of Mailman to let me in as an administrator)
- MailingListDeadmanThirdPass Deb 9, Mailman 2, had trouble getting the Mailman executables to execute as cgi's.
- MailingListDeadmanFourthPass: Deb 10, Mailman 2. Repeatedly failed sendmail test (as have/would the others, though I was inconsistently testing)
- MailingListDeadmanFifthPass: Frustrated. Using traxel.com's install of Mailman. Successful, if unsatisfying.
- Sixth Pass: Deb 10, two instances, more relaxed exploration now that the traxel list is working.
Create Instance
Interserver Web Interface
- go to interserver
- create an instance
- Single Slice ($6/mo at this time)
- Debian 9 (Deb 9 has Mailman 2, Deb 10 has Mailman 3)
- KVM
- set reverse DNS to diffie.deadmandao.com
- Note the IP address
Update to Latest
Log in root@ip.address using password you provided
apt-get update apt-get -y upgrade apt-get -y dist-upgrade # if needed reboot
Add User Account
Log in root@ip.address
apt-get -y install sudo adduser bob usermod -G sudo bob exit
Log in to bob@ip.address
Set SPF
sudo apt-get install net-tools sudo ifconfig
That'll give you the ip4 and ip6 addresses, which go into the DNS text record:
- v=spf1 ip4:66.23.226.216 ip6:fe80::216:3eff:fe24:10e1 -all
Set Other DNS
- A Record, diffie, 66.23.226.216
- A Record, @, 66.23.226.216
- CNAME Record, www, diffie.deadmandao.com
- CNAME Record, mail, diffie.deadmandao.com
- TXT Record, diffe, v=spf1 ip4:66.23.226.216 ip6:fe80::216:3eff:fe24:10e1 -all
- MX Record, deadmandao.com, mail.deadmandao.com, 10
Set Hostname
sudo apt-get install emacs-nox sudo emacs -nw /etc/hostname > diffie sudo emacs -nw /etc/hosts > 66.23.226.216 diffie.deadmandao.com diffie sudo reboot
Log in to bob@diffie.deadmandao.com
hostname hostname --all-fqdn dnsdomainname
SMTP Server
sudo apt-get install postfix
- Internet Site
- deadmandao.com is the host domain
- send a test email
echo "Subject: sendmail test" | /usr/sbin/sendmail -v emailaddress
Had trouble with IPv6 in Debian 9 ("Network is unreachable"). Used the following in main.cf to switch to IPv4 only.
# inet_protocols = all inet_protocols = ipv4
Mailman Install
install
sudo apt install mailman
init list
sudo newlist > roundtable
It tells me that I should put the following in aliases:
## roundtable mailing list roundtable: "|/var/lib/mailman/mail/mailman post roundtable" roundtable-admin: "|/var/lib/mailman/mail/mailman admin roundtable" roundtable-bounces: "|/var/lib/mailman/mail/mailman bounces roundtable" roundtable-confirm: "|/var/lib/mailman/mail/mailman confirm roundtable" roundtable-join: "|/var/lib/mailman/mail/mailman join roundtable" roundtable-leave: "|/var/lib/mailman/mail/mailman leave roundtable" roundtable-owner: "|/var/lib/mailman/mail/mailman owner roundtable" roundtable-request: "|/var/lib/mailman/mail/mailman request roundtable" roundtable-subscribe: "|/var/lib/mailman/mail/mailman subscribe roundtable" roundtable-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe roundtable"
Enter the name of the list: test Enter the email of the person running the list: bob@traxel.com Initial test password: To finish creating your mailing list, you must edit your /etc/aliases (or equivalent) file by adding the following lines, and possibly running the `newaliases' program: ## test mailing list test: "|/var/lib/mailman/mail/mailman post test" test-admin: "|/var/lib/mailman/mail/mailman admin test" test-bounces: "|/var/lib/mailman/mail/mailman bounces test" test-confirm: "|/var/lib/mailman/mail/mailman confirm test" test-join: "|/var/lib/mailman/mail/mailman join test" test-leave: "|/var/lib/mailman/mail/mailman leave test" test-owner: "|/var/lib/mailman/mail/mailman owner test" test-request: "|/var/lib/mailman/mail/mailman request test" test-subscribe: "|/var/lib/mailman/mail/mailman subscribe test" test-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe test"
Version 2 Instructions for Mailman
Install PIP
sudo apt install python3-pip
Lots of dependencies
Side Note: Django Command Reference
Run the dev webserver
cd /path/to/project sudo python manage.py runserver
Pull all the static files to a single location (for serving via Apache, for example)
python manage.py collectstatic
Install Mailman3 Full Suite
Lots of dependencies here.
sudo apt install mailman3-full
Webserver Install
sudo apt install apache2
Enable UWSGI, Link Mailman
Something Like
sudo apt install libapache2-mod-uwsgi sudo a2enmod proxy_uwsgi sudo ln -s /etc/mailman3/apache.conf /etc/apache2/sites-available/100-mailman.conf sudo a2ensite 100-mailman sudo service apache2 restart
Add TLS/SSL
https://certbot.eff.org/instructions?ws=apache&os=debianbuster
Add Snapd
sudo apt update sudo apt install snapd sudo snap install core sudo snap refresh core
Snap Install Certbot
sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot
Get a Cert for Apache
sudo certbot --apache -d deadmandao.com -d www.deadmandao.com
Verified to here.
Mailman Core Configuration
https://docs.mailman3.org/en/latest/config-core.html
Short Term Solution
Using interserver.systemicbias.com
Enter the name of the list: crypto Enter the email of the person running the list: bob@traxel.com Initial crypto password: To finish creating your mailing list, you must edit your /etc/aliases (or equivalent) file by adding the following lines, and possibly running the `newaliases' program: ## crypto mailing list crypto: "|/var/lib/mailman/mail/mailman post crypto" crypto-admin: "|/var/lib/mailman/mail/mailman admin crypto" crypto-bounces: "|/var/lib/mailman/mail/mailman bounces crypto" crypto-confirm: "|/var/lib/mailman/mail/mailman confirm crypto" crypto-join: "|/var/lib/mailman/mail/mailman join crypto" crypto-leave: "|/var/lib/mailman/mail/mailman leave crypto" crypto-owner: "|/var/lib/mailman/mail/mailman owner crypto" crypto-request: "|/var/lib/mailman/mail/mailman request crypto" crypto-subscribe: "|/var/lib/mailman/mail/mailman subscribe crypto" crypto-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe crypto"