Erzeugt bei intern gerouteten E-Mails in etwa das Verhalten der Option „Sign all outgoing mails if S/MIME certificate available“ (Outgoing) in Verbindung mit „Remove signature if S/MIME signature check succeeds“ (Incoming).
Zeile |
Code |
---|---|
01 |
# Begin: Custom commands for incoming e-mails BEFORE decryption |
02 |
log(1,'Begin: Custom commands for incoming e-mails BEFORE decryption'); |
|
|
03 |
# Begin: Tag all internally routed e-mails as SIGNED |
04 |
log(1,'Begin: Tag all internally routed e-mails as SIGNED'); |
|
|
05 |
if (from_managed_domain()) { |
06 |
log(1,'E-mail is from managed domain...'); |
07 |
if (!compareattr('connect_from', 'equal', '127.0.0.1')) { |
08 |
log(1,'...not form localhost...'); |
09 |
if (check_sender(false, false, true)) { |
10 |
log(1,'...but is not allowed to relay, dropping'); |
11 |
drop('554' '5.7.1 Relay access denied'); |
12 |
} else { |
13 |
log(1,'...and is allowed to relay, tag as SIGNED'); |
14 |
@TAGSIGNED@ |
15 |
} |
16 |
} else { |
17 |
log(1,'...but generated on localhost, going on in standard ruleset'); |
18 |
} |
19 |
} |
|
|
20 |
log(1,'End: Tag all internally routed e-mails as SIGNED'); |
21 |
# End: Tag all internally routed e-mails as SIGNED |
|
|
22 |
log(1,'End: Custom commands for incoming e-mails BEFORE decryption'); |
23 |
# End: Custom commands for incoming e-mails BEFORE decryption |