Exclude Yahoo/AOL domains from trucking campaign builder
This commit is contained in:
parent
3d611e97a4
commit
776c664df8
1 changed files with 9 additions and 1 deletions
|
|
@ -74,6 +74,13 @@ USABLE_FILTER = (
|
|||
"('smtp_valid','catch_all_domain','catch_all_detected'))"
|
||||
)
|
||||
|
||||
BLOCKED_EMAIL_DOMAINS = (
|
||||
"aol.com",
|
||||
"yahoo.com",
|
||||
"ymail.com",
|
||||
"rocketmail.com",
|
||||
)
|
||||
|
||||
DB_URL = os.getenv("DATABASE_URL", "")
|
||||
|
||||
|
||||
|
|
@ -229,10 +236,11 @@ def fetch_carriers(
|
|||
WHERE {type_filter}
|
||||
AND {USABLE_FILTER}
|
||||
AND listmonk_sent_at IS NULL
|
||||
AND lower(split_part(email_address, '@', 2)) <> ALL(%s)
|
||||
AND phy_state IN ({states_placeholder})
|
||||
ORDER BY mcs150_parsed ASC NULLS LAST
|
||||
LIMIT %s
|
||||
""", list(tz_states) + [limit])
|
||||
""", [list(BLOCKED_EMAIL_DOMAINS)] + list(tz_states) + [limit])
|
||||
return cur.fetchall()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue