Linode Forum
https://forum.linode.com/

Postfix: I would like to duplicate all incoming emails
https://forum.linode.com/viewtopic.php?f=11&t=8610
Page 1 of 1

Author:  flibble [ Sat Mar 24, 2012 10:38 am ]
Post subject:  Postfix: I would like to duplicate all incoming emails

I've followed the guides and successfully setup Postfix (in virtual user mode) and everything is working properly.

I would now like to setup a system to help monitor ALL incoming emails. Ideally I want to duplicate all messages to single email address (eg. log@domain.com) or out to a script. I want to log every single email (our volumes are not high) including those to mailboxes that don't exist. A catch-all address is no good because it only picks up an recipient not in the user table and I would still like to create the bounce to an email if the mailbox isn't there.

Is there not any way just to simply take a copy of every single email before passing onto the usual postfix queue for normal processing? It seems like something simple but I can't find any solutions on the net.

Author:  Nuvini [ Sat Mar 24, 2012 10:49 am ]
Post subject: 

Like this?

Author:  flibble [ Sat Mar 24, 2012 11:08 am ]
Post subject: 

Nuvini wrote:
Like this?


No. recipient_bcc_maps only works after the email has been accepted for a particular mailbox. So it doesn't capture emails sent to an email box that doesn't exist

Author:  sleddog [ Sat Mar 24, 2012 7:25 pm ]
Post subject: 

Try always_bcc.

Author:  hoopycat [ Sat Mar 24, 2012 10:38 pm ]
Post subject: 

Note that there simply is no message to copy when a recipient doesn't exist -- the rejection is done at the SMTP level. When you send an e-mail to an address that doesn't exist, the bounce e-mail itself is usually generated by your mail relay, not the recipient's server.

If you want to receive the message and then bounce it, you've got a bit of a problem: it's trivial to spoof e-mail addresses, so you'll be sending a bounce message to an e-mail address that is often some random third party. (This is called "backscatter", and is a considerable spam problem.)

Author:  flibble [ Wed Apr 04, 2012 2:03 pm ]
Post subject: 

hoopycat wrote:
Note that there simply is no message to copy when a recipient doesn't exist -- the rejection is done at the SMTP level. When you send an e-mail to an address that doesn't exist, the bounce e-mail itself is usually generated by your mail relay, not the recipient's server.


Ah yes. Good point, I was envisaging a complete email being received and then rejected when postfix found the recipient didn't exist but you are right. If I think a bit harder I can see now that mail relay doesn't even get as far as sending the message to my server

Thanks

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/