per user regex/domain issues

Bug #1672541 reported by Scott Kitterman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SPF Engine
Triaged
Medium
Unassigned

Bug Description

The policyd-spf.peruser.5 man page mentions regexp for user matching.
"
       In addition to specifying individual users, regular expression matching
       is also available, but may have performance implications since the
       entire user table has to be traversed for each message recipient.
"

However, the code does a simple string comparison.
http://bazaar.launchpad.net/~kitterman/pypolicyd-spf/trunk/view/head:/policydspfuser.py#L78

A simple implementation would be have it check the domain as well so that I could specify something like

example.net,Domain_Whitelist=google.com

So that mails sent to any recipient of the domain example.net is allowed to be forwarded via google.com but any other recipients sent from google.com are subject to the regular SPF checks.

A simple additional test on line 78 would probably solve this.
if user != recipient and user != recipient.split("@")[1]:

Changed in pypolicyd-spf:
status: New → Triaged
importance: Undecided → Medium
Changed in pypolicyd-spf:
milestone: none → later
Changed in pypolicyd-spf:
status: Triaged → Invalid
status: Invalid → Confirmed
status: Confirmed → Opinion
Changed in pypolicyd-spf:
status: Opinion → Triaged
Revision history for this message
Scott Kitterman (kitterman) wrote :

pypolicyd-spf is in maintenance only mode. Transferring to spf-engine for future consideration.

affects: pypolicyd-spf → spf-engine
Changed in spf-engine:
milestone: later → none
Changed in spf-engine:
milestone: none → spf-engine-future
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.