postmap /etc/postfix/header_checks
postmap: warning: /etc/postfix/header_checks, line 2: record is in “key: value” format; is this an alias file?
postmap: warning: /etc/postfix/header_checks, line 3: expected format: key whitespace value
This error is coming from having a space after your From: in regex. It should rather look like this:
/^From:.*ip\.linodeusercontent\.com/ REJECT
I would also removed if endif block, as it is simply unnecessary, and be careful you cannot indent content inside of if endif block (check on that too). Moreover, I haven’t seen anyone using capital letters for If and Endif but that shouldn’t be a problem.
But it does not work.
and with postmap I’ll get
You don’t need to use postmap on files with PCRE. Simply restart Postfix.
Additionally double check that the package postfix-pcre is installed (it’s nearly impossible to have it not installed but just in case).