0

I'm using postfix on this system, and there are four cameras attached. These cameras when sending email don't include a "from" address, and they are rejected by gsuite because of that. I've seen the rewrite rules etc, but they don't cover the situation where the from address doesn't exist. What's the best way to add a from address based on the source IP address to the email in postfix?

stratvox
  • 1
  • 1
  • Have you reviewed whether the `always_add_missing_headers` flag is already sufficient on its own? – anx Jan 07 '21 at 02:52
  • Hi anx! Nope, it doesn't seem to do what it needs to do. I have added it to main.cf but it still doesn't appear to be adding anything... I suspect that's because the camera is including a "from:" header but is leaving it empty. – stratvox Jan 07 '21 at 21:15

1 Answers1

0

I found that this answer had the info I needed: Forcing the from address when postfix relays over smtp

I had to make some small changes to the regex I use in this particular case (the empty From header is literally from: ) but otherwise allowed me to get what I needed so I could get the mail out the door.

Thanks for your help anx!

stratvox
  • 1
  • 1