-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
condition.define_envelope_stopper do |context, envelope| #56
Comments
Thanks for your suggestion! Your define_applicable_condition("envelope-stopper") do |condition|
condition.define_envelope_from_stopper do |context, from|
context.mail_transaction_shelf["from"] = from
context.mail_transaction_shelf["recipients"] = []
false
end
condition.define_envelope_recipient_stopper do |context, recipient|
context.mail_transaction_shelf["recipients"] += [recipient]
false
end
condition.define_data_stopper do |context|
p context.mail_transaction_shelf["from"] # => MAIL FROM address
p context.mail_transaction_shelf["recipients"] # => RCPT TO addresses
false
end
end Saving MAIL FROM and RCPT TO addresses all time will decrease performance a bit. So I don't want to enable it by default... And if a child milter skips MAIL FROM and/or RCPT TO events, we can't provide the feature. It may confuse users. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.
This is not a bug, but a request of a new feature about conditions.
Now milter manager use envelope from OR recipients to apply a condition ("condition.define_envelope_recipient_stopper do |context, recipient|" and "condition.define_envelope_from_stopper do |context, from|").
It should be useful a condition that apply on recipients or from, such as:
condition.define_envelope_stopper do |context, envelope|
where "envelope" is the joint of mail from and rcpt to addresses.
This could be useful in milters where the application depends on recipients or sender without difference.
Thank you very much
The text was updated successfully, but these errors were encountered: