Relay VM email from one email to another before it's sent

We want to have someone on-call after hours, but that person changes. What I want to do is check who is on-call (1st/3rd weekend is person A, 2nd/4th weekend is person B), etc. What I need to know is how to use the mailcmd in voicemail.conf to parse the email info and send it to the right person. If there’s a better way of doing this, I’m all ears :smile:

1.4.x on Fedora C9.

Thanks.

(edited the subject to match the solution)

Resolved this by using postfix’s remapping through ‘generic’. Essentially, you put in an email address of the person Asterisk is sending it to, then the address you want it to go to.

8005551212@txt.att.net

This would relay email to operator@example.com to my phone, if my number was 8005551212.

Here’s the line for main.cf:

smtp_generic_maps = hash:/etc/postfix/generic

After you edit the generic file, you need to hash it with:

postmap generic

That’s it. Works for me.