Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
freebsd:postfix_dovecot_virtual [2019/02/21 23:12] 127.0.0.1 Externe Bearbeitung |
freebsd:postfix_dovecot_virtual [2020/12/05 13:23] (aktuell) |
||
---|---|---|---|
Zeile 85: | Zeile 85: | ||
make install clean | make install clean | ||
(select DOCS, NLS, POSTFIX) | (select DOCS, NLS, POSTFIX) | ||
+ | </ | ||
+ | |||
+ | ===== Install Sympa ===== | ||
+ | <code console> | ||
+ | pkg install sympa spawn-fcgi | ||
</ | </ | ||
Zeile 818: | Zeile 823: | ||
chmod g+w data/ | chmod g+w data/ | ||
+ | </ | ||
+ | |||
+ | ===== Configure Sympa ===== | ||
+ | ==== Setup database for Sympa ==== | ||
+ | <code console> | ||
+ | mysql -u root -p | ||
+ | create database sympa CHARACTER SET utf8mb4; | ||
+ | grant all privileges on sympa.* to ' | ||
+ | quit | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Setup logging for Sympa ==== | ||
+ | <code console> | ||
+ | touch / | ||
+ | chmod 640 / | ||
+ | mkdir -p / | ||
+ | </ | ||
+ | Create file / | ||
+ | < | ||
+ | local1.* -/ | ||
+ | </ | ||
+ | Restart syslog: | ||
+ | <code console> | ||
+ | service syslogd restart | ||
+ | </ | ||
+ | |||
+ | Before we start we need to update the file: / | ||
+ | < | ||
+ | ######################################################################## | ||
+ | # Initial configuration | ||
+ | # See https:// | ||
+ | ######################################################################## | ||
+ | |||
+ | domain | ||
+ | listmaster | ||
+ | #lang en-US | ||
+ | |||
+ | ######################################################################## | ||
+ | # Setup database | ||
+ | # See https:// | ||
+ | ######################################################################## | ||
+ | |||
+ | db_type | ||
+ | db_name | ||
+ | db_host | ||
+ | #db_port | ||
+ | db_user | ||
+ | db_passwd | ||
+ | #db_env | ||
+ | |||
+ | ######################################################################## | ||
+ | # Configure system log | ||
+ | # See https:// | ||
+ | ######################################################################## | ||
+ | |||
+ | syslog | ||
+ | log_socket_type | ||
+ | |||
+ | ######################################################################## | ||
+ | # Configure mail server | ||
+ | # See https:// | ||
+ | ######################################################################## | ||
+ | |||
+ | sendmail_aliases | ||
+ | aliases_program | ||
+ | aliases_db_type | ||
+ | sendmail | ||
+ | # | ||
+ | |||
+ | ######################################################################## | ||
+ | # Configure HTTP server | ||
+ | # See https:// | ||
+ | ######################################################################## | ||
+ | |||
+ | mhonarc | ||
+ | # | ||
+ | |||
+ | # If you chose single domain setting, you may have to define following | ||
+ | # parameters in this sympa.conf file. Otherwise, if you chose virtual | ||
+ | # domain setting (recommended), | ||
+ | # each domain. | ||
+ | |||
+ | # | ||
+ | |||
+ | ######################################################################## | ||
+ | # Customizing Sympa | ||
+ | # You can customize Sympa, its web interface and/or SOAP/HTTP service | ||
+ | # defining more parameters in this file sympa.conf or robot.conf by each | ||
+ | # domain. | ||
+ | # For more details see https:// | ||
+ | ######################################################################## | ||
+ | |||
+ | # | ||
+ | |||
+ | </ | ||
+ | |||
+ | Fix permissions: | ||
+ | <code console> | ||
+ | chgrp sympa / | ||
+ | chmod g+w / | ||
+ | </ | ||
+ | |||
+ | Create database structure with: | ||
+ | <code console> | ||
+ | sympa.pl --health_check | ||
+ | </ | ||
+ | |||
+ | ==== Tests ==== | ||
+ | |||
+ | Test logging with: | ||
+ | <code console> | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | <code console> | ||
+ | sympa_wizard.pl | ||
+ | </ | ||
+ | |||
+ | ==== Configure Mailserver for Sympa ==== | ||
+ | Create file / | ||
+ | < | ||
+ | #--- [% list.name %]@[% list.domain %]: list transport map created at [% date %] | ||
+ | [% list.name %]@[% list.domain %] sympa:[% list.name %]@[% list.domain %] | ||
+ | [% list.name %]-request@[% list.domain %] sympa:[% list.name %]-request@[% list.domain %] | ||
+ | [% list.name %]-editor@[% list.domain %] sympa:[% list.name %]-editor@[% list.domain %] | ||
+ | [% list.name %]-subscribe@[% list.domain %] sympa:[% list.name %]-subscribe@[%list.domain %] | ||
+ | [% list.name %]-unsubscribe@[% list.domain %] sympa:[% list.name %]-unsubscribe@[% list.domain %] | ||
+ | [% list.name %][% return_path_suffix %]@[% list.domain %] sympabounce: | ||
+ | </ | ||
+ | Create some files: | ||
+ | <code console> | ||
+ | touch / | ||
+ | touch / | ||
+ | touch / | ||
+ | chmod 660 / | ||
+ | chown root:sympa / | ||
+ | |||
+ | postmap hash:/ | ||
+ | postmap hash:/ | ||
+ | chmod g+w / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Add to / | ||
+ | < | ||
+ | sympa | ||
+ | flags=hqRu null_sender= user=sympa argv=/ | ||
+ | |||
+ | sympabounce | ||
+ | flags=hqRu null_sender= user=sympa argv=/ | ||
+ | </ | ||
+ | |||
+ | Add to / | ||
+ | < | ||
+ | virtual_mailbox_domains = hash:/ | ||
+ | virtual_mailbox_maps = hash:/ | ||
+ | hash:/ | ||
+ | hash:/ | ||
+ | virtual_alias_maps = hash:/ | ||
+ | transport_maps = hash:/ | ||
+ | hash:/ | ||
+ | recipient_delimiter = + | ||
+ | </ | ||
+ | |||
+ | Adding new domain fechner.net with: | ||
+ | <code console> | ||
+ | mkdir -m 755 / | ||
+ | touch / | ||
+ | chown -R sympa:sympa / | ||
+ | mkdir -m 750 / | ||
+ | chown sympa:sympa / | ||
+ | </ | ||
+ | |||
+ | Modify / | ||
+ | < | ||
+ | wwsympa_url https:// | ||
+ | listmaster idefix@fechner.net | ||
+ | </ | ||
+ | |||
+ | Edit / | ||
+ | < | ||
+ | fechner.net | ||
+ | sympa@fechner.net | ||
+ | listmaster@fechner.net | ||
+ | bounce@fechner.net | ||
+ | abuse-feedback-report@fechner.net | ||
+ | </ | ||
+ | |||
+ | Edit / | ||
+ | < | ||
+ | sympa-request@fechner.net | ||
+ | sympa-owner@fechner.net | ||
+ | </ | ||
+ | |||
+ | Recreate the DB files: | ||
+ | <code console> | ||
+ | postmap hash:/ | ||
+ | postmap hash:/ | ||
+ | chmod g+w / | ||
+ | </ | ||
+ | |||
+ | Enable sympa and start it: | ||
+ | <code console> | ||
+ | sysrc sympa_enable=" | ||
+ | service sympa start | ||
+ | </ | ||
+ | ==== Configure NGINX for Sympa ==== | ||
+ | <code console> | ||
+ | sysrc spawn_fcgi_enable=" | ||
+ | sysrc spawn_fcgi_app="/ | ||
+ | sysrc spawn_fcgi_bindsocket="/ | ||
+ | sysrc spawn_fcgi_bindsocket_mode=" | ||
+ | sysrc spawn_fcgi_username=" | ||
+ | sysrc spawn_fcgi_groupname=" | ||
+ | |||
+ | service spawn-fcgi start | ||
</ | </ | ||
Zeile 916: | Zeile 1138: | ||
reject_non_fqdn_hostname, | reject_non_fqdn_hostname, | ||
reject_invalid_hostname | reject_invalid_hostname | ||
+ | |||
+ | # | ||
+ | mua_helo_restrictions = permit_sasl_authenticated, | ||
+ | # | ||
smtpd_sasl_type = dovecot | smtpd_sasl_type = dovecot | ||
Zeile 951: | Zeile 1177: | ||
smtpd_proxy_timeout=600s | smtpd_proxy_timeout=600s | ||
- | smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated | + | #smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated |
# Virtual Domain Configuration | # Virtual Domain Configuration | ||
Zeile 1093: | Zeile 1319: | ||
-o smtpd_reject_unlisted_recipient=no | -o smtpd_reject_unlisted_recipient=no | ||
# -o smtpd_client_restrictions=$mua_client_restrictions | # -o smtpd_client_restrictions=$mua_client_restrictions | ||
- | # | + | |
# -o smtpd_sender_restrictions=$mua_sender_restrictions | # -o smtpd_sender_restrictions=$mua_sender_restrictions | ||
-o smtpd_recipient_restrictions= | -o smtpd_recipient_restrictions= |