Is there a way to prepend to every email in Linux?

0

I want to set up my SMTP server so that every email I send has the same tag [TAG]at the beginning of the subject. Is there any way of achieving this?

drum

Posted 2014-12-04T17:26:08.317

Reputation: 567

Answers

1

You can do this using postfix header checks.

#/etc/postfix/main.cf
header_checks = pcre:/etc/postfix/header_checks.pcre

#/etc/postfix/header_checks.pcre
/^Subject: (.+)$/    REPLACE Subject: [TAG] $1

See header_checks for more info. Hope that helps.

clement

Posted 2014-12-04T17:26:08.317

Reputation: 591