reopen 293348
# Can I do this?
thanks

Hey! Now you broke *my* configuration! ;-)

I have tabs, not spaces, after the protocols. Hence I want to change
"^ *([0-9.]+:)?(pop3s?|imaps?) .*dovecot"
to
"^ *([0-9.]+:)?(pop3s?|imaps?).*dovecot"
or
"^ *([0-9.]+:)?(pop3s?|imaps?)[[:space:]].*dovecot"
or, since inetd (at least openbsd-inetd) allows IPv6 addresses (within []) as well as hostnames and the * wildcard, even
"^ *(([[:alnum:].-]+|\[[[:xdigit:]:]+]|*):)?(pop3s?|imaps?)[[:space:]].*dovecot"
or, somewhat relaxed,
"^ *(([^][:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[[:space:]].*dovecot"
.


Ideally, I think dovecot shouldn't be started if there is any conflict between inetd.conf and dovecot.conf, regardless of which server runs from inetd (since dovecot would fail in that case).

I believe it can be done with:

for p in \
 `sed -r "s/^ *(([^:]+|\[[^]]+]|\*):)?(pop3s?|imaps?)[ \t].*/\3/;t;d" \
         /etc/inetd.conf`
  do
  for q in \
   `sed -r "s/^ *protocols[ \t]*=[ \t]*(([^\"]*)|\"(.*)\")/\2\3/;t;d" \
           /etc/dovecot/dovecot.conf`
  do
    if [ $p = $q ]; then
      exit 0
    fi
  done
done

Regexes! You gotta love 'em!

--
Magnus Holmgren
[EMAIL PROTECTED]


-- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Reply via email to