/[smeserver]/rpms/e-smith-qmail/sme7/e-smith-qmail-1.10.0-MailRouting.patch
ViewVC logotype

Contents of /rpms/e-smith-qmail/sme7/e-smith-qmail-1.10.0-MailRouting.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Tue Oct 7 19:15:56 2008 UTC (16 years ago) by slords
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
New streams

1 diff -Nur -x '*.orig' -x '*.rej' e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/smtproutes/10delegateMailServer mezzanine_patched_e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/smtproutes/10delegateMailServer
2 --- e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/smtproutes/10delegateMailServer 2006-01-11 18:04:56.000000000 +1100
3 +++ mezzanine_patched_e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/smtproutes/10delegateMailServer 2006-05-10 17:46:33.950740208 +1000
4 @@ -1,20 +1,17 @@
5 {
6 $OUT = "";
7
8 - #--------------------------------------------------
9 - # First check for delegate mail server
10 - #--------------------------------------------------
11 + use esmith::DomainsDB;
12 + my $ddb = esmith::DomainsDB->open_ro();
13
14 - if ($DelegateMailServer && ($DelegateMailServer !~ /^\s*$/))
15 + for my $domain ( $ddb->domains )
16 {
17 - $OUT .= "$DomainName:[$DelegateMailServer]\n";
18 + my $mail_server = $domain->prop('MailServer')
19 + || $DelegateMailServer
20 + || 'localhost';
21
22 - use esmith::DomainsDB;
23 - my $ddb = esmith::DomainsDB->open_ro();
24 + next if ( $mail_server eq 'localhost' );
25
26 - foreach $domain ( $ddb->domains )
27 - {
28 - $OUT .= $domain->key . ":[$DelegateMailServer]\n";
29 - }
30 + $OUT .= $domain->key . ":[$mail_server]\n";
31 }
32 }
33 diff -Nur -x '*.orig' -x '*.rej' e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/virtualdomains/80localdomains mezzanine_patched_e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/virtualdomains/80localdomains
34 --- e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/virtualdomains/80localdomains 2006-05-10 17:47:45.834404377 +1000
35 +++ mezzanine_patched_e-smith-qmail-1.10.0/root/etc/e-smith/templates/var/qmail/control/virtualdomains/80localdomains 2006-05-10 17:47:29.066282086 +1000
36 @@ -1,19 +1,19 @@
37 {
38 - my $dms = $DelegateMailServer;
39 -
40 - return "# DelegateMailServer is set" if ($dms && ($dms !~ /^\s*$/));
41 -
42 - # All virtual domains will be delivered locally according to the
43 - # instructions in /var/qmail/alias/.qmail-localdelivery-default.
44 + $OUT = '';
45
46 my $local_handler = "alias-localdelivery";
47
48 use esmith::DomainsDB;
49 - my $domainsdb = esmith::DomainsDB->open;
50 + my $domainsdb = esmith::DomainsDB->open_ro();
51
52 - # Handle each defined virtual domain
53 - foreach my $domain ($domainsdb->get_all_by_prop(type => "domain"))
54 + for my $domain ($domainsdb->domains)
55 {
56 + my $mail_server = $domain->prop('MailServer')
57 + || $DelegateMailServer
58 + || 'localhost';
59 +
60 + next if ( $mail_server ne 'localhost' );
61 +
62 $domain = $domain->key;
63 $OUT .= "$domain:$local_handler\n";
64 }

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed