> On Sep 9, 2018, at 8:38 PM, Wietse Venema <wie...@porcupine.org> wrote:
>
> smtpd_client_restrictions =
> check_client_access cidr:/etc/postfix/client_access.cidr
>
> /etc/postfix/client_access.cidr
> # An "internal" source.
> 127.0.0.0/8 dunno
> 192.168.0.0/16 dunno
> # Everyone else.
> 0.0.0.0/0 prepend WARNING: This email originated outside of our
> organization. Do not click any links or open any attachments
> unless you recognize the sender and know the content is safe.
>
> I suppose lawyers love this. Otherwise I think it is useless.
Indeed, and the OP probably wanted to prepend message body content,
not a "WARNING:" header.
What I see much more often is organizations prepending "[EXTERNAL]"
to the subject lines of messages arriving from outside.
main.cf:
pcre = pcre:${config_directory}/
header_checks = ${pcre}header-checks.pcre
mime_header_checks = ... season to taste ...
nested_header_checks = ... typically best empty ...
header-checks.pcre:
if /^Subject:/
# Subject checks go here
/:(.*)/ REPLACE Subject: [EXTERNAL]$1
/^/ OK
endif
# Non-subject tests below
...
--
Viktor.