Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Is there a way that I can run a shell command when an email is returned from a server because the account doesn't exist? People sign up on my site using fake email addresses sometimes and then I get a bunch of dead mail bouncing back to me. I'd like to be able to run a shell command that would call up a script to remove their email address from the database any time an account comes back dead. Thanks.
In /etc/aliases you can add a line like:
xyz :|/path/to/script
This will send all mail sent to user "xyz" to that program/script. You may want to consider using a scoreboard and only delete mail once it has been rejected say 3 times in a row - this should account for any network issues.
After editing /etc/aliases you need to run:
newaliases
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.