projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
38606ef
)
make postfix export commands configrable
author
ivan
<ivan>
Mon, 10 May 2004 11:10:58 +0000
(11:10 +0000)
committer
ivan
<ivan>
Mon, 10 May 2004 11:10:58 +0000
(11:10 +0000)
FS/FS/part_export/postfix.pm
patch
|
blob
|
history
bin/postfix.export
patch
|
blob
|
history
diff --git
a/FS/FS/part_export/postfix.pm
b/FS/FS/part_export/postfix.pm
index
c24cf19
..
4fd19ee
100644
(file)
--- a/
FS/FS/part_export/postfix.pm
+++ b/
FS/FS/part_export/postfix.pm
@@
-11,6
+11,11
@@
tie my %options, 'Tie::IxHash',
'aliases' => { label=>'aliases file location', default=>'/etc/aliases' },
'virtual' => { label=>'virtual file location', default=>'/etc/postfix/virtual' },
'mydomain' => { label=>'local domain', default=>'' },
'aliases' => { label=>'aliases file location', default=>'/etc/aliases' },
'virtual' => { label=>'virtual file location', default=>'/etc/postfix/virtual' },
'mydomain' => { label=>'local domain', default=>'' },
+ 'newaliases' => { label=>'newaliases command', default=>'newaliases' },
+ 'postmap' => { label=>'postmap command',
+ default=>'postmap hash:/etc/postfix/virtual', },
+ 'reload' => { label=>'reload command',
+ default=>'postfix reload' },
;
%info = (
;
%info = (
diff --git
a/bin/postfix.export
b/bin/postfix.export
index
64d9738
..
dbb08ce
100755
(executable)
--- a/
bin/postfix.export
+++ b/
bin/postfix.export
@@
-99,7
+99,7
@@
foreach my $export ( @exports ) {
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
- ssh("$user\@$machine",
"newaliases"
);
+ ssh("$user\@$machine",
$export->option('newaliases') || 'newaliases'
);
# ssh("$user\@$machine", "postfix reload");
$rsync->exec( {
# ssh("$user\@$machine", "postfix reload");
$rsync->exec( {
@@
-107,8
+107,9
@@
foreach my $export ( @exports ) {
dest => "$user\@$machine:". $export->option('virtual'),
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
dest => "$user\@$machine:". $export->option('virtual'),
} ) or die "rsync to $machine failed: ". join(" / ", $rsync->err);
# warn $rsync->out;
- ssh("$user\@$machine", "postmap hash:/etc/postfix/virtual");
- ssh("$user\@$machine", "postfix reload");
+ ssh("$user\@$machine", $export->option('postmap')
+ || 'postmap hash:/etc/postfix/virtual');
+ ssh("$user\@$machine", $export->option('reload') || 'postfix reload');
}
}