LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 10-05-2003, 04:57 PM   #1
noisybastard
Member
 
Registered: May 2003
Distribution: RedHat 9
Posts: 32

Rep: Reputation: 15
sendmail: Routing dead mail to a shell command?


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.
 
Old 10-05-2003, 05:13 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail command (much) faster than sendmail bmorel Linux - Software 7 04-02-2005 06:57 PM
How can I use the Mail command with Sendmail Options Kalar Linux - Newbie 1 07-16-2004 11:35 PM
Sendmail mail goes to dead.letter rutman Linux - General 1 06-18-2004 01:14 AM
Domain Routing to Postfix from Sendmail = Wrong IP information in Mail Logs! dholingw Linux - Networking 2 05-20-2004 11:06 AM
Routing outgoing mail on a dual external interface system with sendmail Dewar Linux - Networking 5 11-19-2003 04:42 PM


All times are GMT -5. The time now is 05:43 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration