Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Sendmail: Is it possible to route responses abaut failures to local user?

SOLVED
Go to solution
MQ'ski
Regular Advisor

Sendmail: Is it possible to route responses abaut failures to local user?

Consider we send message using sendmail from "sender" to "recipient".
Consider we can send from different "senders" as example.
someone_a@domain1
someone_b@domain2

Sendmail sends this messages to "recipient".
Now lets make an assumption that recipient is unknown from some reason (wrong user or domain etc). So the message is not delivered and there is delivery repport generated back to sender abaut deliver failure that recipient is unknown. Now. Can we make some configuration that those delivery reports will not go to sender but redirected/forwarded/or copied to local user let say root mailbox for example?
9 REPLIES
VK2COT
Honored Contributor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

Hello,

One of the possibilities in MC config is:

define(`confCOPY_ERRORS_TO', `root')dn

Normally, you leave it to postmaster.

Cheers,

VK2COT

VK2COT - Dusan Baljevic
MQ'ski
Regular Advisor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

Thanks for answer.
Do you mind if I ask you more questions?
What do you mean by MC ... file sendmail.mc?
What happens if it comes to postmaster? (It means it is something like forwarded to originator of the mail?)
Dennis Handly
Acclaimed Contributor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

>What happens if it comes to postmaster? (It means it is something like forwarded to originator of the mail?)

Postmaster is a user that you can alias to any user, including root.
MQ'ski
Regular Advisor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

What it is still open question:

Where exactly this should be & what will be the result of:

One of the possibilities in MC config is:

define(`confCOPY_ERRORS_TO', `root')dn
TTr
Honored Contributor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

The COPY_ERRORS_TO is just that, a copy of the rejected message to the postmaster or root. It does not prevent the rejected message from being sent back to the original sender.

These undelivered mail errors are sent from the last relay SMTP server that is actually taking to the recepient's MX record SMTP server. So if you don't have access to this server, you can not do anything. The sender string is MAILER-DAEMON (see DnMAILER-DAEMON in sendmail.cf). There are no settings to disable the message back to the original sender which means that the only way to do this is to rewrite the error processing rules. This is something that I avoid doing and unless you become a sendmail guru I suggest you do the same. Maybe somebody else will reply with rewriting a rule.
MQ'ski
Regular Advisor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

Hello
For me is ok if just copies of delivery failure messages will comes to root.
What should be done then? Only this two lines in mc config?
TTr
Honored Contributor
Solution

Re: Sendmail: Is it possible to route responses abaut failures to local user?

You do not need to recompile sendmail.cf using the COPY_ERRORS_TO directive. All you need to do is comment out the line that says
#O PostMasterCopy=Postmaster in your sendmail.cf file. You may need to restart the sendmail daemon. You don't need to change Postmaster to root in the above. The aliases file usually forwards the Postmaster address to root by default.
MQ'ski
Regular Advisor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

Ok ..
Let me try it.
MQ'ski
Regular Advisor

Re: Sendmail: Is it possible to route responses abaut failures to local user?

I checked this hint you send me and it worked fine.
But is it possible to do that this is not a copy send to Postmaster and trying to send a copy to sender as well?
I mean like forwardin reports to root instead of copying them?