qmail-taps-extended

December 19, 2016 by Roberto Puzzanghera 8 comments

The qmail-taps-extended patch by Inter7 (extension by Michai Secasiu) provides the ability to save each email which flows through the system. You could decide to log only the messages which have the From or To address set to a local account.

You just have to create a new control file /var/qmail/control/taps which contains a regex style list of addresses to tap and the email address of where you want the copy sent to.

Examples:

if you only want to log the messages with the From address @domain.com you would set the configuration like this:

F:.*@domain.com:copy@example.com

If you want to log only those with the To address @domain.com

T:.*@domain.com:copy@example.com

if you want the same behavior as the original Inter7's patch:

A:.*@domain.com:copy@example.com

Comments

Duplicate e-mails

Hi Roberto and  THANK YOU for your great work to guide, document and support your Qmail distribution!

I have installed your Qmail release v2024.02.06.

I am using qmail taps feature to log mail sent from user1 to another mailbox in the same localdomain:

F: user1@localdomain.com: backup@localdomain.com

When user1 sends mail to somebody of the @localdomain.com, we receive it 2  times in backup@localdomain.com.

When user1 sends mail to @outsidedomain.com, we receive it 1 times.

And the second experiment:

F: user1@localdomain.com: backup@localdomain2.com

When user1 sends mail to somebody of the @localdomain2.com, we receive it 2  times in backup@localdomain2.com.

When user1 sends mail to somebody of the @localdomain.com or @outsidedomain.com, we receive it 1 times in backup@localdomail2.com.

I saw similar comments for the qmail-taps-extended pach. The qmail-tap patch didn’t have this problem.

Reply |

Duplicate e-mails

Hi Violeta,

I cannot reproduce the issue here in neither situation you mentioned. I don't know if it's intentional, but if I use a control/taps with spaces like in your example it won't copy the emails

F: user1@localdomain.com: backup@localdomain2.com

I'm testing like this

F:user1@localdomain.com:backup@localdomain2.com

or even

F:.*:backup@localdomain2.com

Reply |

Duplicate e-mails

Hi Roberto,

There are no spaces in my real taps control file.

 You can reproduce the issue  if in your taps:

F:user1@localdomain.com:backup@localdomain2.com 

user1@localdomain.com  sends  message to user2@localdomain2.com

Then backup@localdomain2.com receives 2 identical messages from user1@localdomain.com (duplicates).

In summary: the issue appears when the receiver and backup-box are in the same domain.

Reply |

Duplicate e-mails

I would check the .qmail-default and the backup-box .qmail file if it exists

Reply |

Duplicate e-mails

Hello Roberto,

Thanks for your efforts for resolving of my problem. Your advice was correct. The problem was in my .qmail file:

The receiver (user2@localdomain2.com) has .qmail file to anotherbox@localgomain2.com and this was the reason for the delivering of two identical messages. There is a clear log in /var/log/qmail/send for that.

 Once again thank you for your time and support!

Reply |

Duplicate e-mails

Hi Violeta,

this is actually the test I did. I receive only one backup message, as expected

Reply |

Duplicate e-mails

I just installed this patch and unfortunately i am getting duplicate e-mails when the e-mail taps is sending an email locally and remote as well. 

I am missing something or this would be the normal behavior? 

To be more exactly: sender x@domain.com is sending emails towards y@domain.com and z@anotherdomaina.com.

If I am using F:x@domain.com:k@randomdomain.com I am getting duplicate email in k@randomdomain.com

Reply |

Duplicate e-mails

yes the expected behaviour is to get a copy of each email with x@domain.com in the From field forwarded to k@randomdomain.com

Reply |

Recent comments
See also...
Recent posts

RSS feeds