mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Umfassend am Mailserver gearbeitet:
- Unnuetze Patches aus dem cyrusimapd raus - Eine Konfiguration und Datenbank fuer openmailadmin erstellt. - Konfiguration von Postfix und Cyrus ein wenig optimiert. - 2 Threads des saslauthd muessen reichen fuer kleine Mailserver. Kleines Problem mit den Dateiberechtigungen in den Pakfire-Paketen gehabt und hoffentlich behoben. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@918 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -16,11 +16,11 @@ SERVICES {
|
||||
sieve cmd="timsieved" listen="127.0.0.1:2000" prefork=0
|
||||
|
||||
# at least one LMTP is required for delivery
|
||||
lmtp cmd="lmtpd" listen="127.0.0.1:24" prefork=0
|
||||
lmtpunix cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
|
||||
#lmtp cmd="lmtpd" listen="127.0.0.1:24" 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
|
||||
notify cmd="notifyd" listen="/var/imap/socket/notify" proto="udp" prefork=1
|
||||
}
|
||||
|
||||
EVENTS {
|
||||
|
||||
21
config/openmailadmin/config.local.inc.php
Normal file
21
config/openmailadmin/config.local.inc.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* Created by setup.php (1.0.0) on Sun, 23 Sep 2007 16:44:38 +0200 */
|
||||
$cfg['user_ignore'] = array('cyrus');
|
||||
$cfg['passwd']['strategy'] = 'PasswordPlaintext';
|
||||
|
||||
// repeat these lines for every server or virtual domain
|
||||
$cfg['Servers']['verbose'][] = 'my database';
|
||||
$cfg['Servers']['number'][] = $i++;
|
||||
$cfg['Servers']['DB'][] = array(
|
||||
'DSN' => 'mysql://root:mysqlfire@localhost/mail',
|
||||
'PREFIX' => '',
|
||||
);
|
||||
$cfg['Servers']['IMAP'][] = array(
|
||||
'TYPE' => 'cyrus',
|
||||
'HOST' => 'localhost',
|
||||
'PORT' => 143,
|
||||
'ADMIN' => 'cyrus',
|
||||
'PASS' => 'ipfire',
|
||||
'VDOM' => ''
|
||||
);
|
||||
?>
|
||||
158
config/openmailadmin/mail.dump
Normal file
158
config/openmailadmin/mail.dump
Normal file
@@ -0,0 +1,158 @@
|
||||
-- MySQL dump 10.10
|
||||
--
|
||||
-- Host: localhost Database: mail
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.0.24a
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `domains`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `domains`;
|
||||
CREATE TABLE `domains` (
|
||||
`ID` int(10) unsigned NOT NULL auto_increment,
|
||||
`domain` varchar(64) NOT NULL default '',
|
||||
`categories` varchar(100) NOT NULL default 'all',
|
||||
`owner` varchar(16) NOT NULL default '',
|
||||
`a_admin` text,
|
||||
`neu` tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `domains`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `domains` DISABLE KEYS */;
|
||||
LOCK TABLES `domains` WRITE;
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `domains` ENABLE KEYS */;
|
||||
|
||||
--
|
||||
-- Table structure for table `imap_demo`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `imap_demo`;
|
||||
CREATE TABLE `imap_demo` (
|
||||
`mailbox` varchar(250) NOT NULL default '',
|
||||
`used` int(10) unsigned NOT NULL default '0',
|
||||
`qmax` int(10) unsigned NOT NULL default '0',
|
||||
`ACL` text,
|
||||
PRIMARY KEY (`mailbox`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `imap_demo`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `imap_demo` DISABLE KEYS */;
|
||||
LOCK TABLES `imap_demo` WRITE;
|
||||
INSERT INTO `imap_demo` VALUES ('shared',0,0,'anyone lrswipcda');
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `imap_demo` ENABLE KEYS */;
|
||||
|
||||
--
|
||||
-- Table structure for table `user`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `user`;
|
||||
CREATE TABLE `user` (
|
||||
`mbox` varchar(16) NOT NULL default '',
|
||||
`person` varchar(100) NOT NULL default '',
|
||||
`pate` varchar(16) NOT NULL default '',
|
||||
`canonical` varchar(100) NOT NULL default '',
|
||||
`password` varchar(40) NOT NULL default '',
|
||||
`domains` varchar(100) NOT NULL default '',
|
||||
`active` tinyint(1) NOT NULL default '0',
|
||||
`created` int(10) unsigned NOT NULL default '0',
|
||||
`last_login` int(10) unsigned NOT NULL default '0',
|
||||
`max_alias` int(10) unsigned NOT NULL default '1',
|
||||
`max_regexp` int(10) unsigned NOT NULL default '1',
|
||||
`a_admin_domains` tinyint(4) NOT NULL default '0',
|
||||
`a_admin_user` tinyint(4) NOT NULL default '0',
|
||||
`a_super` tinyint(4) default '0',
|
||||
PRIMARY KEY (`mbox`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `user`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `user` DISABLE KEYS */;
|
||||
LOCK TABLES `user` WRITE;
|
||||
INSERT INTO `user` VALUES ('admin','Admin John Doe','admin','admin@example.com','mailfire','all',1,1190483338,1190558772,10000,100,2,2,2),('cyrus','cyrus','cyrus','--@example.com','ipfire','none',1,1190483338,0,0,0,0,0,1);
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `user` ENABLE KEYS */;
|
||||
|
||||
--
|
||||
-- Table structure for table `virtual`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `virtual`;
|
||||
CREATE TABLE `virtual` (
|
||||
`address` varchar(255) NOT NULL default '',
|
||||
`dest` text,
|
||||
`owner` varchar(16) NOT NULL default '',
|
||||
`active` tinyint(1) NOT NULL default '1',
|
||||
`neu` tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (`address`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `virtual`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `virtual` DISABLE KEYS */;
|
||||
LOCK TABLES `virtual` WRITE;
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `virtual` ENABLE KEYS */;
|
||||
|
||||
--
|
||||
-- Table structure for table `virtual_regexp`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `virtual_regexp`;
|
||||
CREATE TABLE `virtual_regexp` (
|
||||
`ID` int(10) unsigned NOT NULL auto_increment,
|
||||
`reg_exp` varchar(255) NOT NULL default '',
|
||||
`dest` text,
|
||||
`owner` varchar(16) NOT NULL default '',
|
||||
`active` tinyint(1) NOT NULL default '0',
|
||||
`neu` tinyint(1) NOT NULL default '1',
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
|
||||
--
|
||||
-- Dumping data for table `virtual_regexp`
|
||||
--
|
||||
|
||||
|
||||
/*!40000 ALTER TABLE `virtual_regexp` DISABLE KEYS */;
|
||||
LOCK TABLES `virtual_regexp` WRITE;
|
||||
UNLOCK TABLES;
|
||||
/*!40000 ALTER TABLE `virtual_regexp` ENABLE KEYS */;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
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
|
||||
auth sufficient pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
account required pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
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
|
||||
auth sufficient pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
account required pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
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
|
||||
auth sufficient pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
account required pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
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
|
||||
auth sufficient pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
account required pam_mysql.so user=root passwd=mysqlfire host=localhost db=mail table=user usercolumn=mbox passwdcolumn=password crypt=0 sqlLog=0
|
||||
|
||||
@@ -4,24 +4,29 @@
|
||||
queue_directory = /var/spool/postfix
|
||||
command_directory = /usr/sbin
|
||||
daemon_directory = /usr/lib/postfix
|
||||
manpage_directory = /usr/share/man
|
||||
sample_directory = /etc/postfix
|
||||
html_directory = no
|
||||
readme_directory = no
|
||||
|
||||
sendmail_path = /usr/sbin/sendmail
|
||||
newaliases_path = /usr/bin/newaliases
|
||||
mailq_path = /usr/bin/mailq
|
||||
|
||||
mail_owner = postfix
|
||||
setgid_group = postdrop
|
||||
|
||||
#myhostname = host.domain.tld
|
||||
#mydomain = domain.tld
|
||||
#myorigin = $myhostname
|
||||
#myorigin = $mydomain
|
||||
myorigin = $myhostname
|
||||
|
||||
inet_interfaces = all
|
||||
#proxy_interfaces =
|
||||
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mysql:/etc/postfix/mysql-mydestination.cf
|
||||
#local_recipient_maps = unix:passwd.byname $alias_maps
|
||||
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
|
||||
#local_recipient_maps =
|
||||
mydestination = $myhostname, localhost.$mydomain, localhost, mysql:/etc/postfix/mysql-mydestination.cf
|
||||
unknown_local_recipient_reject_code = 550
|
||||
#ynetworks_style = class
|
||||
#mynetworks_style = subnet
|
||||
#mynetworks_style = host
|
||||
#mynetworks = 168.100.189.0/28, 127.0.0.0/8
|
||||
#mynetworks = $config_directory/mynetworks
|
||||
#mynetworks = hash:/etc/postfix/network_table
|
||||
|
||||
mynetworks_style = host
|
||||
mynetworks = 127.0.0.0/8
|
||||
|
||||
#relay_domains = $mydestination
|
||||
#relayhost = $mydomain
|
||||
#relayhost = [gateway.my.domain]
|
||||
@@ -33,31 +38,15 @@ unknown_local_recipient_reject_code = 550
|
||||
alias_maps = hash:/etc/aliases
|
||||
alias_database = hash:/etc/aliases
|
||||
#recipient_delimiter = +
|
||||
#home_mailbox = Mailbox
|
||||
#home_mailbox = Maildir/
|
||||
#mail_spool_directory = /var/mail
|
||||
#mail_spool_directory = /var/spool/mail
|
||||
#mailbox_command = /some/where/procmail
|
||||
#mailbox_command = /some/where/procmail -a "$EXTENSION"
|
||||
mailbox_transport = procmail
|
||||
#fallback_transport = lmtp:unix:/file/name
|
||||
#fallback_transport = cyrus
|
||||
#fallback_transport =
|
||||
#luser_relay = $user@other.host
|
||||
#luser_relay = $local@other.host
|
||||
#luser_relay = admin+$local
|
||||
#header_checks = regexp:/etc/postfix/header_checks
|
||||
|
||||
mailbox_transport = cyrus
|
||||
|
||||
header_checks = regexp:/etc/postfix/header_checks
|
||||
#fast_flush_domains = $relay_domains
|
||||
|
||||
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
|
||||
#local_destination_concurrency_limit = 2
|
||||
#default_destination_concurrency_limit = 20
|
||||
sendmail_path = /usr/sbin/sendmail
|
||||
newaliases_path = /usr/bin/newaliases
|
||||
mailq_path = /usr/bin/mailq
|
||||
setgid_group = postdrop
|
||||
html_directory = no
|
||||
manpage_directory = /usr/share/man
|
||||
sample_directory = /etc/postfix
|
||||
readme_directory = no
|
||||
|
||||
virtual_alias_maps = hash:/etc/postfix/virtual, mysql:/etc/postfix/mysql-virtual.cf
|
||||
sender_canonical_maps = hash:/etc/postfix/canonical, mysql:/etc/postfix/mysql-canonical.cf
|
||||
sender_canonical_maps = hash:/etc/postfix/canonical, mysql:/etc/postfix/mysql-canonical.cf
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
# Host der Datenbank
|
||||
hosts = localhost
|
||||
# Benutzername und Passwort der Datenbank
|
||||
user = mail
|
||||
password = ipfire
|
||||
|
||||
# Der Datenbankname
|
||||
table = virtual
|
||||
hosts = localhost
|
||||
user = root
|
||||
password = mysqlfire
|
||||
table = user
|
||||
dbname = mail
|
||||
|
||||
select_field = alias
|
||||
where_field = username
|
||||
|
||||
# Das erste Ergebniss zur<75>ckliefern
|
||||
additional_conditions = and status = '1' limit 1
|
||||
select_field = canonical
|
||||
where_field = mbox
|
||||
additional_conditions = and active = '1' limit 1
|
||||
|
||||
@@ -1,15 +1,7 @@
|
||||
# Host der Datenbank
|
||||
hosts = localhost
|
||||
|
||||
# Benutzername und Passwort der Datenbank
|
||||
user = mail
|
||||
password = ipfire
|
||||
|
||||
# Der Datenbankname
|
||||
hosts = localhost
|
||||
user = root
|
||||
password = mysqlfire
|
||||
dbname = mail
|
||||
|
||||
# Der Tabellenname
|
||||
table = domain
|
||||
|
||||
select_field = domain_name
|
||||
where_field = domain_name
|
||||
table = domains
|
||||
select_field = domain
|
||||
where_field = domain
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
# Host der Datenbank
|
||||
hosts = localhost
|
||||
# Benutzername und Passwort der Datenbank
|
||||
user = mail
|
||||
password = ipfire
|
||||
|
||||
# Der Datenbankname
|
||||
hosts = localhost
|
||||
user = root
|
||||
password = mysqlfire
|
||||
dbname = mail
|
||||
table = virtual
|
||||
|
||||
select_field = dest
|
||||
where_field = alias
|
||||
additional_conditions = and status = '1'
|
||||
where_field = address
|
||||
additional_conditions = and active = '1'
|
||||
|
||||
Reference in New Issue
Block a user