Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: sent mail by perl

by Nitsuj (Hermit)
on Jul 27, 2001 at 17:29 UTC ( #100292=note: print w/replies, xml ) Need Help??

in reply to sent mail by perl

First, the SMTP RFC is 821. You can view that here.

Next, if you look on page 20 of that specification, it gives you the information on the RCPT command. There are 2 possible responses for an unknown user.
1) Relay: Essentially, to do what you want would require you to put yourself into the "FROM" header of the e-mail. You will get the corresponding e-mail back.
2) Error Code 550: The mail server could reply with an error code 550, "user unknown". In this case, you could write a program to recieve the error code and abort/notify/bounceback/whatever. Sendmail will give this error as "550: negative permanent filesystem." So, you could use sendmail's output to trigger this error.

Of course, your program should do both so as to account for both.

Just a bit of trivia here: Some sysadmins track this error as a means of detecting potential spammers... Also, some spammers/blackhats track this error as a means of finding valid users to spam/exploit.

Just Another Perl Backpacker

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://100292]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2022-05-21 05:59 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (76 votes). Check out past polls.