Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Configuring sendmail in a QA or Development environment

Status
Not open for further replies.

sjohnson1300

Programmer
Aug 26, 2011
1
0
0
US
My company has a system comprised of numerous applications running on multiple Linux and Windows servers (think old-school SOA); and, in Production, these applications send out email to people inside and out of the company. I have been tasked with setting up the QA and Dev environments (ie mirroring the Production environment); but we need to redirect/intercept the emails going outside of the company and certain internal addresses (redirect list). Everything else should be relayed to the normal/primary email system. I can make the applications use this server for SMTP (it's a setting); but, I've been fighting with sendmail for a month to no avail.

To be clear, here are the rules:

1) All email not in mycompany.com domain must be redirected to some local email (ex cyabucket@mycompany.com).
2) Redirect email sent to certain addresses (ex theceo@mycompany.com, grumpyoldguy@mycompany.com, and expensivelawyer@mycompany.com) to another local email (ex dontbotherme@mycompany.com).
3) All other email will be relayed to our normal email system (mymailserver.mycompany.com)

The emails that are to be intercepted/rerouted can not be thrown away. They must be sent to another address that we already have set up in the primary email system.

The server sendmail is running on is a plain x86 box with RHEL 5.6, and we're using the stock sendmail 8.13 and procmail 3.22. It is basically the standard RHEL 5.6 install, with only minor changes. I have complete control over the server, sendmail, local users, etc. I can also get the network admin to put an entry in DNS; but, this shouldn't be needed since the applications allow me to specify the SMTPServer directly. However, I can not modify the routers/switches to block traffic; and it's pretty much wide open between the servers running the applications and the primary mail server. And, finally, I can not change all of the email addresses. I have reconfigured most of the apps to use the bucket addresses; but, for business reasons, we can not change every address in the system, and we don't know all of the domains that email might be sent to.

Hopefully that's enough detail.

One final thought, if there's a way to prefix "QA " or "DEV " on the subject lines of all messages that do not have it already. This is a secondary requirement, though, and I think I've figure out how to do it with procmail. Our primary goal is to get sendmail set up to intercept messages...

Thank you for your help,

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top