Updated dkim support. Thanks to Florian for the patch.
16 files modified
2 files added
| | |
| | | //* mysql-virtual_relayrecipientmaps.cf |
| | | $this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf'); |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | | if(is_file($full_file_name)) { |
| | | copy($full_file_name, $config_dir.$configfile.'~'); |
| | | } |
| | | wf($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10026'); |
| | | |
| | | $full_file_name=$config_dir.'/tag_as_foreign.re'; |
| | | if(is_file($full_file_name)) { |
| | | copy($full_file_name, $config_dir.$configfile.'~'); |
| | | } |
| | | wf($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10024'); |
| | | |
| | | //* Changing mode and group of the new created config files. |
| | | caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', |
| | | __FILE__, __LINE__, 'chmod on mysql-virtual_*.cf*', 'chmod on mysql-virtual_*.cf* failed'); |
| | |
| | | $command = 'mkdir '.$cf['vmail_mailbox_base'].'/mailfilters'; |
| | | caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command"); |
| | | } |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | | if(is_file($full_file_name)) { |
| | | copy($full_file_name, $config_dir.$configfile.'~'); |
| | | } |
| | | $this->write_config_file($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10026'); |
| | | |
| | | $full_file_name=$config_dir.'/tag_as_foreign.re'; |
| | | if(is_file($full_file_name)) { |
| | | copy($full_file_name, $config_dir.$configfile.'~'); |
| | | } |
| | | $this->write_config_file($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10024'); |
| | | |
| | | //* Chmod and chown the .mailfilter file |
| | | $command = 'chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base'].'/.mailfilter'; |
| | |
| | | //* mysql-virtual_relayrecipientmaps.cf |
| | | $this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf'); |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | | if(is_file($full_file_name)) { |
| | | copy($full_file_name, $config_dir.$configfile.'~'); |
| | | } |
| | | wf($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10026'); |
| | | |
| | | $full_file_name=$config_dir.'/tag_as_foreign.re'; |
| | | if(is_file($full_file_name)) { |
| | | copy($full_file_name, $config_dir.$configfile.'~'); |
| | | } |
| | | wf($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10024'); |
| | | |
| | | //* Changing mode and group of the new created config files. |
| | | caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', |
| | | __FILE__, __LINE__, 'chmod on mysql-virtual_*.cf*', 'chmod on mysql-virtual_*.cf* failed'); |
| | |
| | | //* mysql-virtual_relayrecipientmaps.cf |
| | | $this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf'); |
| | | |
| | | //* postfix-dkim |
| | | $full_file_name=$config_dir.'/tag_as_originating.re'; |
| | | if(is_file($full_file_name)) copy($full_file_name, $config_dir.$configfile.'~'); |
| | | wf($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10026'); |
| | | |
| | | $full_file_name=$config_dir.'/tag_as_foreign.re'; |
| | | if(is_file($full_file_name)) copy($full_file_name, $config_dir.$configfile.'~'); |
| | | wf($full_file_name,'/^/ FILTER amavis:[127.0.0.1]:10024'); |
| | | |
| | | //* Changing mode and group of the new created config files. |
| | | caselog('chmod o= '.$config_dir.'/mysql-virtual_*.cf* &> /dev/null', |
| | | __FILE__, __LINE__, 'chmod on mysql-virtual_*.cf*', 'chmod on mysql-virtual_*.cf* failed'); |
| | |
| | | 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 $virtual_mailbox_limit_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf |
| | | 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_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | 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 $virtual_mailbox_limit_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf |
| | | 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_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | 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 $virtual_mailbox_limit_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf |
| | | 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_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | 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 $virtual_mailbox_limit_maps |
| | | smtpd_sender_restrictions = check_sender_access mysql:{config_dir}/mysql-virtual_sender.cf |
| | | 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_client_restrictions = check_client_access mysql:{config_dir}/mysql-virtual_client.cf |
| | | smtpd_client_message_rate_limit = 100 |
| | | maildrop_destination_concurrency_limit = 1 |
| | |
| | | $wb['module_txt'] = 'Modul'; |
| | | $wb['maildir_path_txt'] = 'Maildir Pfad'; |
| | | $wb['homedir_path_txt'] = 'Homedir Pfad'; |
| | | $wb["dkim_path_txt"] = 'DKIM Pfad'; |
| | | $wb["dkim_path_error"] = 'DKIM Pfad nicht gefunden oder nicht beschreibbar.'; |
| | | $wb['mailuser_uid_txt'] = 'Mailbenutzer UID'; |
| | | $wb['mailuser_gid_txt'] = 'Mailbenutzer GID'; |
| | | $wb['mailuser_name_txt'] = 'Mailbenutzer Name'; |
| | |
| | | $wb['module_txt'] = 'Module'; |
| | | $wb['maildir_path_txt'] = 'Chemin Maildir'; |
| | | $wb['homedir_path_txt'] = 'Chemin Homedir'; |
| | | $wb['dkim_path_txt'] = 'Chemin DKIM'; |
| | | $wb['dkim_path_error'] = 'Le chemin DKIM n\'est pas trouvé ou ne peut être écrit.'; |
| | | $wb['mailuser_uid_txt'] = 'UID de l\'utilisateur mail'; |
| | | $wb['mailuser_gid_txt'] = 'GID de l\'utilisateur mail'; |
| | | $wb['mailuser_name_txt'] = 'Nom d\'utilisateur mail'; |
New file |
| | |
| | | <?php |
| | | $wb["public_key_txt"] = 'Public-Key'; |
| | | $wb["ttl_txt"] = 'TTL'; |
| | | $wb["active_txt"] = 'Aktiv'; |
| | | $wb["record_exists_txt"] = 'DNS-Eintrag bereits vorhanden'; |
| | | $wb["limit_dns_record_txt"] = 'Die max. Anzahl von DNS Eintraegen fuer den Account ist erreicht.'; |
| | | $wb["no_zone_perm"] = 'Fehlende Berechtigung zum Hinzufuegen eines Eintrags zur DNS-Zone.'; |
| | | ?> |
| | |
| | | $wb['btn_cancel_txt'] = 'Abbrechen'; |
| | | $wb['domain_txt'] = 'Domain'; |
| | | $wb['email_txt'] = 'E-Mail Adresse'; |
| | | $wb['dkim_txt'] = 'DKIM aktiviert'; |
| | | $wb['ns1_txt'] = 'NS 1'; |
| | | $wb['ns2_txt'] = 'NS 2'; |
| | | $wb['ip_txt'] = 'IP Adresse'; |
New file |
| | |
| | | <?php |
| | | $wb["public_key_txt"] = 'Clé publiquePublic-Key'; |
| | | $wb["ttl_txt"] = 'TTL'; |
| | | $wb["active_txt"] = 'Actif'; |
| | | $wb["record_exists_txt"] = 'L\'enregistrement DNS exist déjà'; |
| | | $wb["limit_dns_record_txt"] = 'Le nombre max. d\'enregistrement DNS pour votre compte à été atteint.'; |
| | | $wb["no_zone_perm"] = 'Vous n\'avez pas la permission d\'ajouter un enregistrement à cette Zone DNS.'; |
| | | ?> |
| | |
| | | $wb['btn_cancel_txt'] = 'Annuler'; |
| | | $wb['domain_txt'] = 'Domaine'; |
| | | $wb['email_txt'] = 'Email'; |
| | | $wb['dkim_txt'] = 'DKIM activé'; |
| | | $wb['ns1_txt'] = 'NS 1'; |
| | | $wb['ns2_txt'] = 'NS 2'; |
| | | $wb['ip_txt'] = 'Adresse IP'; |
| | |
| | | $wb['domain_txt'] = 'Domain'; |
| | | $wb['type_txt'] = 'Typ'; |
| | | $wb['active_txt'] = 'Aktiv'; |
| | | $wb["dkim_txt"] = 'DKIM aktivieren |
| | | $wb["dkim_private_txt"] = 'DKIM Private-key'; |
| | | $wb["dkim_public_txt"] = 'DKIM Public-key\nfor information only'; |
| | | $wb["dkim_generate_txt"] = 'erstelle DKIM Private-key'; |
| | | $wb["dkim_dns_txt"] = 'DNS-Record (TYPE TXT)<br><br>add this record to your DNS'; |
| | | $wb["dkim_private_key_error"] = 'ungueltiger DKIM-Private key'; |
| | | $wb['domain_error_empty'] = 'Domain ist leer'; |
| | | $wb['domain_error_unique'] = 'Doppelte Domain.'; |
| | | $wb['domain_error_regex'] = 'Ungültiger Domainname.'; |
| | |
| | | $wb['domain_txt'] = 'Domaine'; |
| | | $wb['type_txt'] = 'Type'; |
| | | $wb['active_txt'] = 'Actif'; |
| | | $wb['dkim_txt'] = 'Activer DKIM'; |
| | | $wb['dkim_private_txt'] = 'Clé privée DKIM'; |
| | | $wb['dkim_public_txt'] = 'Clé publique DKIM\npour information seulement'; |
| | | $wb['dkim_generate_txt'] = 'Générer la clé privée DKIM'; |
| | | $wb['dkim_dns_txt'] = 'Enregistrement DNS (TYPE TXT)<br><br>Ajouter l\'enregistrement à votre DNS'; |
| | | $wb['dkim_private_key_error'] = 'Clé privée DKIM invalide'; |
| | | $wb['dkim_settings_txt'] = 'DomainKeys Identified Mail (DKIM)'; |
| | | $wb['domain_error_empty'] = 'Le domaine est vide.'; |
| | | $wb['domain_error_unique'] = 'Dupliquer le domaine.'; |
| | | $wb['domain_error_regex'] = 'Le domaine est invalide.'; |
| | |
| | | <a href="javascript:setRequest('create','{tmpl_var name='domain'}')">{tmpl_var name='dkim_generate_txt'}</a>
|
| | | </div>
|
| | | <div class="ctrlHolder">
|
| | | <label for="dkim_public">{tmpl_var name='dkim_public_txt'}</label>
|
| | | <textarea name="dkim_public" id="dkim_public" rows='5' cols='30' readonly>{tmpl_var name='dkim_public'}</textarea>
|
| | | <textarea name="dkim_public" style="display:none;" id="dkim_public" rows='5' cols='30' readonly>{tmpl_var name='dkim_public'}</textarea> |
| | | </div>
|
| | |
|
| | | </div>
|
| | |
| | | function restart_amavis() { |
| | | global $app,$conf;
|
| | | $initfile=$conf['init_scripts'].'/amavis';
|
| | | $app->log('Restarting amavis.',LOGLEVEL_DEBUG);
|
| | | exec(escapeshellarg($conf['init_scripts']).escapeshellarg('/amavis').' restart',$output);
|
| | | $app->log('Reloading amavis.',LOGLEVEL_DEBUG); |
| | | exec(escapeshellarg($conf['init_scripts']).escapeshellarg('/amavis').' reload',$output); |
| | | foreach($output as $logline) $app->log($logline,LOGLEVEL_DEBUG);
|
| | | }
|
| | |
|