Skip to content

Commit e4e1a9f

Browse files
committed
Fix grep exim fix
1 parent faa0985 commit e4e1a9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

install/upgrade/versions/1.8.0.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ if [ "$MAIL_SYSTEM" = "exim4" ]; then
268268
exim_version=$(exim4 --version | head -1 | awk '{print $3}' | cut -f -2 -d .)
269269
# if Exim version > 4.95 or greater!
270270
if version_ge "$exim_version" "4.95"; then
271-
if [ -z "$(grep -e 'condition = \${lookup{\$local_part@\$domain}lsearch{/etc/exim4/domains/\${lookup{\$domain}dsearch{/etc/exim4/domains/}}/aliases}{false}{true}}' /etc/exim4/exim4.conf.template)" ]; then
271+
if ! grep -q 'condition = ${lookup{$local_part@$domain}lsearch{/etc/exim4/domains/${lookup{$domain}dsearch{/etc/exim4/domains/}}/aliases}{false}{true}}' /etc/exim4/exim4.conf.template; then
272272
for line in $(sed -n '/redirect_router = dnslookup/=' /etc/exim4/exim4.conf.template); do
273273
testline=$((line - 1))
274274
newline=$((line + 1))
@@ -279,4 +279,5 @@ if [ "$MAIL_SYSTEM" = "exim4" ]; then
279279
done
280280
fi
281281
fi
282+
282283
fi

0 commit comments

Comments
 (0)