I'm on your side @curtainsy. I've been both the woman on maternity leave who received regular print outs of the internal vacancy list posted to my home address during my 12 months away from the office and the HR Adviser responsible for organising this for women on maternity leave. Granted; my most recent experience of these was around 10 years ago, but I totally agree that this was absolutely the law at the time, so unless it has changed dramatically in the meantime; YANBU and your employer certainly is!
In the first instance, I would set up a formal meeting with HR to discuss 'a possible case of sex discrimination' and see if you can get your hands on the Maternity Policy which outlines that they are obliged to inform you of vacancies during your Maternity Leave and most importantly; the Job Description and Person Specification (JD & PS) for the role you missed out on applying for.
In advance of the meeting, ensure that your CV is up to date and as relevant to the JD &PS as you can make it and go through the JD & PS marking which criteria you meet and how, making notes of relevant experience, as if you were putting together an application for the role. At the meeting, you need to tell them of your expectation that you would be kept informed of vacancies during your leave and point out where this is detailed in their own policy. You then go on to let them know that it has come to your attention that they have failed to inform you of X vacancy and that this is in breach of their policy, the law and equals discrimination on the grounds of sex (as this could not happen to a man as he could not be on Maternity Leave and therefore the policy would never apply to them).
Once they are on the back foot, you can explain that it's particularly troubling to you in this case as, given the opportunity, you would certainly have applied for the role and having studied the JD & PS (wave your annotated copy and CV under their noses), you feel strongly that you would have almost certainly have secured an interview and would have stood an excellent chance of securing the role, based on your skills and experience. Then you can say that you're sure they have plenty to discuss, so you'll leave that with them and you will look forward to their written response within 5 working days.
You should also familiarise yourself with the organisation's Grievance Policy, in case they don't take you seriously, or try to brush you off. In which case, you will need to raise an official Grievance and follow their process.
It's worth deciding before you meet with HR exactly what it is you want from this. Do you want to be offered the same job and work alongside the man who was originally offered the role? Do you simply want to make sure that they do as they are supposed to do and keep women on Mat leave informed as per their policy, ensuring that this situation doesn't happen to anyone else in the future? Do you want the salary increase that would have come with the role, but you're happy to stay doing what you're doing until a vacancy doing the new role arises and you can apply for it? Do you just want an apology? Do you want someone to lose their job over this/receive additional anti-discrimination training? There are so many possible outcomes, you just need to think about what's most important to you.
Be prepared for a bit of a fight, but go into this knowing that you are in the right and there is a case for them to answer. If you're not in a Union, it might be worth joining one or at least getting in touch with ACAS, as they can help you find someone suitable to come along to meetings with you if you want some extra support, or help you find a decent Employment Law Solicitor (if it comes to that).
Really good luck OP
, it's disgusting to think that in 2019 a woman can be excluded from progressing in her career because she has given birth to a child in the last 12 months.