Reputation: 5954
Is there a programmatic way to test the existence of an email alias when logged in as an IMAP client from a remote host rather than sending an email or having to parse the aliases file on the mail server?
It is a Postfix mail server.
Edit: I found an example of email validation over SMTP and this looks like what I need. However on my server SMTP does not allow relays and I get a 554 for valid addresses. I'm wondering if there is an example like this one but for an SMTP server that requires authentication?
Upvotes: 1
Views: 1704
Reputation: 70500
You can check whether a server accepts mail for an email address with a fsockopen
on the right MX, and check wether a RCPT TO
is accepted, but there are some false positives (proxies which blindly accept anything for a domain and pipe it to others servers in the park), and false negatives (grey listing and the like). If there is some sort of command the IMAP protocol (which I doubt) I'm not aware of it.
Upvotes: 1