Is this a reliable circuit to monitor AC mains voltage?
For reference and to protect against future edits, here is your circuit that will be discussed:



The basic idea is OK, but there are some things to consider:

Powering the opamp from the same signal you are trying to measure is asking for trouble.

I don't like how this circuit looks at peaks instead of more a average.  Ideally you probably want RMS, but that's difficult to do.  You know the voltage is mostly a sine, so the average tells you what you need to know.

The problem with grabbing peaks is that it's quite susceptible to noise.  You're only getting information from the waveform at two points each cycle.  This means you have little opportunity to filter out noise.

Worse yet, the susceptibility to noise is non-linear.  One positive glitch at a peak will make the measurement read high for quite a while.  A single negative glitch at a peak will go largely unnoticed.

Put a resistor before the capacitor so that you get low pass filtered absolute value, not recent max peaks.

You may not need a opamp or comparator at all.  If the output of OP07 is going into a microcontroller, then you might as well feed the filtered and clipped analog signal to the micro directly instead.  The micro can trivially compare the result to some threshold in firmware.  Then changing the threshold is a firmware change, not a hardware change.