Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54384 - /trunk/mail/src/YaPI/MailServer.pm
  • From: varkoly@xxxxxxxxxxxxxxxx
  • Date: Tue, 06 Jan 2009 07:53:55 -0000
  • Message-id: <E1LK6l9-0000a2-Ot@xxxxxxxxxxxxxxxx>
Author: varkoly
Date: Tue Jan 6 08:53:55 2009
New Revision: 54384

URL: http://svn.opensuse.org/viewcvs/yast?rev=54384&view=rev
Log:
add MX and NS records to the zone entry, for better co-operation with
yast2-dns-server

Modified:
trunk/mail/src/YaPI/MailServer.pm

Modified: trunk/mail/src/YaPI/MailServer.pm
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/mail/src/YaPI/MailServer.pm?rev=54384&r1=54383&r2=54384&view=diff
==============================================================================
--- trunk/mail/src/YaPI/MailServer.pm (original)
+++ trunk/mail/src/YaPI/MailServer.pm Tue Jan 6 08:53:55 2009
@@ -1374,36 +1374,37 @@
description => "activating the virus scanner
failed: $err");
}
# This is only for systems updated from SLES10
- my $smtps = SCR->Execute('.mail.postfix.mastercf.findService',
- { 'service' => 'smtps', 'command' => 'smtpd'
});
- if( ref($smtps) eq 'ARRAY' && defined $smtps->[0]->{options} )
- {
- my $opts = $smtps->[0]->{options};
- if ( defined $opts->{'content_filter'} )
- {
- delete $opts->{'content_filter'};
- SCR->Execute('.mail.postfix.mastercf.modifyService',
- { 'service' => 'smtps',
- 'command' => 'smtpd',
- 'maxproc' => '-',
- 'options' => $opts } );
- }
- }
- my $smtp = SCR->Execute('.mail.postfix.mastercf.findService',
- { 'service' => 'smtp', 'command' => 'smtpd' });
- if( ref($smtp) eq 'ARRAY' && defined $smtp->[0]->{options} )
- {
- my $opts = $smtp->[0]->{options};
- if ( defined $opts->{'content_filter'} )
- {
- delete $opts->{'content_filter'};
- SCR->Execute('.mail.postfix.mastercf.modifyService',
- { 'service' => 'smtp',
- 'command' => 'smtpd',
- 'maxproc' => '-',
- 'options' => $opts } );
- }
- }
+ my $smtps = SCR->Execute('.mail.postfix.mastercf.findService',
+ { 'service' => 'smtps', 'command' =>
'smtpd' });
+ if( ref($smtps) eq 'ARRAY' && defined $smtps->[0]->{options} )
+ {
+ my $opts = $smtps->[0]->{options};
+ if ( defined $opts->{'content_filter'} )
+ {
+ delete $opts->{'content_filter'};
+ SCR->Execute('.mail.postfix.mastercf.modifyService',
+ { 'service' => 'smtps',
+ 'command' => 'smtpd',
+ 'maxproc' => '-',
+ 'options' => $opts } );
+ }
+ }
+ my $smtp = SCR->Execute('.mail.postfix.mastercf.findService',
+ { 'service' => 'smtp', 'command' =>
'smtpd' });
+ if( ref($smtp) eq 'ARRAY' && defined $smtp->[0]->{options} )
+ {
+ my $opts = $smtp->[0]->{options};
+ if ( defined $opts->{'content_filter'} )
+ {
+ delete $opts->{'content_filter'};
+ SCR->Execute('.mail.postfix.mastercf.modifyService',
+ { 'service' => 'smtp',
+ 'command' => 'smtpd',
+ 'maxproc' => '-',
+ 'options' => $opts } );
+ }
+ }
+ # End This is only for systems updated from SLES10
if( SCR->Execute('.mail.postfix.mastercf.findService',
{ 'service' => 'localhost:10025', 'command' => 'smtpd' }))
{
@@ -1416,7 +1417,6 @@
SCR->Execute('.mail.postfix.mastercf.deleteService',
{ 'service' => 'amavis', 'command' => 'lmtp' });
}
- # End This is only for systems updated from SLES10
# create smtpd pocess for getting back the emails
SCR->Execute('.mail.postfix.mastercf.addService',
{ 'service' => 'amavis',
@@ -2365,25 +2365,27 @@
}
else
{
- # This is a new domain, we create it.
- # We create all the DNS attributes. `hostname -f` is the NS entry.
- my $serial = POSIX::strftime("%Y%m%d%H%M",localtime);
- my $host = `hostname -f`; chomp $host;
- my $tmp = { 'Objectclass' => [
'dNSZone','suseMailDomain' ],
- 'zoneName' => $name,
- 'suseMailDomainType' => $type,
- 'suseMailDomainMasquerading' => $masquerading,
+ # This is a new domain, we create it.
+ # We create all the DNS attributes. `hostname -f` is the NS and
MX entry.
+ my $serial = POSIX::strftime("%Y%m%d%H%M",localtime);
+ my $host = `hostname -f`; chomp $host;
+ my $tmp = { 'Objectclass' => [
'dNSZone','suseMailDomain' ],
+ 'zoneName' => $name,
+ 'suseMailDomainType' => $type,
+ 'suseMailDomainMasquerading' => $masquerading,
'relativeDomainName' => '@',
'dNSClass' => 'IN',
'dNSTTL' => '86400',
+ 'nSRecord' => $host.'.',
+ 'mXRecord' => '40 '.$host.'.',
'sOARecord' => $host.'.
root.'.$host.'. '.$serial.' 10800 3600 302400 43200'
- };
- if(! SCR->Write('.ldap.add',{ "dn" => $DN } ,$tmp)){
- my $ldapERR = SCR->Read(".ldap.error");
- return $self->SetError(summary => "LDAP add failed",
- code => "SCR_WRITE_FAILED",
- description => $ldapERR->{'code'}." :
".$ldapERR->{'msg'});
- }
+ };
+ if(! SCR->Write('.ldap.add',{ "dn" => $DN } ,$tmp)){
+ my $ldapERR = SCR->Read(".ldap.error");
+ return $self->SetError(summary => "LDAP add failed",
+ code => "SCR_WRITE_FAILED",
+ description => $ldapERR->{'code'}."
: ".$ldapERR->{'msg'});
+ }
}
}


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

< Previous Next >
This Thread
  • No further messages