Am 07.12.2011 17:42, schrieb /dev/rob0: > Nonsense. Recognition of new domains need not be instant. Email is > itself not instant messaging. Domain owners should expect reasonable > delays in changes of domain hosting, and are responsible to plan > accordingly. Your expectations are absurd. > > A simple workaround, as I am sure has been suggested on this list > numerous times, is to run a query from a cron job to populate and > postmap the domain lists.
well, so try to build a cronjob for the following setup to make
all this consistent with static files while the base-iformations
of which users exists in dbmail_aliases and domains in this
form are non-existing
you cant't simply do this without mysql-tables and yes there exists a
simply to use but complex inside web-interface for all this options and
yes they are all used and not just for fun
there are thousands of things you can not do with flat config-files
CREATE VIEW `dbma_recipients` AS
SELECT `dbmail_aliases`.`alias` AS `alias` FROM `dbmail_aliases`
WHERE alias not like '%@'
UNION (SELECT concat('@',`dbma_mta`.`mydestination`) AS `alias`
FROM `dbma_mta`
WHERE (`dbma_mta`.`transport` <> 'dbmail-lmtp:127.0.0.1:24'))
UNION (SELECT `dbma_recipient_relay`.`mydestination` AS `alias`
FROM `dbma_recipient_relay`)
UNION (SELECT `dbma_aliases_global`.`alias` AS `alias`
FROM `dbma_aliases_global`);
CREATE VIEW `dbma_transports` AS
SELECT mydestination,transport
FROM `dbma_mta`
UNION (select mydestination,transport FROM `dbma_recipient_relay`)
UNION (select mydestination,transport FROM `dbma_transports_error`);
myhostname = myhostname
smtpd_banner = $myhostname hardened ESMTP
smtp_helo_name = $myhostname
inet_protocols = ipv4
inet_interfaces = all
unknown_local_recipient_reject_code = 550
unverified_recipient_reject_code = 550
bounce_template_file = /etc/postfix/bounce.cf
fast_flush_domains =
mailbox_size_limit = 0
recipient_delimiter = +
broken_sasl_auth_clients = yes
anvil_rate_time_unit = 1800s
smtpd_client_connection_rate_limit = 50
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_proxy_options = speed_adjust
smtpd_helo_required = yes
smtpd_discard_ehlo_keywords = silent-discard, etrn, dsn
smtpd_recipient_limit = 500
smtp_sasl_auth_enable = yes
smtp_sender_dependent_authentication = yes
smtp_sasl_security_options = noanonymous
proxy_read_maps = proxy:mysql:/etc/postfix/mysql-mynetworks.cf
proxy:mysql:/etc/postfix/mysql-mydestination.cf
proxy:mysql:/etc/postfix/mysql-recipients.cf
proxy:mysql:/etc/postfix/mysql-rewritedomains.cf
proxy:mysql:/etc/postfix/mysql-rewritesenders.cf
proxy:mysql:/etc/postfix/mysql-transport.cf
proxy:mysql:/etc/postfix/mysql-sender_relay_hosts.cf
proxy:mysql:/etc/postfix/mysql-sender_relay_hosts_auth.cf
proxy:mysql:/etc/postfix/mysql-aliases.cf
proxy:mysql:/etc/postfix/mysql-senderaccess.cf
proxy:mysql:/etc/postfix/mysql-spamfilter.cf
proxy:mysql:/etc/postfix/mysql-forwarders.cf
smtpd_helo_restrictions = permit_mynetworks
permit_sasl_authenticated
reject_non_fqdn_helo_hostname
reject_invalid_helo_hostname
reject_unknown_helo_hostname
smtpd_recipient_restrictions = permit_mynetworks
reject_non_fqdn_recipient
reject_non_fqdn_sender
reject_unlisted_sender
reject_authenticated_sender_login_mismatch
permit_sasl_authenticated
reject_unauth_destination
reject_unknown_sender_domain
reject_unknown_recipient_domain
reject_invalid_hostname
reject_unknown_reverse_client_hostname
reject_unauth_pipelining
reject_rbl_client dnsbl-1.uceprotect.net
check_policy_service unix:/var/spool/postfix/postgrey/socket
check_recipient_access proxy:mysql:/etc/postfix/mysql-spamfilter.cf
barracuda_smtpd_recipient_restrictions = permit_mynetworks, reject
mynetworks = 127.0.0.0/8,
proxy:mysql:/etc/postfix/mysql-mynetworks.cf
mydestination =
proxy:mysql:/etc/postfix/mysql-mydestination.cf
local_recipient_maps =
proxy:mysql:/etc/postfix/mysql-recipients.cf
recipient_canonical_maps =
proxy:mysql:/etc/postfix/mysql-rewritedomains.cf
sender_canonical_maps =
proxy:mysql:/etc/postfix/mysql-rewritesenders.cf
transport_maps =
proxy:mysql:/etc/postfix/mysql-transport.cf
sender_dependent_relayhost_maps =
proxy:mysql:/etc/postfix/mysql-sender_relay_hosts.cf
smtp_sasl_password_maps =
proxy:mysql:/etc/postfix/mysql-sender_relay_hosts_auth.cf
alias_maps =
proxy:mysql:/etc/postfix/mysql-aliases.cf
smtpd_sender_login_maps =
proxy:mysql:/etc/postfix/mysql-senderaccess.cf
virtual_alias_maps =
proxy:mysql:/etc/postfix/mysql-forwarders.cf
body_checks_size_limit = 65535
queue_run_delay = 240
maximal_queue_lifetime = 3d
bounce_queue_lifetime = 3d
minimal_backoff_time = 900
maximal_backoff_time = 5400
message_size_limit = 36700160
max_idle = 60
in_flow_delay = ${stress?2}${stress:0}s
smtp_destination_recipient_limit = 15
smtp_initial_destination_concurrency = 5
smtp_destination_concurrency_limit = 5
smtp_destination_concurrency_failed_cohort_limit = 5
smtp_destination_rate_delay = 1
smtp_helo_timeout = ${stress?45}${stress:180}s
smtp_mail_timeout = ${stress?45}${stress:180}s
smtp_connect_timeout = ${stress?15}${stress:45}s
smtpd_error_sleep_time = ${stress?1}${stress:2}s
smtpd_soft_error_limit = ${stress?2}${stress:5}
smtpd_hard_error_limit = ${stress?5}${stress:10}
smtpd_peername_lookup = yes
lmtp_max_idle = 600
lmtp_connection_cache_time_limit = 600
lmtp_connection_reuse_time_limit = 600
lmtp_destination_concurrency_limit = 30
dbmail-lmtp_destination_concurrency_limit = 30
dbmail-lmtp_destination_rate_delay = 0
smtpd_use_tls = yes
smtpd_tls_loglevel = 1
smtpd_tls_cert_file = /etc/postfix/certs/key.pem
smtpd_tls_key_file = /etc/postfix/certs/key.pem
smtpd_tls_CAfile =
/etc/pki/tls/certs/ca-bundle.crt
smtpd_tls_security_level = may
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_tls_session_cache_database =
btree:/var/lib/postfix/smtpd_scache
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-aliases.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select target from dbma_aliases where source like '%s'
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-mydestination.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select transport from dbma_mta where mydestination like '%s'
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-recipients.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select alias from dbma_recipients where alias like '%s'
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-rewritedomains.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select target from dbma_rewrite_domains where source like '%d'
and ((select count(*) from
dbmail_aliases where alias like (select concat('%u', (select target from
dbma_rewrite_domains where source like
'%d' limit 1)) from dbma_rewrite_domains limit 1))>0 or (select count(*) from
dbmail_aliases where alias like '%u@'
limit 1)>0) limit 1
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-rewritesenders.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select target from dbma_rewrite_senders where source like '%s'
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-spamfilter.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select filter from dbma_spamfilter where domain like '%d'
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-transport.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select transport from dbma_transports where mydestination like
'%s' or mydestination like '%d'
order by transport desc limit 1;
[root@mail:/etc/postfix]$ cat mysql-sender_relay_hosts.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select transport from dbma_sender_relay where email like '%s'
[root@mail:/etc/postfix]$ cat mysql-sender_relay_hosts_auth.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select concat(username, ':', password) from dbma_sender_relay
where email like '%s'
[root@dbmail:/etc/postfix]$ cat /etc/postfix/mysql-senderaccess.cf
user = dbmailro
password = ****
dbname = dbmail
hosts = unix:/var/lib/mysql/mysql.sock inet:10.0.0.120:3307
query = select userid from dbmail_users where ((select count(*) from
dbma_mta where mydestination like
'%d') > 0 or (select count(*) from dbma_sender_relay where email like '%s') >
0) and user_idnr>3
signature.asc
Description: OpenPGP digital signature
