[Kolab-devel] [issue1550] Masquerade problem
Jørgen H. Fjeld
kolab-issues at intevation.de
Wed Jan 3 11:14:45 CET 2007
New submission from =?iso-8859-1?q?J=F8rgen_H=2E?= Fjeld <jhf at linpro.no>:
The current postfix setup uses:
masquerade_domains = $mydomain
and this does not preserve the sender address for multi-domain setups.
One might think that:
masquerade_domains = @@@postfix-mydestination|join( )@@@
would be a solution. This is not entirely the case, as the order of the domains
matters.
Say that the server hosts domain.org and sub.domain.org, which gives us
masquerade_domains = domain.org sub.domain.org
now email from john at sub.domain.org is masqueraded as john at domain.org
However, if we change the order:
masquerade_domains = sub.domain.org domain.org
john at sub.domain.org is not masqueraded.
I suggest that you at least use
masquerade_domains = @@@postfix-mydestination|join( )@@@
and consider sorting the list by length, making the shortest domain appear
last.
I patch of the following kind could fix this:
########## Begin patch
Index: perl-kolab/Kolab-Conf/Conf.pm.in
===================================================================
RCS
file: /home/kroupware/jail/kolabrepository/server/perl-kolab/Kolab-Conf/Conf.pm.in,v
retrieving revision 1.9
diff -c -r1.9 Conf.pm.in
*** perl-kolab/Kolab-Conf/Conf.pm.in 4 Dec 2006 13:31:48 -0000 1.9
--- perl-kolab/Kolab-Conf/Conf.pm.in 3 Jan 2007 10:10:59 -0000
***************
*** 279,287 ****
SWITCH: {
# Join function
$fct eq 'join' && do {
! $val = join $args, (ref $Kolab::config{$attr} eq "ARRAY")
! ?@{$Kolab::config{$attr}}
! :($Kolab::config{$attr});
last SWITCH;
};
# Quote function
--- 279,291 ----
SWITCH: {
# Join function
$fct eq 'join' && do {
! if (ref $Kolab::config{$attr} eq "ARRAY") {
! my @vals = @{$Kolab::config{$attr}} ;
! my @length_sorted_vals = sort {length $a < length
$b} @vals;
! $val = join ($args, @length_sorted_vals) ;
! } else {
! $val = $Kolab::config{$attr};
! }
last SWITCH;
};
# Quote function
########## End patch
Testing reveals that this patch does now work as expected yet, please look
through the code for logical mistakes.
----------
messages: 9212
nosy: jhf
status: unread
title: Masquerade problem
________________________________________________
Kolab issue tracker <kolab-issues at intevation.de>
<https://intevation.de/roundup/kolab/issue1550>
________________________________________________
More information about the devel
mailing list