116 fd = open_read(
"control/mailfromrules");
121 fdtemp = open_trunc(
"control/mailfromrules.tmp");
129 x = line.s; len = line.len;
132 if (x[0] ==
'#')
continue;
133 if (x[0] ==
'\n')
continue;
137 if (ch !=
'\n')
if (ch !=
' ')
if (ch !=
'\t')
break;
142 amper = byte_chr(x,len,
'&');
143 if (!amper) die_parse();
144 if (amper)
if (amper == len || amper < 2) die_parse();
149 x = line.s + amper + 1; len = line.len - amper - 1;
152 if (len < 3) die_parse();
153 if ( *x ==
',' || *x ==
' ' || *x ==
'\t') die_parse();
154 i = byte_chr(x,len,
',');
155 if (i > 0 && i < len) {
158 x += i + 1; len -= i + 1; }
170 if (
rename(
"control/mailfromrules.tmp",
"control/mailfromrules.cdb") == -1)
171 logmsg(
WHO,111,ERROR,
"unable to move control/mailfromrules.tmp to control/mailfromrules.cdb");