Operating System - HP-UX
1833053 Members
2629 Online
110049 Solutions
New Discussion

Re: Undeliverable Mail administration

 
TheJuiceman
Super Advisor

Undeliverable Mail administration

Hey gang,

How is the best way to handle undeliverable mail in /var/mail? Is there a way to forward all undeliverable mailings to a particular address? Thanks.
5 REPLIES 5
Court Campbell
Honored Contributor

Re: Undeliverable Mail administration

How is the best way to handle undeliverable mail in /var/mail?

I would say delete it. Otherwise you could search through the mail and try to figure out what caused the issue. I have seen that many a time it is a mistyped e-mail address.

Is there a way to forward all undeliverable mailings to a particular address?

might look at:

http://www.sendmail.org/m4/tweaking_config.html#confCOPY_ERRORS_TO

I am not sure what exactly needs to be defined in your sendmail.cf file. And not sure if your version of sendmail supports it. I will look into it tomorrow.




"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Court Campbell
Honored Contributor

Re: Undeliverable Mail administration

Is there a way to forward all undeliverable mailings to a particular address?

You can uncomment this line in the sendmail.cf file.

#O PostMasterCopy=Postmaster


This will send copies of undeliverable e-mails to root. If you look at the /etc/mail/aliases file you will see that postmmaster is an alias for root. You could then put a .forward file in root's home directory and put your e-mail address in the file. This would forward the notices to you.

P.S. if you make the change remember to restart sendmail so the change takes effect.
"The difference between me and you? I will read the man page." and "Respect the hat." and "You could just do a search on ITRC, you don't need to start a thread on a topic that's been answered 100 times already." Oh, and "What. no points???"
Keith Johnson
Valued Contributor

Re: Undeliverable Mail administration

You could add an entry to the postmaster entry in the /etc/mail/aliases file to forward undeliverables to an address.
No matter where you go...there you are.
TheJuiceman
Super Advisor

Re: Undeliverable Mail administration

Are there any security precautions that need to be taken if a .forward file was created for each user? Is there some other way to forward ALL USER'S undeliverable mail to particular account without the creation of .forward files in everyone's home directories? If this is the best way to do it, what permissions should the .forward files have? Thanks again for your help.
TheJuiceman
Super Advisor

Re: Undeliverable Mail administration

For that matter, will giving everyone a .forward file even work? Seems to work ok for root but what about everyone else?