good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You bounce an email by sending a message back to the server that sent it. There are a number of possible messages but user unknown at this domain is what you want. See Mail::Message::Construct::Bounce for a very simple interface to bounce messages in perl. Note this link fails to work properly. Go to search.cpan.org and search for 'MAIL::Bounce' and it will bring it up OK However what you really want to do is not have a catch all email address. Typically this will be (for sendmail) set up in the virtusertable like this: This directs any mail sent to domain.com to usernames mail box. All you need to do provided you have root access of course is
Now any mail to domain.com that does not match one of the listed addresses will bounce. Note multiple 'fake' addresses go to the one username mail box. It is easier to let the MTA bounce messages for you. Otherwise you will have to parse you mail box using the Mail::Box and friends. Note Mail::Box is the biggest pain in the ass to install as it has *lots* of dependencies, and I do mean lots. Each of these has more. Suggest use CPAN to put it on for you. cheers tachyon In reply to Re: Bouncing Email w/ Perl
by tachyon
|
|