0

I'm using Amazon EC2 instances with a preinstalled sendmail for some application testing.

As this is a testing system which might send some e-mail I want to delete and in the same moment forward all outgoing mails to one specific e-mail-address. So I can test different actions which send external mail, but they should get redirected to my fixed static mail, so no mail gets accidentaly send to an external recipient.

I've read about nullclient and mailertable, but these seem only to redirect to a specific smtp server. Isn't it possible to redirect to a specific mail-address? I've already done similar using MercuryMail on windows, but couldn't find a good solution for sendmail.

2 Answers 2

0

I have not tested this solution, but it seems to fit your requirement.

http://william.shallum.net/random-notes/sendmailredirectallmailfordevelopment

The second example is the one to use.

LOCAL_RULE_0
R$*    $#smtp [email protected] $:someone
1
  • Thanks for the link. Unfortunately that leads to no mails send at all without any visible error message :(
    – Tobias
    Jun 30, 2014 at 16:58
0

You may cactch all outgoing (non local) email using mailertable entry, see FEATURE(mailertable)

mailertable:

. local:catch-all 

alaises:

catch-all: userx

P.S.
You may use SMART_HOST instead of mailertable,

2
  • Does that also work by redirecting it to an external e-mail-address?
    – Tobias
    Jul 1, 2014 at 6:39
  • You may use . esmtp:[email protected]
    – AnFi
    Jul 1, 2014 at 8:38

You must log in to answer this question.

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