Hinzugefügt:
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 14 Jun 2006 21:19:05 +0000 (21:19 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Wed, 14 Jun 2006 21:19:05 +0000 (21:19 +0000)
  * In Mailserverkonfiguration fortgeschritten...

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@178 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

22 files changed:
config/cyrusimap/cyrus.conf [new file with mode: 0644]
config/cyrusimap/imapd.conf [new file with mode: 0644]
config/etc/group
config/etc/ld.so.conf
config/etc/passwd
config/pam/imap [new file with mode: 0644]
config/pam/pop [new file with mode: 0644]
config/pam/sieve [new file with mode: 0644]
config/pam/smtp [new file with mode: 0644]
config/postfix/master.cf
config/postfix/mysql-canonical.cf [new file with mode: 0644]
config/postfix/mysql-mydestination.cf [new file with mode: 0644]
config/postfix/mysql-virtual.cf [new file with mode: 0644]
config/procmail/procmailrc [new file with mode: 0644]
lfs/cyrusimap
lfs/pam
lfs/procmail
lfs/saslauthd
make.sh
src/ROOTFILES.i386
src/paks/procmail/ROOTFILES
src/scripts/packager

diff --git a/config/cyrusimap/cyrus.conf b/config/cyrusimap/cyrus.conf
new file mode 100644 (file)
index 0000000..96dc414
--- /dev/null
@@ -0,0 +1,38 @@
+START {
+  # do not delete this entry!
+  recover       cmd="ctl_cyrusdb -r"
+
+  # this is only necessary if using idled for IMAP IDLE
+#  idled                cmd="idled"
+}
+
+# UNIX sockets start with a slash and are put into /var/imap/socket
+SERVICES {
+  # add or remove based on preferences
+  imap          cmd="imapd" listen="imap" prefork=0
+  imaps         cmd="imapd -s" listen="imaps" prefork=0
+  pop3          cmd="pop3d" listen="pop3" prefork=0
+  pop3s         cmd="pop3d -s" listen="pop3s" prefork=0
+  sieve         cmd="timsieved" listen="sieve" prefork=0
+
+  # at least one LMTP is required for delivery
+#  lmtp         cmd="lmtpd" listen="lmtp" prefork=0
+  lmtpunix      cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
+
+  # this is only necessary if using notifications
+#  notify       cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
+}
+
+EVENTS {
+  # this is required
+  checkpoint    cmd="ctl_cyrusdb -c" period=30
+
+  # this is only necessary if using duplicate delivery suppression
+  delprune      cmd="ctl_deliver -E 3" period=1440
+
+  # this is only necessary if caching TLS sessions
+  tlsprune      cmd="tls_prune" period=1440
+
+  # SQUAT failed, helps
+  squatter      cmd="squatter -r user" period=1440
+}
diff --git a/config/cyrusimap/imapd.conf b/config/cyrusimap/imapd.conf
new file mode 100644 (file)
index 0000000..767a989
--- /dev/null
@@ -0,0 +1,24 @@
+postmaster: postmaster
+configdirectory: /var/imap
+partition-default: /var/log/imap
+admins: cyrus
+allowanonymouslogin: no
+allowplaintext: yes
+sasl_mech_list: PLAIN
+servername: servername
+autocreatequota: 10000
+reject8bit: no
+quotawarn: 90
+timeout: 30
+poptimeout: 10
+dracinterval: 0
+drachost: localhost
+sasl_pwcheck_method: saslauthd
+sievedir: /usr/sieve
+sendmail: /usr/sbin/sendmail
+sieve_maxscriptsize: 32
+sieve_maxscripts: 5
+#unixhierarchysep: yes
+echo tls_ca_file: /var/imap/server.pem
+echo tls_cert_file: /var/imap/server.pem
+echo tls_key_file: /var/imap/server.pem
index 22830f1..febbb62 100644 (file)
@@ -17,6 +17,7 @@ utmp:x:22:
 squid:x:23:
 ntp:x:38:
 dip:x:40:
+rsyncd:x:48:
 stunnel:x:51:
 lock:x:54:
 sshd:x:74:
@@ -32,5 +33,4 @@ klogd:x:106:
 postfix:x:107:
 postdrop:x:108:
 clamav:x:109:
-rsyncd:x:48:
 amavis:x:110:
index 55e49f9..bd59029 100644 (file)
@@ -1,2 +1,3 @@
 # Begin /etc/ld.so.conf
+/usr/lib/sasl2
 # End /etc/ld.so.conf
index a0b2aa7..a291cf9 100644 (file)
@@ -6,14 +6,16 @@ squid:x:23:23:ftp:/var/spool/squid:/bin/false
 ntp:x:38:38::/etc/ntp:/bin/false
 sshd:x:74:74:sshd:/var/empty:/bin/false
 nobody:x:99:99:Nobody:/home/nobody:/bin/false
-snort:x:100:101:ftp:/var/log/snort:/bin/false
+snort:x:101:101:ftp:/var/log/snort:/bin/false
 logwatch:x:102:102::/var/log/logwatch:/bin/false
 dnsmasq:x:103:103::/:/bin/false
 cron:x:104:104::/:/bin/false
 syslogd:x:105:105:/var/empty:/bin/false
 klogd:x:106:106:/var/empty:/bin/false
-postfix:x:1000:100::/var/spool/postfix:/bin/false
+postfix:x:100:100::/var/spool/postfix:/bin/false
 stunnel:x:51:51:Stunnel Daemon:/var/lib/stunnel:/bin/false
 clamav:x:109:109:Clam AntiVirus:/home/clamav:/bin/false
 rsyncd:x:48:48:rsyncd Daemon:/home/rsync:/bin/false
 amavis:x:110:110:Amavisd-new user:/var/amavis:
+cyrus:x:111:12:Cyrus user:/usr/cyrus:
+filter:x:112:12:Spam user:/home/filter:/bin/false
diff --git a/config/pam/imap b/config/pam/imap
new file mode 100644 (file)
index 0000000..ed4ea94
--- /dev/null
@@ -0,0 +1,4 @@
+auth sufficient pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time 
+auth sufficient pam_unix_auth.so
+account required pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
+account sufficient pam_unix_acct.so
\ No newline at end of file
diff --git a/config/pam/pop b/config/pam/pop
new file mode 100644 (file)
index 0000000..ed4ea94
--- /dev/null
@@ -0,0 +1,4 @@
+auth sufficient pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time 
+auth sufficient pam_unix_auth.so
+account required pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
+account sufficient pam_unix_acct.so
\ No newline at end of file
diff --git a/config/pam/sieve b/config/pam/sieve
new file mode 100644 (file)
index 0000000..ed4ea94
--- /dev/null
@@ -0,0 +1,4 @@
+auth sufficient pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time 
+auth sufficient pam_unix_auth.so
+account required pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
+account sufficient pam_unix_acct.so
\ No newline at end of file
diff --git a/config/pam/smtp b/config/pam/smtp
new file mode 100644 (file)
index 0000000..ed4ea94
--- /dev/null
@@ -0,0 +1,4 @@
+auth sufficient pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time 
+auth sufficient pam_unix_auth.so
+account required pam_mysql.so user=mail passwd=ipfire host=localhost db=mail table=accountuser usercolumn=username passwdcolumn=password crypt=1 logtable=log logmsgcolumn=msg logusercolumn=user loghostcolumn=host logpidcolumn=pid logtimecolumn=time
+account sufficient pam_unix_acct.so
\ No newline at end of file
index 38298e9..a2c5f30 100644 (file)
@@ -77,3 +77,5 @@ ifmail    unix  -       n       n       -       -       pipe
   flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
 bsmtp     unix  -       n       n       -       -       pipe
   flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
+procmail  unix  -       n       n       -       20      pipe
+flags=R user=cyrus argv=/usr/bin/procmail -r SENDER=${sender} -t -m USER=${user} EXTENSION=${extension} /etc/procmailrc
diff --git a/config/postfix/mysql-canonical.cf b/config/postfix/mysql-canonical.cf
new file mode 100644 (file)
index 0000000..d6ed3e9
--- /dev/null
@@ -0,0 +1,15 @@
+# Host der Datenbank
+hosts = localhost 
+# Benutzername und Passwort der Datenbank
+user = mail
+password = ipfire
+
+# Der Datenbankname
+table = virtual
+dbname = mail
+
+select_field = alias
+where_field = username
+
+# Das erste Ergebniss zurückliefern
+additional_conditions = and status = '1' limit 1
diff --git a/config/postfix/mysql-mydestination.cf b/config/postfix/mysql-mydestination.cf
new file mode 100644 (file)
index 0000000..0b409fd
--- /dev/null
@@ -0,0 +1,15 @@
+# Host der Datenbank
+hosts = localhost 
+
+# Benutzername und Passwort der Datenbank
+user = mail
+password = ipfire
+
+# Der Datenbankname
+dbname = mail
+
+# Der Tabellenname
+table = domain
+
+select_field = domain_name
+where_field = domain_name
\ No newline at end of file
diff --git a/config/postfix/mysql-virtual.cf b/config/postfix/mysql-virtual.cf
new file mode 100644 (file)
index 0000000..c1bc265
--- /dev/null
@@ -0,0 +1,13 @@
+# Host der Datenbank
+hosts = localhost 
+# Benutzername und Passwort der Datenbank
+user = mail
+password = ipfire
+
+# Der Datenbankname
+dbname = mail
+table = virtual
+
+select_field = dest
+where_field = alias
+additional_conditions = and status = '1'
diff --git a/config/procmail/procmailrc b/config/procmail/procmailrc
new file mode 100644 (file)
index 0000000..d2f27ef
--- /dev/null
@@ -0,0 +1,33 @@
+# Procmail
+LOGFILE="/var/log/procmail"
+VERBOSE=off 
+
+# Mailbox-Zustellung
+DELIVERMAIL="/usr/cyrus/bin/deliver"
+INBOX="$DELIVERMAIL -r $SENDER -m $EXTENSION $USER"
+SPAM="$DELIVERMAIL -e -a $USER -q -m user.$USER.spam"
+
+# "From" Zeile loeschen, sonst funktioniert cydeliver nicht
+:0fw
+| formail -f -I "From "
+
+:0fw
+* < 256000
+| /usr/bin/spamc -u filter
+
+# --- score = 11
+
+:0 w
+* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*
+| $SPAM
+
+# Der Mailbox zustellen
+:0w
+| $INBOX
+
+# Schluss
+:0w
+{
+EXITCODE=$?
+HOST
+}
index f02985b..7cd93f9 100644 (file)
@@ -81,5 +81,20 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && make depend
        cd $(DIR_APP) && make
        cd $(DIR_APP) && make install
+       -mkdir /var/imap
+       chown cyrus:mail /var/imap
+       chmod 750 /var/imap
+       -mkdir /var/log/imap
+       chown cyrus:mail /var/log/imap
+       chmod 750 /var/log/imap
+       -mkdir /usr/sieve
+       chown cyrus:mail /usr/sieve
+       chmod 750 /usr/sieve
+       -mkdir -p /var/ipfire/cyrusimap
+       cp -f $(DIR_SRC)/config/cyrusimap/* /var/ipfire/cyrusimap
+       cp -f $(DIR_APP)/tools/mkimap /usr/bin
+       /usr/bin/mkimap # Diese Funktion ist noch nicht getestet.
+       # Wenn das Dateisystem ext2 ist...
+       # cd /var/imap && chattr +S user quota user/* quota/* && chattr +S /var/spool/imap /var/spool/imap/*
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/lfs/pam b/lfs/pam
index 37ac6f3..58662dc 100644 (file)
--- a/lfs/pam
+++ b/lfs/pam
@@ -92,5 +92,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        ln -v -sf ../../lib/libpam.so.0.81.2 /usr/lib/libpam.so
        ln -v -sf ../../lib/libpamc.so.0.81.0 /usr/lib/libpamc.so
        ln -v -sf ../../lib/libpam_misc.so.0.81.2 /usr/lib/libpam_misc.so
+       -mkdir -p /etc/pam.d
+       cp $(DIR_SRC)/config/pam/* /etc/pam.d
+       chown root.root -R /etc/pam.d
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 0ed7efe..4cd7683 100644 (file)
@@ -36,9 +36,11 @@ VER        = 3.22
 
 THISAPP    = procmail-$(VER)
 DL_FILE    = $(THISAPP).tar.gz
-DL_FROM    = ftp://ftp.procmail.net/pub/procmail
+DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
+PROG       = procmail
+PAK_VER    = ipfire-beta1
 
 ###############################################################################
 # Top-level Rules
@@ -59,7 +61,7 @@ download :$(patsubst %,$(DIR_DL)/%,$(objects))
 md5 : $(subst %,%_MD5,$(objects))
 
 dist: 
-       make-packages.sh procmail $(THISAPP)-ipfire-beta-1
+       @$(PAK)
 
 ###############################################################################
 # Downloading, checking, md5sum
@@ -84,5 +86,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cd $(DIR_APP) && make LOCKINGTEST=/tmp install
        # cd $(DIR_APP) && make install-suid   ### Dunno what's better
        cd $(DIR_APP) && make install
+       cp -f $(DIR_SRC)/config/procmail/* /etc
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
index 651c7ce..44128af 100644 (file)
@@ -108,6 +108,7 @@ endif
 ifeq "$(PASS)" "2"
        install -v -m700 -d /var/lib/sasl
        mkdir -p /var/run/saslauthd
+       mkdir -p /var/state/saslauthd
 endif
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index e986edd..5959202 100644 (file)
--- a/make.sh
+++ b/make.sh
@@ -655,7 +655,6 @@ buildipcop() {
   #ipcopmake speedycgi
   ipcopmake saslauthd PASS=1
   ipcopmake openldap
-  ipcopmake saslauthd PASS=2
   ipcopmake squid
   ipcopmake squid-graph
   ipcopmake squidguard
@@ -681,6 +680,7 @@ buildipcop() {
   ipcopmake xampp
   ipcopmake pam
   ipcopmake pammysql
+  ipcopmake saslauthd PASS=2
   ipcopmake xinetd
   ipcopmake ghostscript
   ipcopmake cups
@@ -852,6 +852,7 @@ ipfirepackages() {
   ipfiredist libxml2
   ipfiredist ntop
   ipfiredist postfix
+  ipfiredist procmail
   ipfiredist samba
   ipfiredist xampp
   ipfiredist xinetd
index 05c4f0c..7f6a96b 100644 (file)
@@ -24894,6 +24894,8 @@ usr/sbin/saslpasswd2
 #usr/share/man/man8/sasldblistusers2.8
 #usr/share/man/man8/saslpasswd2.8
 var/lib/sasl
+var/run/saslauthd
+var/state/saslauthd
 ##
 ## BERKELEY-DB
 ##
index e69de29..2236b3e 100644 (file)
@@ -0,0 +1,10 @@
+usr/bin/formail
+usr/bin/lockfile
+usr/bin/mailstat
+usr/bin/procmail
+#usr/share/man/man1/formail.1
+#usr/share/man/man1/lockfile.1
+#usr/share/man/man1/procmail.1
+#usr/share/man/man5/procmailex.5
+#usr/share/man/man5/procmailrc.5
+#usr/share/man/man5/procmailsc.5
index 2d0d370..341c763 100644 (file)
@@ -29,4 +29,4 @@ else
        cd /install/packages && md5sum $PROG*.tar.gz > $PROG-$VER-$PAK_VER.tar.gz.md5
        rm -rf /install/packages/package
        exit 0
-fi
\ No newline at end of file
+fi