From 00c709249d9fea0c08684f653064c729baea3876 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Mon, 9 Jul 2012 15:28:36 +0000 Subject: Fix bug when postmaster is not set --- fetchmail-model.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fetchmail-model.lua') diff --git a/fetchmail-model.lua b/fetchmail-model.lua index e8aff0a..0ab4a3d 100644 --- a/fetchmail-model.lua +++ b/fetchmail-model.lua @@ -460,7 +460,11 @@ function updateconfig(self, conf) for line in string.gmatch(file, "([^\n]*\n?)") do if not foundpostmaster and string.match(line, "^%s*set%s+postmaster%s") then foundpostmaster = true - line = "set postmaster "..conf.value.postmaster.value.."\n" + if conf.value.postmaster.value ~= "" then + line = "set postmaster "..conf.value.postmaster.value.."\n" + else + line = nil + end elseif not foundbounceerrors and string.match(line, "^%s*set%s+no%s+bouncemail%s") then foundbounceerrors = true if conf.value.bounceerrors.value then -- cgit v1.2.3