StuRa:Server/SRS14/2018

Aus Wiki StuRa HTW Dresden
Zur Navigation springen Zur Suche springen

Verwendungszweck: mailman für lists.htw.stura-dresden.de

Ports

installierte Ports

konfigurierte Ports

apache


OPTIONS_FILE_SET+=AUTH_BASIC
OPTIONS_FILE_SET+=AUTH_DIGEST
OPTIONS_FILE_SET+=AUTHN_ALIAS
OPTIONS_FILE_SET+=AUTHN_ANON
OPTIONS_FILE_UNSET+=AUTHN_DBD
OPTIONS_FILE_SET+=AUTHN_DBM
OPTIONS_FILE_SET+=AUTHN_DEFAULT
OPTIONS_FILE_SET+=AUTHN_FILE
OPTIONS_FILE_SET+=AUTHZ_DBM
OPTIONS_FILE_SET+=AUTHZ_DEFAULT
OPTIONS_FILE_SET+=AUTHZ_GROUPFILE
OPTIONS_FILE_SET+=AUTHZ_HOST
OPTIONS_FILE_SET+=AUTHZ_OWNER
OPTIONS_FILE_SET+=AUTHZ_USER
OPTIONS_FILE_UNSET+=AUTHNZ_LDAP
OPTIONS_FILE_UNSET+=LDAP
OPTIONS_FILE_UNSET+=DBD
OPTIONS_FILE_SET+=CACHE
OPTIONS_FILE_SET+=DISK_CACHE
OPTIONS_FILE_SET+=FILE_CACHE
OPTIONS_FILE_UNSET+=MEM_CACHE
OPTIONS_FILE_SET+=DAV
OPTIONS_FILE_SET+=DAV_FS
OPTIONS_FILE_UNSET+=DAV_LOCK
OPTIONS_FILE_SET+=ACTIONS
OPTIONS_FILE_SET+=ALIAS
OPTIONS_FILE_SET+=ASIS
OPTIONS_FILE_SET+=AUTOINDEX
OPTIONS_FILE_SET+=CERN_META
OPTIONS_FILE_SET+=CGI
OPTIONS_FILE_UNSET+=CGID
OPTIONS_FILE_SET+=CHARSET_LITE
OPTIONS_FILE_SET+=DEFLATE
OPTIONS_FILE_SET+=DIR
OPTIONS_FILE_SET+=DUMPIO
OPTIONS_FILE_SET+=ENV
OPTIONS_FILE_SET+=EXPIRES
OPTIONS_FILE_SET+=HEADERS
OPTIONS_FILE_SET+=IMAGEMAP
OPTIONS_FILE_SET+=INCLUDE
OPTIONS_FILE_SET+=INFO
OPTIONS_FILE_SET+=LOG_CONFIG
OPTIONS_FILE_SET+=LOGIO
OPTIONS_FILE_SET+=MIME
OPTIONS_FILE_SET+=MIME_MAGIC
OPTIONS_FILE_SET+=NEGOTIATION
OPTIONS_FILE_SET+=REWRITE
OPTIONS_FILE_SET+=SETENVIF
OPTIONS_FILE_SET+=SPELING
OPTIONS_FILE_SET+=STATUS
OPTIONS_FILE_SET+=UNIQUE_ID
OPTIONS_FILE_SET+=USERDIR
OPTIONS_FILE_SET+=USERTRACK
OPTIONS_FILE_SET+=VHOST_ALIAS
OPTIONS_FILE_SET+=FILTER
OPTIONS_FILE_UNSET+=SUBSTITUTE
OPTIONS_FILE_SET+=VERSION
OPTIONS_FILE_SET+=SSL
OPTIONS_FILE_UNSET+=SUEXEC
OPTIONS_FILE_UNSET+=SUEXEC_RSRCLIMIT
OPTIONS_FILE_UNSET+=SUEXEC_USERDIR
OPTIONS_FILE_SET+=REQTIMEOUT
OPTIONS_FILE_UNSET+=PROXY
OPTIONS_FILE_UNSET+=IPV4_MAPPED
OPTIONS_FILE_UNSET+=BUCKETEER
OPTIONS_FILE_UNSET+=CASE_FILTER
OPTIONS_FILE_UNSET+=CASE_FILTER_IN
OPTIONS_FILE_UNSET+=EXT_FILTER
OPTIONS_FILE_UNSET+=LOG_FORENSIC
OPTIONS_FILE_UNSET+=OPTIONAL_HOOK_EXPORT
OPTIONS_FILE_UNSET+=OPTIONAL_HOOK_IMPORT
OPTIONS_FILE_UNSET+=OPTIONAL_FN_IMPORT
OPTIONS_FILE_UNSET+=OPTIONAL_FN_EXPORT
OPTIONS_FILE_UNSET+=PROXY_AJP
OPTIONS_FILE_UNSET+=PROXY_BALANCER
OPTIONS_FILE_UNSET+=PROXY_CONNECT
OPTIONS_FILE_UNSET+=PROXY_FTP
OPTIONS_FILE_UNSET+=PROXY_HTTP
OPTIONS_FILE_UNSET+=PROXY_SCGI

apr


OPTIONS_FILE_SET+=THREADS
OPTIONS_FILE_SET+=IPV6
OPTIONS_FILE_SET+=DEVRANDOM
OPTIONS_FILE_SET+=BDB
OPTIONS_FILE_SET+=GDBM
OPTIONS_FILE_UNSET+=LDAP
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=NDBM
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_UNSET+=SQLITE

dovecot2


OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_SET+=EXAMPLES
OPTIONS_FILE_UNSET+=GSSAPI
OPTIONS_FILE_SET+=KQUEUE
OPTIONS_FILE_UNSET+=LDAP
OPTIONS_FILE_UNSET+=LIBWRAP
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_UNSET+=SOLR
OPTIONS_FILE_UNSET+=SQLITE
OPTIONS_FILE_SET+=SSL
OPTIONS_FILE_UNSET+=VPOPMAIL

gdbm


OPTIONS_FILE_UNSET+=COMPAT

help2man

libiconv

m4

mailman


OPTIONS_FILE_SET+=DOCS
OPTIONS_FILE_UNSET+=HTDIG
OPTIONS_FILE_SET+=INTEGRATION
OPTIONS_FILE_SET+=MTA
OPTIONS_FILE_UNSET+=NAMAZU2
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_UNSET+=SENDMAIL
OPTIONS_FILE_UNSET+=EXIM3
OPTIONS_FILE_UNSET+=EXIM4
OPTIONS_FILE_SET+=POSTFIX
OPTIONS_FILE_UNSET+=COURIER

pcre

perl-threaded

portupgrade

postfix


OPTIONS_FILE_SET+=PCRE
OPTIONS_FILE_UNSET+=SASL2
OPTIONS_FILE_UNSET+=DOVECOT
OPTIONS_FILE_UNSET+=DOVECOT2
OPTIONS_FILE_UNSET+=SASLKRB5
OPTIONS_FILE_UNSET+=SASLKMIT
OPTIONS_FILE_UNSET+=TLS
OPTIONS_FILE_UNSET+=BDB
OPTIONS_FILE_UNSET+=MYSQL
OPTIONS_FILE_UNSET+=PGSQL
OPTIONS_FILE_UNSET+=SQLITE
OPTIONS_FILE_UNSET+=OPENLDAP
OPTIONS_FILE_UNSET+=LDAP_SASL
OPTIONS_FILE_UNSET+=CDB
OPTIONS_FILE_UNSET+=NIS
OPTIONS_FILE_UNSET+=VDA
OPTIONS_FILE_UNSET+=TEST
OPTIONS_FILE_UNSET+=SPF
OPTIONS_FILE_UNSET+=INST_BASE



Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y

python27


OPTIONS_FILE_SET+=EXAMPLES
OPTIONS_FILE_UNSET+=FPECTL
OPTIONS_FILE_SET+=IPV6
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_UNSET+=PTH
OPTIONS_FILE_SET+=PYMALLOC
OPTIONS_FILE_UNSET+=SEM
OPTIONS_FILE_SET+=THREADS
OPTIONS_FILE_UNSET+=UCS2
OPTIONS_FILE_SET+=UCS4

sudo


OPTIONS_FILE_SET+=AUDIT
OPTIONS_FILE_UNSET+=DISABLE_AUTH
OPTIONS_FILE_SET+=DISABLE_ROOT_SUDO
OPTIONS_FILE_UNSET+=INSULTS
OPTIONS_FILE_UNSET+=LDAP
OPTIONS_FILE_SET+=NLS
OPTIONS_FILE_UNSET+=NOARGS_SHELL
OPTIONS_FILE_UNSET+=OPIE

ruby

zsh

zusätzliche Konfigurationsdateien

Jail

/etc/rc.conf


apache22_enable="YES"
mailman_enable="YES"
sshd_enable="YES"
dovecot_enable="YES"

Konfiguration der Programme

apache

httpd.conf


…
ServrerAdmin you@example.com
…

ServerName www.example.com:80
…
# Virtual hosts
Include etc/apache22/extra/httpd-vhosts.conf
…

httpd-vhost.conf


# Mailman mailing list domain.
#
<Virtualhost *:80>
  ServerAdmin webmaster@stura.htw-dresden.de
  DocumentRoot "/usr/local/mailman/lists"
  ServerName lists.stura.htw-dresden.de
  ServerAlias lists.stura.htw-dresden.de
  <Directory /usr/local/mailman/archives/>
      Options FollowSymLinks
      AllowOverride None
  </Directory>
  Alias /pipermail/ /usr/local/mailman/archives/public/
  Alias /images/mailman/ /usr/share/images/mailman/
  ScriptAlias /admin /usr/local/mailman/cgi-bin/admin
  ScriptAlias /admindb /usr/local/mailman/cgi-bin/admindb
  ScriptAlias /confirm /usr/local/mailman/cgi-bin/confirm
  ScriptAlias /create /usr/local/mailman/cgi-bin/create
  ScriptAlias /edithtml /usr/local/mailman/cgi-bin/edithtml
  ScriptAlias /listinfo /usr/local/mailman/cgi-bin/listinfo
  ScriptAlias /options /usr/local/mailman/cgi-bin/options
  ScriptAlias /private /usr/local/mailman/cgi-bin/private
  ScriptAlias /rmlist /usr/local/mailman/cgi-bin/rmlist
  ScriptAlias /roster /usr/local/mailman/cgi-bin/roster
  ScriptAlias /subscribe /usr/local/mailman/cgi-bin/subscribe
  ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
  ScriptAlias / /usr/local/mailman/cgi-bin/listinfo
  <Directory "/usr/local/mailman">
     AllowOverride All
     Options FollowSymlinks
     Order allow,deny
     Allow from all
  </Directory>
  ErrorLog /var/log/mailman-error.log
#   CustomLog /var/log/mailman-access.log combined
</Virtualhost>
...

NOTE:

Notice the addition of the default HTTP directory. The reason for this is due to the fact that once virtual hosting is enabled, the default directory used by Apache is the first VirtualHost listed in the httpd-vhosts.conf file. So, make sure that what ever site you plan on using as the default site for that machine comes first in the list of virtual hosts in the httpd-vhosts.conf file.

After adding the above VirtualHost directive, you can delete or comment out the remaining lines in the httpd-vhosts.conf file being as they’re just the default examples and pretty much useless.

dovecot2

default config kopieren


# cp /usr/local/share/doc/dovecot/example-config/dovecot.conf /usr/local/etc/dovecot/dovecot.conf

dovecot.conf


protocols = imap pop3
disable_plaintext_auth = no
ssl = no
mail_location = mbox:~/mail/:INBOX=/var/mail/%u
mail_privileged_group = mail
protocol imap {
 imap_client_workarounds = delay-newmail outlook-idle netscape-eoh tb-extra-mailbox-sep
}

maildrop

  • maildir in users homeverzeichnis anlegen

maildrop-maildirmake Mail

  • im homeverzeichnis die Datei .mailfilter anlegen:

MAILBOX="$HOME/Mail"
DEFAULT="$MAILBOX"

  • chmod 600 .mailfilter
  • maildrop in postfix main.cf einarbeiten

mailbox_command = /usr/local/bin/maildrop -d ${USER}

mailman

Set Site Password


# cd /usr/local/mailman
# bin/mmsitepass
New site password: mailman_password
Again to confirm password: mailman_password

Create Mailman list


# bin/newlist
Enter the name of the list: mailman
Enter the email of the person running the list: you@domain.tld
Initial mailman password: list_password

You’ll then see instructions to add aliases for the mailing list. We need not worry about that because everything
is virtual. So, proceeding… Hit enter to notify mailman owner… ENTER

bin/genaliases

Add list to Mailman configuration file /usr/local/mailman/Mailman/mm_cfg.py


MTA = 'Postfix'
# The default language for this server.
DEFAULT_SERVER_LANGUAGE = 'de'
# Unset send_reminders on newly created lists
DEFAULT_SEND_REMINDERS = 0
DEFAULT_SEND_WELCOME_MSG = 0
DEFAULT_SEND_GOODBYE_MSG = 0
DEFAULT_ADMIN_NOTIFY_MCHANGES = 1
DEFAULT_NEW_MEMBER_OPTIONS = 272
DEFAULT_RESPOND_TO_POST_REQUESTS = 0 
DEFAULT_ADMINISTRIVIA = 0
DEFAULT_MAX_MESSAGE_SIZE = 0
DEFAULT_MAX_NUM_RECIPIENTS = 0
DEFAULT_REQUIRE_EXPLICIT_DESTINATION = 0
# SUBSCRIBE POLICY
# 0 - open list (only when ALLOW_OPEN_SUBSCRIBE is set to 1) **
# 1 - confirmation required for subscribes
# 2 - admin approval required for subscribes
# 3 - both confirmation and admin approval required
#
# ** please do not choose option 0 if you are not allowing open
# subscribes (next variable)
DEFAULT_SUBSCRIBE_POLICY = 3
# Does this site allow completely unchecked subscriptions?
ALLOW_OPEN_SUBSCRIBE = Yes

# Private_roster == 0: anyone can see, 1: members only, 2: admin only.
DEFAULT_PRIVATE_ROSTER = 0

# Are archives public or private by default?
# 0=public, 1=private
DEFAULT_ARCHIVE_PRIVATE = 1

# What shold happen to non-member posts which are do not match explicit
# non-member actions?
# 0 = Accept
# 1 = Hold
# 2 = Reject
# 3 = Discard
DEFAULT_GENERIC_NONMEMBER_ACTION = 0

SMTPHOST = 'localhost'
# Put YOUR site-specific settings below this line.
add_virtualhost('lists.domain.tld','domain.tld')
add_virtualhost('domain.tld','domain.tld')
OWNERS_CAN_DELETE_THEIR_OWN_LISTS = 'YES'

geänderte allgemeine Listen-Informationsseite

geänderte allgemeine Listen-Informationsseite für Mail-Verteiler, in die sich keine keine Person einschreiben soll
Entfernung von
   <p>Sie können im folgenden Abschnitt diese Liste abonnieren
     oder ein bestehendes Abonnement ändern.
   </td>
 </tr>
 <TR>
   <TD COLSPAN="2" WIDTH="100%" BGCOLOR="#FFF0D0">
     <B><FONT COLOR="#000000">Abonnieren von <MM-List-Name></FONT></B>
   </TD>
 </TR>
 <tr>
   <td colspan="2">
   <P>
   Abonnieren Sie <MM-List-Name>, indem Sie das folgende Formular
   ausfüllen:
   <MM-List-Subscription-Msg>
   <ul>
     <MM-Subscribe-Form-Start>
     <TABLE BORDER="0" CELLSPACING="2" CELLPADDING="2" WIDTH="70%">
     <TR>
       <TD BGCOLOR="#dddddd" WIDTH="55%">Ihre E-Mail-Adresse:</TD>
       <TD WIDTH="33%"><MM-Subscribe-Box></TD>
       <TD WIDTH="12%"> </TD>
     </TR>
     <tr>
       <td bgcolor="#dddddd" width="55%">Ihr Name (optional):</td>
       <td width="33%"><mm-fullname-box></td>
       <TD WIDTH="12%"> </TD>
     </TR>
     <TR>
       <TD COLSPAN="3"><FONT SIZE=-1>Sie können weiter unten ein Passwort
       eingeben. Dieses Passwort bietet nur eine geringe Sicherheit,
       sollte aber verhindern, dass andere Ihr Abonnement
       manipulieren. <b>Verwenden Sie kein wertvolles Passwort</b>,
       da es ab und zu im Klartext an Sie geschickt wird!

       <br><br>Wenn Sie kein Passwort eingeben, wird für Sie ein
       Zufallspasswort generiert und Ihnen zugeschickt, sobald Sie Ihr
       Abonnement bestätigt haben. Sie können sich Ihr Passwort
       jederzeit per E-Mail zuschicken lassen, wenn Sie weiter unten
       die Seite zum ändern Ihrer persönlichen Einstellungen aufrufen.
       <MM-Reminder> 	</font></TD>
     </TR>
     <TR>
       <TD BGCOLOR="#dddddd">Wählen Sie ein Passwort:</TD>
       <TD><MM-New-Password-Box></TD>
       <TD> </TD>
     </TR>
     <TR>
       <TD BGCOLOR="#dddddd">Erneute Eingabe zur Bestätigung:</TD>
       <TD><MM-Confirm-Password></TD>
       <TD>  </TD>
     </TR>
     <tr>
       <TD BGCOLOR="#dddddd">Welche Sprache bevorzugen Sie zur
       Benutzerführung?</TD>
       <TD> <MM-list-langs></TD>
       <TD>  </TD>
     </TR>
     <mm-digest-question-start>
     <tr>
       <td>Möchten Sie die Listenmails gebündelt in Form einer täglichen
       Zusammenfassung (digest) erhalten?
       </td>
       <td><MM-Undigest-Radio-Button>Nein
	<MM-Digest-Radio-Button>Ja
       </TD>
     </tr>
     <mm-digest-question-end>
     <tr>
       <td colspan="3">
         <center><MM-Subscribe-Button></center>
       </td>
     </tr>
     </TABLE>
     <MM-Form-End>
     </ul>
 
 <TR>
   <TD COLSPAN="2" WIDTH="100%" BGCOLOR="#FFF0D0">
   <B><FONT COLOR="#000000">Austragen / Ändern einer Mailadresse</FONT></B>
   </TD>
 </TR>
   <TD COLSPAN="2" WIDTH="100%">
     <MM-Options-Form-Start>
     <br>
     <MM-Editing-Options>
     <br>
     <MM-Form-End>
   </td>
  </tr>
 

postfix

/usr/local/etc/postfix/main.cf

 
alias_database = hash:/etc/aliases, hash:/etc/aliases.stura
alias_maps = hash:/etc/aliases, hash:/etc/aliases.stura , hash:/usr/local/mailman/data/aliases
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
home_mailbox = Mail/
html_directory = /usr/local/share/doc/postfix
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = unix:passwd.byname $alias_maps
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command = /usr/local/bin/maildrop -d ${USER}
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = stura.htw-dresden.de
myhostname = mail.stura.htw-dresden.de
mynetworks = <interne IP-Adresse> 127.0.0.0/24
myorigin = $myhostname
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/local/share/doc/postfix
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop

smtpd_client_restrictions =
    permit_mynetworks,
    reject_rbl_client bl.spamcop.net,
    reject_rbl_client dnsbl.sorbs.net

smtpd_helo_restrictions =
    permit_mynetworks,
    reject_invalid_helo_hostname,
    reject_non_fqdn_helo_hostname,
    reject_unknown_helo_hostname

smtpd_recipient_restrictions =
    reject_invalid_hostname,
    reject_unknown_recipient_domain,
    reject_rbl_client sbl.spamhaus.org,
    permit

smtpd_relay_restrictions =
    permit_mynetworks,
    defer_unauth_destination

smtpd_sender_restrictions =
    permit_mynetworks,
    reject_unknown_sender_domain,
    reject_non_fqdn_sender

unknown_local_recipient_reject_code = 550

/etc/aliases.stura

Datei um Mail-Adressen anzulegen. Diese sind simple Weiterleitungen.

Siehe auch

Weblinks