Koozali.org: home of the SME Server

Obsolete Releases => SME Server 8.x => Topic started by: Gaetan on May 08, 2015, 11:17:18 AM

Title: Keep a copy of INCOMING emails only
Post by: Gaetan on May 08, 2015, 11:17:18 AM
Hi,
I have followed the instructions in the following wiki:

http://wiki.contribs.org/Email#Keep_a_copy_of_all_emails

Keep a copy of outgoing emails only
In addition to the commands in the previous section we will also have to create a custom template as follows:
Log in as root or a user with root privileges
mkdir -p /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
cp /etc/e-smith/templates/var/service/qpsmtpd/config/peers/0/13bcc /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
cd /etc/e-smith/templates-custom/var/service/qpsmtpd/config/peers/0/
nano -w 13bcc
change the code to:
{
     return "# bcc disabled" unless ($qpsmtpd{Bcc} eq "enabled");
     return "bcc mode " . $qpsmtpd{BccMode} . " outgoing " . $qpsmtpd{BccUser};
}
Save by pressing Ctrl x at the same time and confirm with y
Then enable the changes with
signal-event email-update


******************

If I put "all", I do get all messages - incoming and outgoing
If I put "outgoing", I only get outgoing messages ... So far so good.

But if I put "incoming", I still get incoming and outgoing messages.

I do run "signal-event email-update" after each change.

Can someone tell me why I cannot get only incoming emails ?

Thanks
Title: Re: Keep a copy of INCOMING emails only
Post by: Stefano on May 08, 2015, 12:49:18 PM
AFAICT bcc plugin supports only incoming email copy..

I remember something about your issue but I don't remember if it was a topic here or a bug in bugzilla..

please do a search either here and in bugzilla..
Title: Re: Keep a copy of INCOMING emails only
Post by: CharlieBrady on October 01, 2015, 07:34:52 PM
AFAICT bcc plugin supports only incoming email copy..

No, it supports incoming, outgoing or all.

I'm curious to know what OP considers to be 'incoming' mail. The bcc plugin documentation says this:

...
Send a copy of all incoming email to the given address. Mail is considered
incoming if it is going to a recipient with a domain in 'rcpthosts'.
...

This is being tracked in the bug tracker via:

http://bugs.contribs.org/show_bug.cgi?id=9084

Any followup there, please.