Blackhole all email

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Blackhole all email

Gary-116
For dev purposes, I want to setup a test server that doesn't actually
deliver, but record the tests.

So what I want is to setup a relay server that will accept email from
specific users(verify using userid/password) - automatically bcc a
specific local account and deliver it, then throw away the email instead
of deliverying it on.

(basically, I want to be able to do a test run of email from an
application which could be going to between 100 and 100,000 people - I
want to store a copy so the test run can be checked to make sure the
mail merge is functioning, but I don't to actually send it).

Checking the website, I see formula's for setting up postfix and dovecot
which will handle my authorized user issues, I see formulas for adding a
bcc to all email sent through the server, so that can be easily accomodated.

The one item I'm not sure of is the discarding email bit.  The only way
I can think of offhand is to setup a second relay server for the first
server to send to, and setup a policy filter to discard everything.

Am I missing something obvious here, like just piping outgoing email to
/dev/null ?  I do not think I can do it with incoming, since I want
local delivery of the bcc email.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Blackhole all email

Pablo Arturi
> For dev purposes, I want to setup a test server that doesn't actually
> deliver, but record the tests.
>
> So what I want is to setup a relay server that will accept email from
> specific users(verify using userid/password) - automatically bcc a
> specific local account and deliver it, then throw away the email instead
> of deliverying it on.
>
> (basically, I want to be able to do a test run of email from an
> application which could be going to between 100 and 100,000 people - I
> want to store a copy so the test run can be checked to make sure the mail
> merge is functioning, but I don't to actually send it).
>
> Checking the website, I see formula's for setting up postfix and dovecot
> which will handle my authorized user issues, I see formulas for adding a
> bcc to all email sent through the server, so that can be easily
> accomodated.
>
> The one item I'm not sure of is the discarding email bit.  The only way I
> can think of offhand is to setup a second relay server for the first
> server to send to, and setup a policy filter to discard everything.
>
> Am I missing something obvious here, like just piping outgoing email to
> /dev/null ?  I do not think I can do it with incoming, since I want local
> delivery of the bcc email.
>

I think you could add something like this in your master.conf

custom       unix    -       n       n       -       -       pipe
  flags=Rq      user=userhere    argv=/home/custom.sh ${sender} ${recipient}

And then have custom.sh do what you want, and setup as transport "custom".

You could read from stdin from php the entire message like :

$fd = fopen("php://stdin", "r");

and then manipulate the message as you need and do whatever you need with
it.

I think this could work for you.

Regards,
Pablo

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Blackhole all email

Stefan Förster-4
In reply to this post by Gary-116
Hallo Gary,

* Gary <[hidden email]> wrote:

> For dev purposes, I want to setup a test server that doesn't actually
> deliver, but record the tests.
>
> So what I want is to setup a relay server that will accept email from
> specific users(verify using userid/password) - automatically bcc a
> specific local account and deliver it, then throw away the email instead
> of deliverying it on.
>
> (basically, I want to be able to do a test run of email from an
> application which could be going to between 100 and 100,000 people - I
> want to store a copy so the test run can be checked to make sure the
> mail merge is functioning, but I don't to actually send it).
>
> Checking the website, I see formula's for setting up postfix and dovecot
> which will handle my authorized user issues, I see formulas for adding a
> bcc to all email sent through the server, so that can be easily accomodated.
>
> The one item I'm not sure of is the discarding email bit.  The only way
> I can think of offhand is to setup a second relay server for the first
> server to send to, and setup a policy filter to discard everything.
>
> Am I missing something obvious here, like just piping outgoing email to
> /dev/null ?  I do not think I can do it with incoming, since I want
> local delivery of the bcc email.

Quick idea: Given you have a user on that machine that you can send
mail to via local(8) delivery agent, just define the domain in
question as virtual_alias_domains (make sure to exclude it from
mydestination!, like virtual_alias_domains=example.org,
mydestination=hostname.example.org) and create a virtual alias file like:

@example.org    bcc-account

All mail entering this machine that is addressed to
<something>@example.org will then be delivered to bcc-account locally.


Cheers
Stefan
--
Stefan Förster     http://www.incertum.net/     Public Key: 0xBBE2A9E9
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Blackhole all email

Gary-116
Stefan Förster wrote:
> Quick idea: Given you have a user on that machine that you can send
> mail to via local(8) delivery agent, just define the domain in
> question


Opps, I knew I forgot to mention something.  Since these are real
addresses of real people who signed up to double opt in email lists,
there is no one domain, the domains could be from anywhere.

Furthermore, it would be inconvenient to actually gather the domain
information beforehand since the troubleshooting is for open source list
software running on other people's systems.

It's a simple matter to have them change their MTA to point to my server
with a userid and password assigned to them and then just let the
transfer rip.  It's more complex to have them give me a data dump of all
their domains first.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Blackhole all email

Zbigniew Szalbot-9
Hi there,

Gary:

> Stefan Förster wrote:
>> Quick idea: Given you have a user on that machine that you can send
>> mail to via local(8) delivery agent, just define the domain in
>> question
>
>
> Opps, I knew I forgot to mention something.  Since these are real
> addresses of real people who signed up to double opt in email lists,
> there is no one domain, the domains could be from anywhere.
You could define a catch-all (sub)domain, then fill up a test database with fake addresses of the sort ([hidden email], [hidden email]). All mail would then be delivered locally to one account.

HTH

--
Zbigniew Szalbot
www.lc-words.com


smime.p7s (3K) Download Attachment
Loading...