0

Good afternoon;

I don't know much about sendmail, so this may be fairly easy for those of you more experienced with it. We have an account, "[email protected]", sending reports to various groups. From time to time an undeliverable message will be sent back to "[email protected]". We'd like for those undeliverable messages to be rerouted, or bounced, from "[email protected]" to a group of our choosing. To carve out a scenario for clarity:

So I guess a "rule" of sorts. I've come across this solution: Sendmail : ignore local delivery But I don't know enough about sendmail to know if this is what will fit this situation. Any help is greatly appreciated.

4 Answers 4

1

I see two potential solutions: set the sender to be the address you want bounces sent to, or use something procmail to handle incoming mail to that account. I'd recommend option 1 in general, but depending on your environment option 2 may be easier / faster to implement.

2
  • Thanks John; I'm open to either option, but my first inclination is to use the procmail solution since it sounds like an add-on that can be fitted into place without disturbing the sendmail environment. Is that correct? That being said, if the sendmail sender address is easily modifiable, I'd consider testing with that first to avoid having another piece of software to install/manage/document. How would I change the sender's address in sendmail?
    – Dizzle
    Dec 6, 2012 at 20:30
  • When you invoke sendmail, you can append a -f<sender address> option in most languages / instances / environments. It doesn't have anything to do with sendmail configuration, only invocation. It does, however, depend on where you're invoking sendmail from.
    – John
    Dec 7, 2012 at 13:21
1

Use an actual mailing list for this, instead of the ad-hoc stuff you're doing now. The mailing list software will then catch bounces and deal with them for you.

1

In your /etc/mail/aliases add a line:

user: [email protected]

Run newaliases as root after that. For more elaborate handling, like John wrote, you need to use procmail.

1

From your responses it looks like you want to rewrite the sender. A quick search for sendmail sender rewrite found a fair bit of documentation. It looks like you want to add a line to /etc/mail/genericstable. Something like this:

 user   [email protected]

Use the appropriate values for your case.

1
  • Thanks Bill, unfortunately I don't have that file in /etc/mail. I'll Google a bit to see if that applies to our environment or sendmail version.
    – Dizzle
    Dec 7, 2012 at 19:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .