Hi,

Yes, this worked! Though I still need to know the tags my users are using and assigning them these addresses.

Can this be done by automatically? Like assigning user+whate...@domain.tld automatically to u...@domain.tld?

Another idea to fix this is to extend the PCRE pattern to add a X-Envelope-To Header:

/(.*)(\+([^+@]*)\@)(.*)/i   prepend X-Envelope-To: $1@$4
/(.*)/   prepend X-Envelope-To: $1

The first prepend will only be made on a match.

Regarding older mails which were already archived a solutioni to auto-assign these tagged mails would be better, I guess.

André

------ Originalnachricht ------
Von: "Janos SUTO" <s...@acts.hu>
An: "Piler User" <piler-user@list.acts.hu>
Gesendet: 21.08.2016 17:39:34
Betreff: Re: AW: Access to mails with delimiter "+"

Hello,

On 2016-08-21 14:52, André Peters wrote:

A delimited address like me+t...@domain.tld is now shown as
"t...@domain.tld". I need to add "t...@domain.tld" to show delimited
mails in the search panel.
Anyways it shows the address correctly in the bottom panel.

Screenshots always help, I guess: https://i.imgur.com/Td8obp4.png

I gladly pay your hourly rate to implement this into the parser. I had
a look into it but my C isn't good at all. :-)

try the following: edit src/parser_utils.c, and locate the translateLine
function. It has the following nice condition around the 593th line:

if( (state->message_state == MSG_RECEIVED || state->message_state == MSG_FROM || state->message_state == MSG_TO || state->message_state == MSG_CC || state->message_state == MSG_RECIPIENT) && *p == '@'){ continue; }

and replace it with the following:

if( (state->message_state == MSG_RECEIVED || state->message_state == MSG_FROM || state->message_state == MSG_TO || state->message_state == MSG_CC || state->message_state == MSG_RECIPIENT) && (*p == '@' || *p == '+') ){ continue; }

(note that I wrapped the lines to fit my screen. You may keep it in one line).

Then recompile, and run pilertest against it, and check if the To address
is displayed correctly. Let me know if it works for you.

Janos


André

-----Ursprüngliche Nachricht-----
Von: Janos SUTO [mailto:s...@acts.hu]
Gesendet: Sonntag, 21. August 2016 14:32
An: Piler User <piler-user@list.acts.hu>
Betreff: Re: Access to mails with delimiter "+"

Hello,

try adding the following to config-site.php:

$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'aaaa';

function aaaa($username = '') {
    $session = Registry::get('session');
    $data = $session->get("auth_data");

    if($username == 'myn...@example.org') {
       array_push($data['emails'], "myname+appen...@example.org");
    }

    $session->set("auth_data", $data);
}

then check on the settings page if the appended email is listed.

Note that I didn't check if the plus sign  is handled correctly by the
parser and the indexer.

Janos


On 2016-08-21 12:18, André Peters wrote:
Hi,

Any idea how I can give access to mails with a delimiter? Like in
myname+appen...@example.org.

I wrote a function to include these aliases in the $data['emails']
array when logging in, but I cannot see them anyway. Any ideas?

André

Reply via email to