Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54357 - in /trunk/mail: src/YaPI/MailServer.pm src/suse-mailserver.schema users-plugin/users_plugin_mail_groups.ycp
  • From: varkoly@xxxxxxxxxxxxxxxx
  • Date: Sun, 04 Jan 2009 09:08:27 -0000
  • Message-id: <E1LJOyB-0006cl-FY@xxxxxxxxxxxxxxxx>
Author: varkoly
Date: Sun Jan 4 10:08:27 2009
New Revision: 54357

URL: http://svn.opensuse.org/viewcvs/yast?rev=54357&view=rev
Log:
bnc#463430 - Mail to a shared folder can couse infinit loop

Modified:
trunk/mail/src/YaPI/MailServer.pm
trunk/mail/src/suse-mailserver.schema
trunk/mail/users-plugin/users_plugin_mail_groups.ycp

Modified: trunk/mail/src/YaPI/MailServer.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=54357&r1=54356&r2=54357&view=diff
==============================================================================
--- trunk/mail/src/YaPI/MailServer.pm (original)
+++ trunk/mail/src/YaPI/MailServer.pm Sun Jan 4 10:08:27 2009
@@ -1916,12 +1916,14 @@
if( $MailLocalDelivery->{'Type'} ne 'none')
{
write_attribute($MainCf,'mydestination','$myhostname,
localhost.$mydomain, $mydomain, ldap:/etc/postfix/ldapmydestination.cf');
- write_attribute($MainCf,'virtual_alias_maps',
'ldap:/etc/postfix/ldaplocal_recipient_maps.cf');
-
write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_maps.cf');
- write_attribute($MainCf,'alias_maps','hash:/etc/aliases,
ldap:/etc/postfix/ldapalias_maps_member.cf,
ldap:/etc/postfix/ldapalias_maps.cf');
+ write_attribute($MainCf,'virtual_alias_maps',
'ldap:/etc/postfix/ldaplocal_recipient_maps.cf,
ldap:/etc/postfix/ldapvirtual_alias_maps_member.cf,
ldap:/etc/postfix/ldapvirtual_alias_maps.cf');
+
write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_domains.cf');
+ write_attribute($MainCf,'alias_maps','hash:/etc/aliases,
ldap:/etc/postfix/ldapalias_maps_folder.cf,
ldap:/etc/postfix/ldapalias_maps.cf');
+ check_ldap_configuration('alias_maps_folder',$ldapMap);
check_ldap_configuration('alias_maps',$ldapMap);
- check_ldap_configuration('alias_maps_member',$ldapMap);
+ check_ldap_configuration('virtual_alias_maps_member',$ldapMap);
check_ldap_configuration('virtual_alias_maps',$ldapMap);
+ check_ldap_configuration('virtual_alias_domains',$ldapMap);
}
if( $MailLocalDelivery->{'Type'} eq 'local')
{
@@ -2352,14 +2354,19 @@
write_attribute($MainCf,'masquerade_classes','envelope_sender,
header_sender, header_recipient');
write_attribute($MainCf,'masquerade_exceptions','root');
write_attribute($MainCf,'mydestination','$myhostname, localhost.$mydomain,
$mydomain, ldap:/etc/postfix/ldapmydestination.cf');
- write_attribute($MainCf,'virtual_alias_maps',
'ldap:/etc/postfix/ldaplocal_recipient_maps.cf');
-
write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_maps.cf');
+ write_attribute($MainCf,'virtual_alias_maps',
'ldap:/etc/postfix/ldaplocal_recipient_maps.cf,
ldap:/etc/postfix/ldapvirtual_alias_maps_member.cf,
ldap:/etc/postfix/ldapvirtual_alias_maps.cf');
+
write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_domains.cf');
+ write_attribute($MainCf,'alias_maps','hash:/etc/aliases,
ldap:/etc/postfix/ldapalias_maps_folder.cf,
ldap:/etc/postfix/ldapalias_maps.cf');
SCR->Write('.mail.postfix.main.table',$MainCf);
SCR->Write('.mail.postfix.main',undef);
check_ldap_configuration('masquerade_domains',$ldapMap);
check_ldap_configuration('mydestination',$ldapMap);
+ check_ldap_configuration('alias_maps_folder',$ldapMap);
check_ldap_configuration('local_recipient_maps',$ldapMap);
+ check_ldap_configuration('alias_maps',$ldapMap);
check_ldap_configuration('virtual_alias_maps',$ldapMap);
+ check_ldap_configuration('virtual_alias_maps_member',$ldapMap);
+ check_ldap_configuration('virtual_alias_domains',$ldapMap);
return 1;
}

@@ -2858,17 +2865,19 @@
write_attribute($MainCf,'masquerade_exceptions','root');
write_attribute($MainCf,'content_filter','');
write_attribute($MainCf,'mydestination','$myhostname, localhost.$mydomain,
$mydomain, ldap:/etc/postfix/ldapmydestination.cf');
- write_attribute($MainCf,'virtual_alias_maps',
'ldap:/etc/postfix/ldaplocal_recipient_maps.cf');
-
write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_maps.cf');
- write_attribute($MainCf,'alias_maps','hash:/etc/aliases,
ldap:/etc/postfix/ldapalias_maps.cf,
ldap:/etc/postfix/ldapalias_maps_member.cf');
+ write_attribute($MainCf,'virtual_alias_maps',
'ldap:/etc/postfix/ldaplocal_recipient_maps.cf,
ldap:/etc/postfix/ldapvirtual_alias_maps_member.cf,
ldap:/etc/postfix/ldapvirtual_alias_maps.cf');
+
write_attribute($MainCf,'virtual_alias_domains','ldap:/etc/postfix/ldapvirtual_alias_domains.cf');
+ write_attribute($MainCf,'alias_maps','hash:/etc/aliases,
ldap:/etc/postfix/ldapalias_maps_folder.cf,
ldap:/etc/postfix/ldapalias_maps.cf');
check_ldap_configuration('transport_maps',$ldapMap);
check_ldap_configuration('smtp_tls_per_site',$ldapMap);
check_ldap_configuration('masquerade_domains',$ldapMap);
check_ldap_configuration('mydestination',$ldapMap);
check_ldap_configuration('local_recipient_maps',$ldapMap);
- check_ldap_configuration('virtual_alias_maps',$ldapMap);
+ check_ldap_configuration('alias_maps_folder',$ldapMap);
check_ldap_configuration('alias_maps',$ldapMap);
- check_ldap_configuration('alias_maps_member',$ldapMap);
+ check_ldap_configuration('virtual_alias_maps',$ldapMap);
+ check_ldap_configuration('virtual_alias_maps_member',$ldapMap);
+ check_ldap_configuration('virtual_alias_domains',$ldapMap);
SCR->Write('.mail.postfix.main.table',$MainCf);
SCR->Write('.mail.postfix.main',undef);
SCR->Write('.mail.postfix.mastercf',undef);
@@ -3013,12 +3022,14 @@
'smtp_tls_per_site' =>
'(&(objectClass=suseMailTransport)(suseMailTransportDestination=%s))',
'access' =>
'(&(objectClass=suseMailAccess)(suseMailClient=%s))',
'local_recipient_maps'=>
'(&(objectClass=suseMailRecipient)(|(suseMailAcceptAddress=%s)(uid=%s)))',
- 'alias_maps' =>
'(&(objectClass=suseMailRecipient)(cn=%s))',
- 'alias_maps_member' =>
'(&(objectClass=suseMailRecipient)(cn=%s)(suseDeliveryToMember=yes))',
+ 'alias_maps' =>
'(&(objectClass=suseMailRecipient)(|(uid=%s)(cn=%s)))',
+ 'alias_maps_folder' =>
'(&(objectClass=suseMailRecipient)(cn=%s)(suseDeliveryToFolder=yes))',
'mynetworks' =>
'(&(objectClass=suseMailMyNetworks)(suseMailClient=%s))',
'masquerade_domains' =>
'(&(objectClass=suseMailDomain)(zoneName=%s)(suseMailDomainMasquerading=yes))',
'mydestination' =>
'(&(objectClass=suseMailDomain)(zoneName=%s)(relativeDomainName=@)(!(suseMailDomainType=virtual)))',
- 'virtual_alias_maps' =>
'(&(objectClass=suseMailDomain)(zoneName=%s)(relativeDomainName=@)(suseMailDomainType=virtual))',
+ 'virtual_alias_maps_member' =>
'(&(objectClass=suseMailRecipient)(suseMailAcceptAddress=%s)(suseDeliveryToMember=yes))',
+ 'virtual_alias_maps' =>
'(&(objectclass=suseMailRecipient)(suseMailAcceptAddress=%s))',
+ 'virtual_alias_domains' =>
'(&(objectClass=suseMailDomain)(zoneName=%s)(relativeDomainName=@)(suseMailDomainType=virtual))',
'canonical_maps' =>
'(&(objectClass=suseCanonicalTable)(tableKey=%s)(valueType=both))',
'recipient_canonical_maps' =>
'(&(objectClass=suseCanonicalTable)(tableKey=%s)(valueType=recipient))',
'sender_canonical_maps' =>
'(&(objectClass=suseCanonicalTable)(tableKey=%s)(valueType=sender))'
@@ -3028,12 +3039,14 @@
'smtp_tls_per_site' => 'suseTLSPerSiteMode',
'access' => 'suseMailAction',
'local_recipient_maps'=> 'uid',
- 'alias_maps' =>
'suseMailCommand,suseMailForwardAddress',
- 'alias_maps_member' => 'uid,suseMailForwardAddress',
+ 'alias_maps' => 'suseMailForwardAddress',
+ 'alias_maps_folder' => 'suseMailCommand',
'mynetworks' => 'suseMailClient',
'masquerade_domains' => 'zoneName',
'mydestination' => 'zoneName',
- 'virtual_alias_maps' => 'zoneName',
+ 'virtual_alias_maps_member' => 'uid',
+ 'virtual_alias_maps' => 'cn',
+ 'virtual_alias_domains' => 'zoneName',
'canonical_maps' => 'tableValue',
'recipient_canonical_maps' => 'tableValue',
'sender_canonical_maps' => 'tableValue'
@@ -3044,11 +3057,13 @@
'access' => 'one',
'local_recipient_maps'=> 'one',
'alias_maps' => 'one',
- 'alias_maps_member' => 'one',
+ 'alias_maps_folder' => 'one',
'mynetworks' => 'one',
'masquerade_domains' => 'sub',
'mydestination' => 'sub',
- 'virtual_alias_maps' => 'sub',
+ 'virtual_alias_maps_member' => 'one',
+ 'virtual_alias_maps' => 'one',
+ 'virtual_alias_domains' => 'sub',
'canonical_maps' => 'one',
'recipient_canonical_maps' => 'one',
'sender_canonical_maps' => 'one'
@@ -3058,18 +3073,20 @@
'smtp_tls_per_site' => $ldapMap->{'mail_config_dn'},
'access' => $ldapMap->{'mail_config_dn'},
'local_recipient_maps'=> $ldapMap->{'user_config_dn'},
- 'alias_maps' => $ldapMap->{'group_config_dn'},
- 'alias_maps_member' => $ldapMap->{'group_config_dn'},
+ 'alias_maps' => $ldapMap->{'ldap_domain'},
+ 'alias_maps_folder' => $ldapMap->{'group_config_dn'},
'mynetworks' => $ldapMap->{'mail_config_dn'},
'masquerade_domains' => $ldapMap->{'dns_config_dn'},
'mydestination' => $ldapMap->{'dns_config_dn'},
- 'virtual_alias_maps' => $ldapMap->{'dns_config_dn'},
+ 'virtual_alias_maps_member' =>
$ldapMap->{'group_config_dn'},
+ 'virtual_alias_maps' => $ldapMap->{'group_config_dn'},
+ 'virtual_alias_domains' =>
$ldapMap->{'dns_config_dn'},
'canonical_maps' => $ldapMap->{'mail_config_dn'},
'recipient_canonical_maps' =>
$ldapMap->{'mail_config_dn'},
'sender_canonical_maps' =>
$ldapMap->{'mail_config_dn'}
);
my %special_result_attribute = (
- 'alias_maps_member' => 'member',
+ 'virtual_alias_maps_member' => 'member',
);



Modified: trunk/mail/src/suse-mailserver.schema
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/suse-mailserver.schema?rev=54357&r1=54356&r2=54357&view=diff
==============================================================================
--- trunk/mail/src/suse-mailserver.schema (original)
+++ trunk/mail/src/suse-mailserver.schema Sun Jan 4 10:08:27 2009
@@ -140,6 +140,12 @@
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{16}
SINGLE-VALUE )

+attributetype ( MailAT:22 NAME ( 'suseDeliveryToFolder' 'deliveryToFolder' )
+ DESC 'Shows if the member of the group the mails will get'
+ EQUALITY caseIgnoreMatch
+ SUBSTR caseIgnoreSubstringsMatch
+ SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{16} )
+
##
## Objectclass Section
##
@@ -147,7 +153,7 @@
DESC 'represents an entry which is able to receive mail'
MAY ( suseMailAcceptAddress $ suseMailAlias $
suseVirtualAddress $ suseMailCommand $
- suseMailForwardAddress $ suseDeliveryToMember $ suseImapQuota) )
+ suseMailForwardAddress $ suseDeliveryToMember $ suseImapQuota $
suseDeliveryToFolder ) )

objectclass ( MailOC:2 NAME ( 'suseMailDomain' 'mailDomain' ) SUP top AUXILIARY
DESC 'To configure behaviour of mail domains'

Modified: trunk/mail/users-plugin/users_plugin_mail_groups.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/users-plugin/users_plugin_mail_groups.ycp?rev=54357&r1=54356&r2=54357&view=diff
==============================================================================
--- trunk/mail/users-plugin/users_plugin_mail_groups.ycp (original)
+++ trunk/mail/users-plugin/users_plugin_mail_groups.ycp Sun Jan 4 10:08:27
2009
@@ -169,12 +169,11 @@
string what = config["what"]:"user";
string action = data["what"]:"";

- if( data["suseMailCommand"]:"" != "" ) {
- sharedfolder = true;
- }
if( data["suseDeliveryToMember"]:"no" == "yes" ) {
deliverytomember = true;
- sharedfolder = false;
+ }
+ if( data["suseDeliveryToFolder"]:"no" == "yes" ) {
+ sharedfolder = true;
}

map<string, any> tmp_data = $[];
@@ -385,13 +384,12 @@
}
// We put it everytime into the LDAP, and the ldap filter control if it is
visible
data["suseMailCommand"] = "\"|/usr/bin/formail -I \\\"From
\\\" |/usr/lib/cyrus/bin/deliver -r "+data["cn"]:""+" -a cyrus -m
"+data["cn"]:""+"\"";
-// if( (boolean) UI::QueryWidget (`id (`sharedfolder), `Value)) {
-// data["suseMailCommand"] = "\"|/usr/bin/formail -I
\\\"From \\\" |/usr/lib/cyrus/bin/deliver -r "+data["cn"]:""+" -a cyrus -m
"+data["cn"]:""+"\"";
-// } else {
-// if( data["suseMailCommand"]:"" != "" ) {
-// data = remove (data, "suseMailCommand");
-// }
-// }
+ if( (boolean) UI::QueryWidget (`id (`sharedfolder), `Value)) {
+ data["suseDeliveryToFolder"] = "yes";
+ } else {
+ data["suseDeliveryToFolder"] = "no";
+ }
+
string err = UsersPluginMail::Check ( config,
(map<string,any>) union (data, tmp_data));

if (err != "")

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages