Accessing mail body on postfix check_policy_service event
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I followed postfix documentation to set up a script that I can use to write custom filters on incoming mail on the check_policy_service
event and it works just fine, but I cannot access the email body - only the following parameters from STDIN:
Array
(
[request] => smtpd_access_policy
[protocol_state] => RCPT
[protocol_name] => ESMTP
[client_address] => 208.40.44.179
[client_name] => smtprelay0179.hostedemail.com
[client_port] => 59713
[reverse_client_name] => smtprelay0179.hostedemail.com
[helo_name] => smtprelay.hostedemail.com
[sender] => john@doe.net
[recipient] => mary@doe.com
[recipient_count] => 0
[queue_id] =>
[instance] => 27c5.5bccec9c.5f5b9.0
[size] => 1905
[etrn_domain] =>
[stress] =>
[sasl_method] =>
[sasl_username] =>
[sasl_sender] =>
[ccert_subject] =>
[ccert_issuer] =>
[ccert_fingerprint] =>
[ccert_pubkey_fingerprint] =>
[encryption_protocol] => TLSv1.2
[encryption_cipher] => AECDH-AES256-SHA
[encryption_keysize] => 256
[policy_context] =>
)
How can I access the raw email (headers and body) so that my filtering can optionally depend on that as well?
email postfix
add a comment |Â
up vote
1
down vote
favorite
I followed postfix documentation to set up a script that I can use to write custom filters on incoming mail on the check_policy_service
event and it works just fine, but I cannot access the email body - only the following parameters from STDIN:
Array
(
[request] => smtpd_access_policy
[protocol_state] => RCPT
[protocol_name] => ESMTP
[client_address] => 208.40.44.179
[client_name] => smtprelay0179.hostedemail.com
[client_port] => 59713
[reverse_client_name] => smtprelay0179.hostedemail.com
[helo_name] => smtprelay.hostedemail.com
[sender] => john@doe.net
[recipient] => mary@doe.com
[recipient_count] => 0
[queue_id] =>
[instance] => 27c5.5bccec9c.5f5b9.0
[size] => 1905
[etrn_domain] =>
[stress] =>
[sasl_method] =>
[sasl_username] =>
[sasl_sender] =>
[ccert_subject] =>
[ccert_issuer] =>
[ccert_fingerprint] =>
[ccert_pubkey_fingerprint] =>
[encryption_protocol] => TLSv1.2
[encryption_cipher] => AECDH-AES256-SHA
[encryption_keysize] => 256
[policy_context] =>
)
How can I access the raw email (headers and body) so that my filtering can optionally depend on that as well?
email postfix
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I followed postfix documentation to set up a script that I can use to write custom filters on incoming mail on the check_policy_service
event and it works just fine, but I cannot access the email body - only the following parameters from STDIN:
Array
(
[request] => smtpd_access_policy
[protocol_state] => RCPT
[protocol_name] => ESMTP
[client_address] => 208.40.44.179
[client_name] => smtprelay0179.hostedemail.com
[client_port] => 59713
[reverse_client_name] => smtprelay0179.hostedemail.com
[helo_name] => smtprelay.hostedemail.com
[sender] => john@doe.net
[recipient] => mary@doe.com
[recipient_count] => 0
[queue_id] =>
[instance] => 27c5.5bccec9c.5f5b9.0
[size] => 1905
[etrn_domain] =>
[stress] =>
[sasl_method] =>
[sasl_username] =>
[sasl_sender] =>
[ccert_subject] =>
[ccert_issuer] =>
[ccert_fingerprint] =>
[ccert_pubkey_fingerprint] =>
[encryption_protocol] => TLSv1.2
[encryption_cipher] => AECDH-AES256-SHA
[encryption_keysize] => 256
[policy_context] =>
)
How can I access the raw email (headers and body) so that my filtering can optionally depend on that as well?
email postfix
I followed postfix documentation to set up a script that I can use to write custom filters on incoming mail on the check_policy_service
event and it works just fine, but I cannot access the email body - only the following parameters from STDIN:
Array
(
[request] => smtpd_access_policy
[protocol_state] => RCPT
[protocol_name] => ESMTP
[client_address] => 208.40.44.179
[client_name] => smtprelay0179.hostedemail.com
[client_port] => 59713
[reverse_client_name] => smtprelay0179.hostedemail.com
[helo_name] => smtprelay.hostedemail.com
[sender] => john@doe.net
[recipient] => mary@doe.com
[recipient_count] => 0
[queue_id] =>
[instance] => 27c5.5bccec9c.5f5b9.0
[size] => 1905
[etrn_domain] =>
[stress] =>
[sasl_method] =>
[sasl_username] =>
[sasl_sender] =>
[ccert_subject] =>
[ccert_issuer] =>
[ccert_fingerprint] =>
[ccert_pubkey_fingerprint] =>
[encryption_protocol] => TLSv1.2
[encryption_cipher] => AECDH-AES256-SHA
[encryption_keysize] => 256
[policy_context] =>
)
How can I access the raw email (headers and body) so that my filtering can optionally depend on that as well?
email postfix
email postfix
asked 1 hour ago
TheStoryCoder
1336
1336
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
Access policy delegation doesn't transmit the message body. You'll need to create a milter instead, if you need access to the message body.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Access policy delegation doesn't transmit the message body. You'll need to create a milter instead, if you need access to the message body.
add a comment |Â
up vote
2
down vote
Access policy delegation doesn't transmit the message body. You'll need to create a milter instead, if you need access to the message body.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Access policy delegation doesn't transmit the message body. You'll need to create a milter instead, if you need access to the message body.
Access policy delegation doesn't transmit the message body. You'll need to create a milter instead, if you need access to the message body.
answered 16 mins ago
Michael Hamptonâ¦
158k26295597
158k26295597
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f936548%2faccessing-mail-body-on-postfix-check-policy-service-event%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password