summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2012-07-09 15:28:36 +0000
committerTed Trask <ttrask01@yahoo.com>2012-07-09 15:28:36 +0000
commit00c709249d9fea0c08684f653064c729baea3876 (patch)
tree298b90bf9787107e04e3f899bfc14db3ee22e2a6
parent17b82b3f00676537c7268ad8f3112ce78630794c (diff)
downloadacf-fetchmail-00c709249d9fea0c08684f653064c729baea3876.tar.bz2
acf-fetchmail-00c709249d9fea0c08684f653064c729baea3876.tar.xz
Fix bug when postmaster is not set
-rw-r--r--fetchmail-model.lua6
1 files changed, 5 insertions, 1 deletions
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