Content
Konfiguration des Mail-Packages unter Benutzung einer dyneisfair-Domain mit MX-Record
Vorbemerkung
Da es gehäuft Anfragen gibt wie man das Mail-Package des eisfair-Servers konfigurieren muss, wenn man eine dyneisfair-Domain mit einem MX-Record besitzt, möchte ich auf notwendigen Konfigurationsschritte detailliert eingehen. Diese Informationen sollten sich ohne grosse Mühe auch auf andere Dyn-DNS-Services transferieren lassen.
Begriffserklärung
Mail eXchange (MX)
`Mail exchange' ist nur ein weiterer Name für eine Maschine, deren primäre Aufgabe es ist Mails zu empfangen und zu senden; auch bekannt unter den Namen `mailhost', `mailhub' oder auch `postoffice'. Auf diesem Rechner läuft normalerweise ein Mail-Server der auf dem TCP-Port 25 (smtp) hört und auf eigehende Mails wartet.
Mail Delivery Agent (MDA)
Ein `Mail Delivery Agent' ist eine spezielle Server-Software, die abhängig von der Mail-Adresse in einer Nachricht entscheidet ob diese an ein lokales Postfach oder zur weiteren Bearbeitung an einen anderen Mail-Server weitergeleitet wird. Mit anderen Worten, der MDA liest den Nachrichtenkopf und entscheidet
an Hand der dort vorhandenen Informationen was mit dieser Nachricht geschehen soll.
MX record (oder auch domain-wide MX record)
Ein Domain-wide MX (domain Mail eXchange) Record leitet Mail, die an die eigene Domain geschickt wird, unabhängig von deren späterem Empfänger, an einen dedizierten Mailhost weiter. D.h. eine Nachricht an `tom@spider.eisfair.net' wird an den angegebenen Mail Exchange übermittelt, der diese dann an den
lokalen Empfänger `tom' zustellt.
Wer sich in dieses Thema weiter einlesen möchte sollte Google bemühen und z.B. nach `mx record explanation' suchen lassen.
DynDNS eisfair.net
Nachdem man sich auf der Seite www.eisfair.net registriert hat, erhält man eine Mail in der bestätigt wird, welche Konfiguration durchgeführt und welches Kennwort für die Aktualisierung der IP-Adresse eingerichtet wurde.
Die Konfiguration
Beispiel-Parameter
eingerichtete Domain: spider.eisfair.net
Aktualisierungkennwort: not2new4you
Smarthost-Name: smtp.eisfair.net
Smarthost-Account: d0815
Smarthost-Kennwort: only4me
lokale Rechner: fli4l.spider.eisfair.net 192.168.6.1
eis.spider.eisfair.net 192.168.6.10
1. Anwendername: Peter Spider
1. Externe Mail-Adresse: peter@spider.eisfair.net
1. Interner Mail-Account: peter
2. Anwendername: Paul Spider
2. Externe Mail-Adresse: paul@spider.eisfair.net
2. Interner Mail-Account: paul
3. Anwendername: Marry Spider
3. Externe Mail-Adresse: marry@spider.eisfair.net
3. Interner Mail-Account: marry
4. Anwendername: John Spider
4. Externe Mail-Adresse: john@spider.eisfair.net
4. Interner Mail-Account: john
Der FLI4L-Router
Es wird davon ausgegangen, dass ein lauffähiger FLI4L-Router mit ISDN oder DSL-Anbindung vorhanden ist. Über die Seite www.fli4l.de lädt man sich das OPT_DYNEISFAIR und packt es entsprechend den Vorgaben im lokalen Konfigurationsverzeichnis von FLI4L aus.
dyneisfair.txt
Die Konfigurationsdatei `dyneisfair.txt' sollte nach den durchgeführten Anpassungen wie folgt aussehen:
##---------------------------------------------------------------------------------------
## dyneisfair.txt - fli4l configuration parameters
##
## P L E A S E R E A D T H E D O C U M E N T A T I O N ,
## S E E D O C / D E U T S C H / O P T / R E G I S T E R . T X T
##
## B I T T E U N B E D I N G T D I E D O K U M E N T A T I O N
## L E S E N , S I E H E
## D O C / D E U T S C H / O P T / R E G I S T E R . T X T
##
## Creation: 21.08.2002 fm
## Last Update: 20.09.2002 fm
##
## Copyright (c) 2002 Frank Meyer <frank@fli4l.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##---------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
# Optional package: DYNEISFAIR
#----------------------------------------------------------------------------------------
OPT_DYNEISFAIR='yes' # install fli4l registration: yes or no
DYNEISFAIR_DOMAIN_N='1' # number of eisfair subdomains
DYNEISFAIR_DOMAIN_1='spider.eisfair.net' # your nth eisfair subdomain
DYNEISFAIR_PASSWORD_1='not2new4you' # password for nth subdomain
DYNEISFAIR_CIRCUITS='pppoe 1' # valid circuits, use 'ppoe for DSL
# and '1 2 ..' for ISDN
base.txt
Die Konfigurationsdatei `base.txt' sollte nach den durchgeführten Anpassungen wie folgt aussehen (es werden nur die Anpassungen aufgeführt!):
...
#----------------------------------------------------------------------------------------
# Optional package: PORTFW
#
# If you set OPT_PORTFW='yes', you can also edit opt/etc/portfw.sh
#----------------------------------------------------------------------------------------
OPT_PORTFW='yes' # install port forwarding tools/modules
PORTFW_N='1' # how many portforwardings to set up
PORTFW_1='25 192.168.6.10:25 tcp' # forward smtp port to eisfair-Server
...
#----------------------------------------------------------------------------------------
# Firewall: ports to reject/deny from outside (all served ports)
#
# here we leave two ports untouched:
#
# 53 dns
# 113 auth
#----------------------------------------------------------------------------------------
FIREWALL_DENY_PORT_N='7' # no. of ports to reject/deny
FIREWALL_DENY_PORT_1='0:24 REJECT' # privileged ports: reject or deny
# smtp port access enabled
FIREWALL_DENY_PORT_2='26:52 REJECT' # privileged ports: reject or deny
FIREWALL_DENY_PORT_3='54:112 REJECT' # privileged ports: reject or deny
FIREWALL_DENY_PORT_4='114:1023 REJECT' # privileged ports: reject or deny
FIREWALL_DENY_PORT_5='5000:5001 REJECT' # imond/telmond ports: reject or deny
FIREWALL_DENY_PORT_6='8000 REJECT' # proxy access: reject or deny
FIREWALL_DENY_PORT_7='20012 REJECT' # vbox server access: reject or deny
...
#----------------------------------------------------------------------------------------
# Domain configuration:
#----------------------------------------------------------------------------------------
START_DNS='yes' # start dns server: yes or no
DNS_FORWARDERS=192.76.144.66' # DNS servers of your provider, e.g. MSN
DNS_VERBOSE='no' # log queries in /usr/local/ens/ens.log
DOMAIN_NAME='spider.eisfair.net' # your domain name
DNS_FORBIDDEN_N='0' # number of forbidden domains
DNS_FORBIDDEN_1='foo.bar' # 1st forbidden domain
DNS_FORBIDDEN_2='bar.foo' # 2nd forbidden domain
HOSTS_N='2' # number of hosts in your domain
HOST_1='192.168.6.1 fli4l' 1st host: ip and name
HOST_2='192.168.6.10 eis' # 2nd host: ip and name
...
Die Konfiguration muss nun nur noch durch Erstellen einer neuen Startdiskette oder mit Hilfe des Imonc auf den Router übertragen werden. Zur Aktivierung der Konfigurationsänderungen muss abschliessend ein Neustart des FLI4L-Routers durchgeführt werden.
Der eisfair-Servers
Mail-Package
Es wird davon ausgegangen, dass ein lauffähiger eisfair-Server vorhanden ist. Über das `Package Administration'-Menü installiert man nun das Mail-Package. Nach der Installation wird direkt der
Konfigurationseditor gestartet um die intiale Konfiguration durchzuführen. Folgende Änderungen
an der Standard-Konfigurationsdatei müssen durchgeführt werden (es werden nur die Änpassungen aufgeführt!):
#----------------------------------------------------------------------------------------
# /etc/config.d/mail - configuration for mail services on EIS/FAIR
#
# Copyright (c) 2002 Frank Meyer <frank(at)eisfair.org>
#
# Creation: 28.04.2002 fm
# Last Update: 01.05.2003 jed
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#----------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------------
# pop3: general settings
#----------------------------------------------------------------------------------------
START_POP3='yes'
# start POP3 server
START_IMAP='yes'
# start IMAP server
POP3IMAP_CREATE_MBX='yes'
# create mbx mailbox for imap
POP3IMAP_USE_MAILONLY_PASSWORDS='yes'
# use separate mail passwords
POP3IMAP_TRANSPORT='default'
transport to use
#----------------------------------------------------------------------------------------
# pop3/imap: mail users and optional passwords
#----------------------------------------------------------------------------------------
POP3IMAP_N='4' # set mail-accounts
POP3IMAP_1_USER='peter' # username
POP3IMAP_1_PASS='geheim' # optional mail only password
POP3IMAP_2_USER='paul' # username
POP3IMAP_2_PASS='geheim' # optional mail only password
POP3IMAP_3_USER='marry' # username
POP3IMAP_3_PASS='geheim' # optional mail only password
POP3IMAP_4_USER='john' # username
POP3IMAP_4_PASS='geheim' # optional mail only password
...
#----------------------------------------------------------------------------------------
# fetchmail: general settings
#----------------------------------------------------------------------------------------
START_FETCHMAIL='no' # start FETCHMAIL client
...
#----------------------------------------------------------------------------------------
# smtp: general settings
#----------------------------------------------------------------------------------------
START_SMTP='yes' # start SMTP server
SMTP_QUALIFY_DOMAIN='spider.eisfair.net' # will be added to unqualified addr.
SMTP_HOSTNAME='eis.spider.eisfair.net' # canonical hostname of eisfair server
SMTP_QUEUE_INTERVAL='30' # queueing interval in minutes
SMTP_QUEUE_OUTBOUND_MAIL='no' # set to yes if you are using a dialup
# ISP and you want to queue
# outbound mail until next queue run
...
#----------------------------------------------------------------------------------------
# smtp: local domains
#----------------------------------------------------------------------------------------
SMTP_LOCAL_DOMAIN_N='3' # number of local domains
SMTP_LOCAL_DOMAIN_1='@' # 1st local domain, @ means hostname
SMTP_LOCAL_DOMAIN_2='localhost' # 2nd local domain
SMTP_LOCAL_DOMAIN_3='spider.eisfair.net' # 3rd local domain
#----------------------------------------------------------------------------------------
# smtp: relay to domains
#
# The folllowing setting specify domains for which your host is an incoming
# relay. If you are not doing any relaying, you should leave the list empty.
# However, if your host is an MX backup or gateway of some kind for some
# domains, you must set relay_to_domains to match those domains.
#----------------------------------------------------------------------------------------
SMTP_RELAY_TO_DOMAIN_N='0' # domains for which we are incoming
# relay
SMTP_RELAY_TO_DOMAIN_1=''
#----------------------------------------------------------------------------------------
# smtp: relay from hosts
#
# The following settings specify hosts that can use your host as an
# outgoing relay to any other host on the Internet. Such a setting
# commonly refers to a complete local network as well as the localhost.
#----------------------------------------------------------------------------------------
SMTP_RELAY_FROM_HOST_N='2' # hosts/nets from we accept
SMTP_RELAY_FROM_HOST_1='127.0.0.1' # outgoing mails
SMTP_RELAY_FROM_HOST_2='192.168.6.0/24' #
#----------------------------------------------------------------------------------------
# smtp: server authentication
#
# Optional:
# Set the type of server authentication.
# none - no authentication
# user - each user authenticates himself by his username/password
# server - all users authenticate themself by sending a global user/pass
#----------------------------------------------------------------------------------------
SMTP_AUTH_TYPE='none' # authentication: none, user, server
SMTP_AUTH_USER='' # if server: global username, else empty
SMTP_AUTH_PASS='' # if server: global username, else empty
#----------------------------------------------------------------------------------------
# smtp: smarthosts
#
# Optional:
# Send all outgoing messages to a smarthost (e.g. mail server of your isp).
#----------------------------------------------------------------------------------------
SMTP_SMARTHOST_ONE_FOR_ALL='yes'
# use one smarthost for all accounts:
SMTP_SMARTHOST_DOMAINS=''
SMTP_SMARTHOST_ROUTE_TYPE='addr'
SMTP_SMARTHOST_N='1'
# number of smarthost entries
SMTP_SMARTHOST_1_HOST='smtp.eisfair.net'
# smart host to send mail to
SMTP_SMARTHOST_1_AUTH_TYPE='md5'
SMTP_SMARTHOST_1_ADDR=''
SMTP_SMARTHOST_1_DOMAIN=''
SMTP_SMARTHOST_1_USER='d0815' # username
SMTP_SMARTHOST_1_PASS='only4me'
# password
SMTP_SMARTHOST_1_FORCE_AUTH='no'
SMTP_SMARTHOST_1_FORCE_TLS='no'
SMTP_SMARTHOST_1_PORT=''
#----------------------------------------------------------------------------------------
# smtp: aliases
#
# Here you can specify aliases
#
# General format:
# SMTP_ALIAS_x='name: user1[,user2,...]
#
# Example:
# SMTP_ALIAS_1='frank: fm,foo@otherwhere.com'
#
# Mails to frank@domain.de will be delivered to local user fm and to
# user foo@otherwhere.com.
#----------------------------------------------------------------------------------------
SMTP_ALIAS_N='1' # number of aliases
SMTP_ALIAS_1='root: peter' # 1st alias must be for user 'root'!
...
Den Konfigurationseditor verlässt man durch Drücken von strg-kx, die anschliessende Frage `Activate mail services configuration now (y/n)?' beantwortet man mit 'y' um alle Änderungen direkt zu übernehmen.
Die folgenden Meldungen sollten am Bildschirm errscheinen:
Activate mail services configuration now (y/n)? y
smtp server is not running
fetchmail daemon is not running
version: v1.1.6-1
sn package not installed ...
antispam package not installed ...
checking pop3/imap services ...
checking pop3 tls certificates ...
creating xinet/pop3 configuration file ...
creating xinet/imap configuration file ...
creating pop3/imap configuration file ...
creating separate pop3/imap password file ...
creating imap unix/mbx mailboxes ...
deleting imapshared namespace folders ...
- deleting user account "imapshared" ...
deleting imappublic namespace folders ...
- deleting user account "imappublic" ...
creating smtp configuration file ...
creating aliases file ...
deleting outgoing addresses file ...
creating imapshared list file ...
creating imappublic list file ...
adding statistics notification ...
adding certification notification ...
checking root alias ...
creating logrotate configuration file ...
creating mail configuration file ...
updating modules menu ...
- adding entry "webmail - Webmail administration" ...
setting access rights ...
finished.
starting SMTP server ...
Press ENTER to continue
Abschliessende Tests
Um zu prüfen ob eingehende Mails ihr Ziel erreichen lässt man sich nun eine Mail an 'peter@spider.eisfair.net' schicken. Kurze Zeit später sollte diese dann im Postfach des Empfängers zu sehen sein.
Um zu prüfen ob auch ausgehene Mails ihr Ziel erreichen schickt man einfach eine Email an einen Bekannten mit der Bitte diese zu beantworten.
Anhang
Die aufgeführten Auszüge aus den Konfigurationsdateien beziehen sich auf
folgende Software- bzw. Package-Version:
- fli4l-Router v2.0.6a incl. base-patch-2.0.6-01
- opt_dyneisfair - 01.10.2002
- eisfair-Server v1.0.2
- mail-Package v1.1.16
J.Edner / 14.07.2003