Merge branch 'reject_sender_login_mismatch' into 'master'
Reject sender login mismatch
Included FS#3161: Reject sender login mismatch
Feature added as checkbox on mail-server-config. If activated (default = 'n') outgoing mails are checked against existing mail_users and mail_forwarders(aliases).
Additional added "prefetch" to dovecot-config-files to halve sql-queries (dovecot is able to fetch all userdb-queries already with passworddb-query -> if query does this, activate prefetch-driver, and with active prefetching, dovecot doesn't call database twice, when User loggs in -> this doesn't matter on small systems, but improves performance on large systems)
See merge request !174
45 files modified
1 files added
| | |
| | | //* mysql-virtual_sender.cf |
| | | $this->process_postfix_config('mysql-virtual_sender.cf'); |
| | | |
| | | //* mysql-virtual_sender_login_maps.cf |
| | | $this->process_postfix_config('mysql-virtual_sender_login_maps.cf'); |
| | | |
| | | //* mysql-virtual_client.cf |
| | | $this->process_postfix_config('mysql-virtual_client.cf'); |
| | | |
| | |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | unset($server_ini_array); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = 'check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_postfix.conf.master', 'tpl/fedora_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | | $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines |
| | |
| | | } |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $server_ini_rec = $this->db->queryOneRecord("SELECT config FROM ?? WHERE server_id = ?", $conf["mysql"]["database"].'.server', $conf['server_id']); |
| | | $server_ini_array = ini_to_array(stripslashes($server_ini_rec['config'])); |
| | | unset($server_ini_rec); |
| | | |
| | | //* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update |
| | | $rbl_list = ''; |
| | | if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') { |
| | | $rbl_hosts = explode(",", str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list'])); |
| | | foreach ($rbl_hosts as $key => $value) { |
| | | $rbl_list .= ", reject_rbl_client ". $value; |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list); |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/gentoo_postfix.conf.master', 'tpl/gentoo_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | |
| | | //* mysql-virtual_sender.cf |
| | | $this->process_postfix_config('mysql-virtual_sender.cf'); |
| | | |
| | | //* mysql-virtual_sender_login_maps.cf |
| | | $this->process_postfix_config('mysql-virtual_sender_login_maps.cf'); |
| | | |
| | | //* mysql-virtual_client.cf |
| | | $this->process_postfix_config('mysql-virtual_client.cf'); |
| | | |
| | |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | unset($server_ini_array); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = 'check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | //* These postconf commands will be executed on installation and update |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | | '{vmail_userid}' => $cf['vmail_userid'], |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_postfix.conf.master', 'tpl/opensuse_postfix.conf.master'); |
| | | $postconf_tpl = strtr($postconf_tpl, $postconf_placeholders); |
| | | $postconf_commands = array_filter(explode("\n", $postconf_tpl)); // read and remove empty lines |
| | |
| | | //* mysql-virtual_sender.cf |
| | | $this->process_postfix_config('mysql-virtual_sender.cf'); |
| | | |
| | | //* mysql-virtual_sender_login_maps.cf |
| | | $this->process_postfix_config('mysql-virtual_sender_login_maps.cf'); |
| | | |
| | | //* mysql-virtual_client.cf |
| | | $this->process_postfix_config('mysql-virtual_client.cf'); |
| | | |
| | |
| | | } |
| | | } |
| | | unset($rbl_hosts); |
| | | unset($server_ini_array); |
| | | |
| | | //* If Postgrey is installed, configure it |
| | | $greylisting = ''; |
| | | if($conf['postgrey']['installed'] == true) { |
| | | $greylisting = 'check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | $greylisting = ', check_recipient_access mysql:/etc/postfix/mysql-virtual_policy_greylist.cf'; |
| | | } |
| | | |
| | | $reject_sender_login_mismatch = ''; |
| | | if(isset($server_ini_array['mail']['reject_sender_login_mismatch']) && ($server_ini_array['mail']['reject_sender_login_mismatch'] == 'y')) { |
| | | $reject_sender_login_mismatch = ', reject_authenticated_sender_login_mismatch'; |
| | | } |
| | | unset($server_ini_array); |
| | | |
| | | $postconf_placeholders = array('{config_dir}' => $config_dir, |
| | | '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'], |
| | |
| | | '{vmail_groupid}' => $cf['vmail_groupid'], |
| | | '{rbl_list}' => $rbl_list, |
| | | '{greylisting}' => $greylisting, |
| | | '{reject_slm}' => $reject_sender_login_mismatch, |
| | | ); |
| | | |
| | | $postconf_tpl = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian_postfix.conf.master', 'tpl/debian_postfix.conf.master'); |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | | # Do not enable it on Dovecot 1.x servers |
| | |
| | | # This can be made to work with SQL and LDAP databases, see their example |
| | | # configuration files for more information how to do it. |
| | | # <doc/wiki/UserDatabase.Prefetch.txt> |
| | | #userdb prefetch { |
| | | #} |
| | | userdb prefetch { |
| | | } |
| | | |
| | | # User to use for the process. This user needs access to only user and |
| | | # password databases, nothing else. Only shadow and pam authentication |
| | |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | |
| | | # This can be made to work with SQL and LDAP databases, see their example |
| | | # configuration files for more information how to do it. |
| | | # <doc/wiki/UserDatabase.Prefetch.txt> |
| | | #userdb prefetch { |
| | | #} |
| | | userdb prefetch { |
| | | } |
| | | |
| | | # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this |
| | | # uses Name Service Switch, which is configured in /etc/nsswitch.conf. |
| | |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | |
| | | protocol lmtp { |
| | | postmaster_address = webmaster@localhost |
| | | mail_plugins = quota sieve |
| | | } |
| | | } |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
New file |
| | |
| | | user = {mysql_server_ispconfig_user} |
| | | password = {mysql_server_ispconfig_password} |
| | | dbname = {mysql_server_database} |
| | | query = SELECT destination FROM mail_forwarding WHERE source = '%s' AND active = 'y' AND type = 'alias' AND server_id = {server_id} UNION SELECT email FROM mail_user WHERE email = '%s' AND disablesmtp = 'n' AND server_id = {server_id}; |
| | | hosts = {mysql_server_ip} |
| | |
| | | connect = host={mysql_server_host} dbname={mysql_server_database} user={mysql_server_ispconfig_user} password={mysql_server_ispconfig_password} |
| | | default_pass_scheme = CRYPT |
| | | |
| | | password_query = SELECT password FROM mail_user WHERE (login = '%u' OR email = '%u') AND disable%Ls = 'n' AND server_id = '{server_id}' |
| | | # password-query with prefetch |
| | | password_query = SELECT email as user, password, maildir as userdb_home, CONCAT('maildir:', maildir, '/Maildir') as userdb_mail, uid as userdb_uid, gid as userdb_gid, CONCAT('*:storage=', quota, 'B') AS userdb_quota_rule, CONCAT(maildir, '/.sieve') as userdb_sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | user_query = SELECT email as user, maildir as home, CONCAT('maildir:', maildir, '/Maildir') as mail, uid, gid, CONCAT('*:storage=', quota, 'B') AS quota_rule, CONCAT(maildir, '/.sieve') as sieve FROM mail_user WHERE (login = '%u' OR email = '%u') AND `disable%Ls` = 'n' AND server_id = '{server_id}' |
| | | |
| | | # The iterate_query is required for the doveadm command only and works only on dovecot 2 servers. |
| | |
| | | # This can be made to work with SQL and LDAP databases, see their example |
| | | # configuration files for more information how to do it. |
| | | # <doc/wiki/UserDatabase.Prefetch.txt> |
| | | #userdb prefetch { |
| | | #} |
| | | userdb prefetch { |
| | | } |
| | | |
| | | # System users (NSS, /etc/passwd, or similiar). In many systems nowadays this |
| | | # uses Name Service Switch, which is configured in /etc/nsswitch.conf. |
| | |
| | | driver = sql |
| | | } |
| | | userdb { |
| | | driver = prefetch |
| | | } |
| | | userdb { |
| | | args = /etc/dovecot/dovecot-sql.conf |
| | | driver = sql |
| | | } |
| | |
| | | transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:{config_dir}/mysql-virtual_transports.cf |
| | | relay_domains = mysql:{config_dir}/mysql-virtual_relaydomains.cf |
| | | relay_recipient_maps = mysql:{config_dir}/mysql-virtual_relayrecipientmaps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_sender_login_maps = proxy:mysql:{config_dir}/mysql-virtual_sender_login_maps.cf |
| | | proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $sender_bcc_maps $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $smtpd_sender_login_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf regexp:{config_dir}/tag_as_originating.re{reject_slm}, permit_mynetworks, check_sender_access regexp:{config_dir}/tag_as_foreign.re |
| | | smtpd_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | 'width' => '40', |
| | | 'maxlength' => '255' |
| | | ), |
| | | 'reject_sender_login_mismatch' => array ( |
| | | 'datatype' => 'VARCHAR', |
| | | 'formtype' => 'CHECKBOX', |
| | | 'default' => 'n', |
| | | 'value' => array(0 => 'n', 1 => 'y') |
| | | ), |
| | | 'mailbox_size_limit' => array( |
| | | 'datatype' => 'INTEGER', |
| | | 'formtype' => 'TEXT', |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP адрес'; |
| | |
| | | $wb['relayhost_txt'] = 'Host Relay'; |
| | | $wb['relayhost_user_txt'] = 'Usuário do Host Relay'; |
| | | $wb['relayhost_password_txt'] = 'Senha do Host Relay'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Tamanho máximo da Caixa Postal'; |
| | | $wb['message_size_limit_txt'] = 'Tamanho máximo de mensagem'; |
| | | $wb['ip_address_txt'] = 'Endereço IP'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost uživatel'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost heslo'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Limit velikosti mailboxu'; |
| | | $wb['message_size_limit_txt'] = 'Limit velikosti zprávy'; |
| | | $wb['ip_address_txt'] = 'IP adresa'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost Benutzer'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Passwort'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Zurückweisen von Mails, wenn Sender nicht gleich Login'; |
| | | $wb['mailbox_size_limit_txt'] = 'E-Mailkonto Beschränkung'; |
| | | $wb['message_size_limit_txt'] = 'E-Mailgrößen Beschränkung'; |
| | | $wb['ip_address_txt'] = 'IP Adresse'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Χρήστης Relayhost'; |
| | | $wb['relayhost_password_txt'] = 'Συνθηματικό Relayhost'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Όριο χώρου θυρίδας'; |
| | | $wb['message_size_limit_txt'] = 'Μήνυμα ορίου χώρου'; |
| | | $wb['ip_address_txt'] = 'Διεύθυνση IP'; |
| | |
| | | $wb["relayhost_txt"] = 'Relayhost'; |
| | | $wb["relayhost_user_txt"] = 'Relayhost User'; |
| | | $wb["relayhost_password_txt"] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb["mailbox_size_limit_txt"] = 'Mailbox Size Limit'; |
| | | $wb["message_size_limit_txt"] = 'Message Size Limit'; |
| | | $wb["ip_address_txt"] = 'IP Address'; |
| | |
| | | $wb['relayhost_txt'] = 'Servidor de retransmisión'; |
| | | $wb['relayhost_user_txt'] = 'Usuario de retransmisión'; |
| | | $wb['relayhost_password_txt'] = 'Contraseña de retramisión'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Límite de tamaño del buzón'; |
| | | $wb['message_size_limit_txt'] = 'Límite de tamaño del mensaje'; |
| | | $wb['ip_address_txt'] = 'Dirección IP'; |
| | |
| | | $wb['relayhost_txt'] = 'Edelleenlähetyspalvelin'; |
| | | $wb['relayhost_user_txt'] = 'Edelleenlähetyspalvelimen käyttäjätunnus'; |
| | | $wb['relayhost_password_txt'] = 'Edelleenlähetyspalvelimen salasana'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Postilaatikon koko'; |
| | | $wb['message_size_limit_txt'] = 'Viestien enimmäiskoko'; |
| | | $wb['ip_address_txt'] = 'IP-osoite'; |
| | |
| | | $wb['relayhost_txt'] = 'Hôde relais'; |
| | | $wb['relayhost_user_txt'] = 'Utilisateur du relais'; |
| | | $wb['relayhost_password_txt'] = 'Mot de passe du relais'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Taille maximale de la boite mail'; |
| | | $wb['message_size_limit_txt'] = 'Taille maximale des messages'; |
| | | $wb['ip_address_txt'] = 'Adresse IP'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost korisnik'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost šifra'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Dozvoljena veličina mailboxa'; |
| | | $wb['message_size_limit_txt'] = 'Dozvoljena veličina emaila'; |
| | | $wb['ip_address_txt'] = 'IP adresa'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Pengguna Relayhost'; |
| | | $wb['relayhost_password_txt'] = 'Kata Sandi Relayhost'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Batasan Ukuran Mailbox'; |
| | | $wb['message_size_limit_txt'] = 'Batasan Ukuran Pesan'; |
| | | $wb['ip_address_txt'] = 'Alamat IP'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'Indirizzo IP'; |
| | |
| | | $wb['relayhost_txt'] = 'リレーホスト'; |
| | | $wb['relayhost_user_txt'] = 'リレーホストユーザー'; |
| | | $wb['relayhost_password_txt'] = 'リレーホストパスワード'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'メールボックスのサイズ'; |
| | | $wb['message_size_limit_txt'] = 'メッセージの最大サイズ'; |
| | | $wb['ip_address_txt'] = 'IPアドレス'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost gebruiker'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost wachtwoord'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox grootte limiet'; |
| | | $wb['message_size_limit_txt'] = 'Message grootte limiet'; |
| | | $wb['ip_address_txt'] = 'IP adres'; |
| | |
| | | $wb['relayhost_txt'] = 'Adres Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Użytkownik Relayhost'; |
| | | $wb['relayhost_password_txt'] = 'Hasło Relayhost'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Maksymalna wielkość skrzynki pocztowej'; |
| | | $wb['message_size_limit_txt'] = 'Maksymalna wielkość wiadomości'; |
| | | $wb['ip_address_txt'] = 'Adres IP'; |
| | |
| | | $wb['relayhost_txt'] = 'Host Relay'; |
| | | $wb['relayhost_user_txt'] = 'Utilizador do Host Relay'; |
| | | $wb['relayhost_password_txt'] = 'Senha do Host Relay'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Tamanho máximo da Caixa Postal'; |
| | | $wb['message_size_limit_txt'] = 'Tamanho máximo de mensagem'; |
| | | $wb['ip_address_txt'] = 'Endereço IP'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['relayhost_txt'] = 'Relay-хост'; |
| | | $wb['relayhost_user_txt'] = 'Логин Relay-хоста'; |
| | | $wb['relayhost_password_txt'] = 'Пароль Relay-хоста'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Лимит размера Mailbox'; |
| | | $wb['message_size_limit_txt'] = 'Лимит размера сообщения'; |
| | | $wb['ip_address_txt'] = 'IP-адрес'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost User'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Password'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mailbox Size Limit'; |
| | | $wb['message_size_limit_txt'] = 'Message Size Limit'; |
| | | $wb['ip_address_txt'] = 'IP Address'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost uživateľ'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost heslo'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Limit ve?kosti poštovej schránky'; |
| | | $wb['message_size_limit_txt'] = 'Limit ve?kosti správy'; |
| | | $wb['ip_address_txt'] = 'IP Adresa'; |
| | |
| | | $wb['relayhost_txt'] = 'Relayhost'; |
| | | $wb['relayhost_user_txt'] = 'Relayhost Kullanıcı'; |
| | | $wb['relayhost_password_txt'] = 'Relayhost Şifre'; |
| | | $wb['reject_sender_login_mismatch_txt'] = 'Reject sender and login mismatch'; |
| | | $wb['mailbox_size_limit_txt'] = 'Mail kutusu boyutu'; |
| | | $wb['message_size_limit_txt'] = 'Mesaj boyutu'; |
| | | $wb['ip_address_txt'] = 'IP Adresleri'; |
| | |
| | | <div class="form-group"> |
| | | <label for="relayhost_password" class="col-sm-3 control-label">{tmpl_var name='relayhost_password_txt'}</label> |
| | | <div class="col-sm-9"><input type="password" name="relayhost_password" id="relayhost_password" value="{tmpl_var name='relayhost_password'}" autocomplete="off" class="form-control" autocomplete="off" /></div></div> |
| | | <div class="form-group"> |
| | | <label class="col-sm-3 control-label">{tmpl_var name='reject_sender_login_mismatch_txt'}</label> |
| | | <div class="col-sm-9"> |
| | | {tmpl_var name='reject_sender_login_mismatch'} |
| | | </div> |
| | | </div> |
| | | <div class="form-group"> |
| | | <label for="mailbox_size_limit" class="col-sm-3 control-label">{tmpl_var name='mailbox_size_limit_txt'}</label> |
| | | <div class="col-sm-6"><input type="text" name="mailbox_size_limit" id="mailbox_size_limit" value="{tmpl_var name='mailbox_size_limit'}" class="form-control" /></div><div class="col-sm-3 input-sm"> MB |
| | |
| | | $rbl_hosts = explode(",", $rbl_hosts); |
| | | } |
| | | $options = explode(", ", exec("postconf -h smtpd_recipient_restrictions")); |
| | | $new_options = array(); |
| | | foreach ($options as $key => $value) { |
| | | if (!preg_match('/reject_rbl_client/', $value)) { |
| | | $new_options[] = $value; |
| | |
| | | exec("postconf -e 'smtpd_recipient_restrictions = ".implode(", ", $new_options)."'"); |
| | | } |
| | | |
| | | if($mail_config['reject_sender_login_mismatch'] != $old_ini_data['mail']['reject_sender_login_mismatch']) { |
| | | $options = explode(", ", exec("postconf -h smtpd_sender_restrictions")); |
| | | $new_options = array(); |
| | | foreach ($options as $key => $value) { |
| | | if (!preg_match('/reject_authenticated_sender_login_mismatch/', $value)) { |
| | | $new_options[] = $value; |
| | | } |
| | | } |
| | | |
| | | if ($mail_config['reject_sender_login_mismatch'] == 'y') { |
| | | reset($new_options); $i = 0; |
| | | // insert after check_sender_access but before permit_... |
| | | while (isset($new_options[$i]) && substr($new_options[$i], 0, 19) == 'check_sender_access') ++$i; |
| | | array_splice($new_options, $i, 0, array('reject_authenticated_sender_login_mismatch')); |
| | | } |
| | | exec("postconf -e 'smtpd_sender_restrictions = ".implode(", ", $new_options)."'"); |
| | | } |
| | | |
| | | if ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') { |
| | | // If dovecot switch to lmtp |
| | | if($app->system->is_installed('dovecot')) { |