1

My general task is following:

  1. We have workable application that sends mails to the users (that are registered in this application on some actions);
  2. Mails are sending using sendmail tool;
  3. In order to test changes our sendmail tool uses smart host. And in reality emails weren't sent because otherwise on the testing step we will spam real users.
  4. I don't have any acces to this smart host configuration and it's hardly ever to speak with admins who configured this.
  5. Now I need to add bounce back tracking for emails that are sent. And With currect smart_host configuration it's impossible to do.
  6. So i need some alternative solution how to perform testing. From one side I can't send real emails (because it will spam real users) from other side I need to have possiblity to reproduce bounce backs in order to proceed with development.

Could you please suggest some documentation to quickly do this ?

In general I need:

  1. Another SMTP server that will be used by SendMail tool;
  2. This server should have some rules to configure Bounce Back feature. As Example When I send some email email is bounced;
  3. And After that I will be able to process this bounce approipriately.

Or could you please provide some alternative vision how bounce backs could be tested ?

fashuser
  • 123
  • 5

1 Answers1

1

A general rule of testing and development is to do it on a test system with test data...

If you don't have a proper test server with test data, at the minimum create a couple of test users so you don't spam your real users.

In theory delivery error notifications are returned to the sender, so a first approach would be to properly configure your e-mail messages with a working email address in the envelope sender, the From and Return-Path headers so they're not nobody@hostname or apache@localhost.

When calling sendmail instead of simply calling sendmail directly add a couple of commandline switches to force a valid sender email address of for example: no-reply@localhost.localdomain with:

/usr/sbin/sendmail -t -i -fno-reply@localhost.localdomain -Fno-reply@localhost.localdomain
HBruijn
  • 72,524
  • 21
  • 127
  • 192