Benutzer-Werkzeuge

Webseiten-Werkzeuge


freebsd:postfix_dovecot_virtual

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
freebsd:postfix_dovecot_virtual [2019/02/21 23:41]
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)
 +</code>
 +
 +===== Install Sympa =====
 +<code console>
 +pkg install sympa spawn-fcgi
 </code> </code>
  
Zeile 818: Zeile 823:
 chmod g+w data/virtual-mailman* chmod g+w data/virtual-mailman*
  
 +</code>
 +
 +===== Configure Sympa =====
 +==== Setup database for Sympa ====
 +<code console>
 +mysql -u root -p
 +create database sympa CHARACTER SET utf8mb4;
 +grant all privileges on sympa.* to 'sympa'@'localhost' identified by '_PW_';
 +quit
 +</code>
 +
 +
 +==== Setup logging for Sympa ====
 +<code console>
 +touch /var/log/sympa.log
 +chmod 640 /var/log/sympa.log
 +mkdir -p /usr/local/etc/syslog.d
 +</code>
 +Create file /usr/local/etc/syslog.d/sympa.conf:
 +<code>
 +local1.* -/var/log/sympa.log
 +</code>
 +Restart syslog:
 +<code console>
 +service syslogd restart
 +</code>
 +
 +Before we start we need to update the file: /usr/local/etc/sympa/sympa.conf
 +<code>
 +########################################################################
 +# Initial configuration
 +# See https://sympa-community.github.io/manual/install/generate-initial-configuration.html
 +########################################################################
 +
 +domain              fechner.net
 +listmaster          spam@fechner.net
 +#lang                en-US
 +
 +########################################################################
 +# Setup database
 +# See https://sympa-community.github.io/manual/install/setup-database.html
 +########################################################################
 +
 +db_type             MySQL
 +db_name             sympa
 +db_host             localhost
 +#db_port
 +db_user             sympa
 +db_passwd           _PW_
 +#db_env
 +
 +########################################################################
 +# Configure system log
 +# See https://sympa-community.github.io/manual/install/configure-system-log.html
 +########################################################################
 +
 +syslog              LOCAL1
 +log_socket_type     unix
 +
 +########################################################################
 +# Configure mail server
 +# See https://sympa-community.github.io/manual/install/configure-mail-server.html
 +########################################################################
 +
 +sendmail_aliases     /usr/local/etc/sympa/sympa_transport
 +aliases_program      postmap
 +aliases_db_type      hash
 +sendmail             /usr/local/sbin/sendmail
 +#sendmail_args       (if you use sendmail(1), this need not change)
 +
 +########################################################################
 +# Configure HTTP server
 +# See https://sympa-community.github.io/manual/install/configure-http-server.html
 +########################################################################
 +
 +mhonarc             /usr/local/bin/mhonarc
 +#log_facility        LOCAL1
 +
 +# 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), you should define them in robot.conf by
 +# each domain.
 +
 +#wwsympa_url         (You must define this parameter to enable web interface)
 +
 +########################################################################
 +# 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://sympa-community.github.io/manual/customize.html
 +########################################################################
 +
 +#log_level      1024
 +
 +</code>
 +
 +Fix permissions:
 +<code console>
 +chgrp sympa /usr/local/etc/sympa/sympa.conf
 +chmod g+w /usr/local/etc/sympa
 +</code>
 +
 +Create database structure with:
 +<code console>
 +sympa.pl --health_check
 +</code>
 +
 +==== Tests ====
 +
 +Test logging with:
 +<code console>
 +/usr/local/libexec/sympa/testlogs.pl
 +</code>
 +
 +<code console>
 +sympa_wizard.pl
 +</code>
 +
 +==== Configure Mailserver for Sympa ====
 +Create file /usr/local/etc/sympa/list_aliases.tt2:
 +<code>
 +#--- [% 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:[% list.name %]@[% list.domain %]
 +</code>
 +Create some files:
 +<code console>
 +touch /usr/local/etc/sympa/transport.sympa
 +touch /usr/local/etc/sympa/virtual.sympa
 +touch /usr/local/etc/sympa/sympa_transport
 +chmod 660 /usr/local/etc/sympa/sympa_transport
 +chown root:sympa /usr/local/etc/sympa/sympa_transport
 +
 +postmap hash:/usr/local/etc/sympa/transport.sympa
 +postmap hash:/usr/local/etc/sympa/virtual.sympa
 +chmod g+w /usr/local/etc/sympa/sympa_transport*
 +/usr/local/libexec/sympa/sympa_newaliases.pl
 +</code>
 +
 +Add to /usr/local/etc/postfix/master.cf
 +<code>
 +sympa   unix  -                               pipe
 +  flags=hqRu null_sender= user=sympa argv=/usr/local/libexec/sympa/queue ${nexthop}
 +
 +sympabounce   unix  -                               pipe
 +  flags=hqRu null_sender= user=sympa argv=/usr/local/libexec/sympa/bouncequeue ${nexthop}
 +</code>
 +
 +Add to /usr/local/etc/postfix/main.cf
 +<code>
 +virtual_mailbox_domains = hash:/usr/local/etc/sympa/transport.sympa
 +virtual_mailbox_maps = hash:/usr/local/etc/sympa/transport.sympa,
 +        hash:/usr/local/etc/sympa/sympa_transport,
 +        hash:/usr/local/etc/sympa/virtual.sympa
 +virtual_alias_maps = hash:/usr/local/etc/sympa/virtual.sympa
 +transport_maps = hash:/usr/local/etc/sympa/transport.sympa,
 +        hash:/usr/local/etc/sympa/sympa_transport
 +recipient_delimiter = +
 +</code>
 +
 +Adding new domain fechner.net with:
 +<code console>
 +mkdir -m 755 /usr/local/etc/sympa/fechner.net
 +touch /usr/local/etc/sympa/fechner.net/robot.conf
 +chown -R sympa:sympa /usr/local/etc/sympa/fechner.net
 +mkdir -m 750 /usr/local/share/sympa/list_data/fechner.net
 +chown sympa:sympa /usr/local/share/sympa/list_data/fechner.net
 +</code>
 +
 +Modify /usr/local/etc/sympa/fechner.net/robot.conf:
 +<code>
 +wwsympa_url https://fechner.net/sympa
 +listmaster idefix@fechner.net
 +</code>
 +
 +Edit /usr/local/etc/sympa/transport.sympa
 +<code>
 +fechner.net                error:User unknown in recipient table
 +sympa@fechner.net          sympa:sympa@fechner.net
 +listmaster@fechner.net     sympa:listmaster@fechner.net
 +bounce@fechner.net         sympabounce:sympa@fechner.net
 +abuse-feedback-report@fechner.net  sympabounce:sympa@fechner.net
 +</code>
 +
 +Edit /usr/local/etc/sympa/virtual.sympa
 +<code>
 +sympa-request@fechner.net  postmaster@localhost
 +sympa-owner@fechner.net    postmaster@localhost
 +</code>
 +
 +Recreate the DB files:
 +<code console>
 +postmap hash:/usr/local/etc/sympa/transport.sympa
 +postmap hash:/usr/local/etc/sympa/virtual.sympa
 +chmod g+w /usr/local/etc/sympa/sympa_transport*
 +</code>
 +
 +Enable sympa and start it:
 +<code console>
 +sysrc sympa_enable="YES"
 +service sympa start
 +</code>
 +==== Configure NGINX for Sympa ====
 +<code console>
 +sysrc spawn_fcgi_enable="YES"
 +sysrc spawn_fcgi_app="/usr/local/libexec/sympa/wwsympa.fcgi"
 +sysrc spawn_fcgi_bindsocket="/var/run/sympa/wwsympa.socket"
 +sysrc spawn_fcgi_bindsocket_mode="0777"
 +sysrc spawn_fcgi_username="sympa"
 +sysrc spawn_fcgi_groupname="sympa"
 +
 +service spawn-fcgi start
 </code> </code>
  
Zeile 918: Zeile 1140:
  
 #mua_client_restrictions = #mua_client_restrictions =
-mua_helo_restrictions =+mua_helo_restrictions = permit_sasl_authenticated,reject
 #mua_sender_restrictions = #mua_sender_restrictions =
    
freebsd/postfix_dovecot_virtual.1550788916.txt.gz · Zuletzt geändert: 2019/02/21 23:41 von 127.0.0.1