mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Hinzugefügt:
* In Mailserverkonfiguration fortgeschritten... git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@178 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
38
config/cyrusimap/cyrus.conf
Normal file
38
config/cyrusimap/cyrus.conf
Normal file
@@ -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
|
||||
}
|
||||
24
config/cyrusimap/imapd.conf
Normal file
24
config/cyrusimap/imapd.conf
Normal file
@@ -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
|
||||
@@ -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:
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
# Begin /etc/ld.so.conf
|
||||
/usr/lib/sasl2
|
||||
# End /etc/ld.so.conf
|
||||
|
||||
@@ -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
|
||||
|
||||
4
config/pam/imap
Normal file
4
config/pam/imap
Normal file
@@ -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
|
||||
4
config/pam/pop
Normal file
4
config/pam/pop
Normal file
@@ -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
|
||||
4
config/pam/sieve
Normal file
4
config/pam/sieve
Normal file
@@ -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
|
||||
4
config/pam/smtp
Normal file
4
config/pam/smtp
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
15
config/postfix/mysql-canonical.cf
Normal file
15
config/postfix/mysql-canonical.cf
Normal file
@@ -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<75>ckliefern
|
||||
additional_conditions = and status = '1' limit 1
|
||||
15
config/postfix/mysql-mydestination.cf
Normal file
15
config/postfix/mysql-mydestination.cf
Normal file
@@ -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
|
||||
13
config/postfix/mysql-virtual.cf
Normal file
13
config/postfix/mysql-virtual.cf
Normal file
@@ -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'
|
||||
33
config/procmail/procmailrc
Normal file
33
config/procmail/procmailrc
Normal file
@@ -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
|
||||
}
|
||||
@@ -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)
|
||||
|
||||
3
lfs/pam
3
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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
3
make.sh
3
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
|
||||
|
||||
@@ -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
|
||||
##
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user