Mailing List Archive

Redirect all outgoing mail
Hello,

I have a web server with qmail installed.

I would like to make some tests on the websites that involve sending some email, but I would like all test mail to go to my mailbox and not to the real recipient (without the need of changing all websites email addresses of real recipients).

So is there a way to force qmail to set the recipient to be one fixed address?

Note: I know that with smtproutes I could route all traffic to another SMTP but that requires me to setup another catch all server.

Thank you.
P.
Re: Redirect all outgoing mail [ In reply to ]
On 07/20/2016 05:14 AM, P. P. wrote:
> Hello,
>
> I have a web server with qmail installed.
>
> I would like to make some tests on the websites that involve sending some email, but I would like all test mail to go to my mailbox and not to the real recipient (without the need of changing all websites email addresses of real recipients).
>
> So is there a way to force qmail to set the recipient to be one fixed address?
>
> Note: I know that with smtproutes I could route all traffic to another SMTP but that requires me to setup another catch all server.


man qmail-users

I have a forwarder and catch all mail that ends up in local delivery
using that.

1)

/var/qmail/users/assign: (substitute your own qmail uid:gid)

+:alias:128:136:/var/qmail/alias:-::
.

execute "/var/qmail/bin/qmail-newu" to update users/cdb

2)

/var/qmail/alias/.qmail-alias:

&catchall@my.domain

I don't know how you are set up for deliveries so I can't be more
specific but this may give you some ideas.

Mike Wright