Prompt
I’m building a SaaS app and need to flag role-based addresses
Latest observation
Nov 17, 2026
OpenAI APIWeb search: off
Absolutely — if you mean email role addresses (like support@, admin@, billing@, info@) and you want to detect/flag them in your SaaS app, here’s a practical approach.
What to flag
Role-based addresses are usually shared inboxes or department addresses, not individual users. Common examples:
admin@support@billing@info@sales@contact@help@hr@accounts@security@
Simple detection approach
The most common method is to check the local part of the email address (the part before @) against a list.
Example logic
If email is support@acme.com:
- local part =
support - if
supportis in your role-based list → flag it
Example in JavaScript / TypeScript
const ROLE_BASED_LOCAL_PARTS = new Set([
"admin",
"administrator",
"support",
"help",
"info",
"sales",
"billing",
"accounts",
"contact",
"hr",
"security",
"team",
"office",
"hello",
"careers",
]);
export function isRoleBasedEmail(email: string): boolean {
const trimmed = email.trim().toLowerCase();
const atIndex = trimmed.lastIndexOf("@");
if (atIndex === -1) return false;
const localPart = trimmed.slice(0, atIndex);
// Optional: normalize plus addressing like support+ops@example.com
const baseLocalPart = localPart.split("+")[0];
return ROLE_BASED_LOCAL_PARTS.has(baseLocalPart);
}
Example in Python
ROLE_BASED_LOCAL_PARTS = {
"admin", "administrator", "support", "help", "info", "sales",
"billing", "accounts", "contact", "hr", "security", "team",
"office", "hello", "careers"
}
def is_role_based_email(email: str) -> bool:
email = email.strip().lower()
if "@" not in email:
return False
local_part = email.rsplit("@", 1)[0]
base_local_part = local_part.split("+", 1)[0]
return base_local_part in ROLE_BASED_LOCAL_PARTS
Better UX pattern
Instead of blocking these emails outright, many SaaS apps:
- flag them as “role-based”
- show a warning like:
“This appears to be a shared/department email address. Consider using a personal work email for account recovery.”
This avoids false positives and gives users flexibility.
Important caveats
A simple list is effective, but:
- some role emails are custom (
finance@,ops@,bookkeeping@) - some personal emails can look role-like (
john.smith+support@...) - some companies intentionally use shared inboxes for SaaS signup
So in production, it’s best to combine:
- keyword list
- optional domain intelligence
- a “flag, don’t block” approach
If you want more accuracy
You can improve detection by:
- using a larger curated role-email list
- checking mailbox patterns from your own customer data
- using an external verification/enrichment service
- adding ML/rules for company-specific aliases
Recommended product behavior
Typical options:
- Flag only: show a warning in UI
- Soft block: ask for a personal/individual email
- Allow but verify: accept signup, but require stronger account recovery methods
If you want, I can also help you with:
- a more comprehensive role-email dictionary,
- regex/rules for validation, or
- code for specific stack like Node, Python, Go, or Ruby.