Re: Redirect all outgoing mail

Mike Wright <[email protected]>
Newsgroups gmane.mail.qmail.general
Message-ID <[email protected]>
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:

&[email protected]

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.