Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange behavior when a moderator refuses a message : auth failed #277

Closed
Philippe34 opened this issue Apr 23, 2018 · 15 comments
Closed

Strange behavior when a moderator refuses a message : auth failed #277

Philippe34 opened this issue Apr 23, 2018 · 15 comments
Assignees
Labels
Milestone

Comments

@Philippe34
Copy link

Hi,
I meet a strange behavior with sympa moderation (since the first use in 6.2.24).
I'm now in sympa 6.2.32.
I have a list : maliste2 with the basic scenario "Modérée (editorkey)" provided by sympa

/usr/share/sympa/default/scenari/send.editorkey
_title.gettext Moderated

is_editor([listname],[sender]) smtp,dkim,smime,md5 -> do_it
is_editor([listname],[header->X-sender][-1]) smtp,dkim,smime,md5 -> do_it
true() smtp,dkim,smime,md5 -> editorkey_

scenario 1:
When a message arrives from user1, the moderator receives a message and he accepts the sending : everything works well, user1 receives "Le message a été envoyé avec succès" -> OK

/var/log/sympa.log:
info Sympa::Request::Handler::distribute::_twist() DISTRIBUTE maliste2 f76cd3d1047c2ffb72b9ae35942b55de from philippe.camps@ies.... accepted (0.27 seconds)

scenario 2:
When a message arrives, the moderator receives a message from sympa and he refuses the sending.
The message is not sent, but the moderator receives (french)

"La commande a échoué :

REJECT maliste2 85316661d455e443c18a959065d92159
Impossible d'accéder au message à modérer de la liste maliste2 avec la clé
85316661d455e443c18a959065d92159.
Il se peut que ce message ait déjà été diffusé par un modérateur de la liste."

I can see in /var/log/sympa.log an "auth failed"
_info Sympa::Request::Handler::reject::twist() REJECT maliste2 85316661d455e443c18a959065d92159 from philippe.camps@ies... refused, auth failed

Why in scenario 1 (message is accepted), I have no "auth failed" and in scenario 2 (message is refused), I have "auth failed".

Regards

@Philippe34
Copy link
Author

Can someone confirm this issue ?
It should take no more than 10 minutes.

@ikedas
Copy link
Member

ikedas commented Apr 27, 2018

Hi @Philippe34,

Can you check the content of moderation spool (in your case /var/spool/sympa/moderation)? If there is no file named maliste2@xxxx_85316661d455e443c18a959065d92159 or so, message in question may have been already distributed or rejected.

@Philippe34
Copy link
Author

Hi @ikedas
I have in /var/spool/sympa/moderation the file you said :
-rw-r-----. 1 sympa sympa 2472 23 avril 17:03 maliste2@xxxx_85316661d455e443c18a959065d92159

When I test moderation with maliste2, I'm the only one. So nobody else could moderate this message.
I had already refuse this message, mais it stays in that spool. Because of auth fail ?

In that spool, I can see files from another lists. Maybe their moderators did not care of these messages.

There is something else I noticed. When an user sends a message, I received the email for the moderation;
But when I go to web interface, I never could see a message in moderate > message.
I always have : "Aucun message à modérer" (no messages to moderate)

@ikedas
Copy link
Member

ikedas commented Apr 27, 2018

Hi @Philippe34,

If possible, can you show us these information?

  • Content of sympa.conf, and corresponding robot.conf if any
  • Content of $MODULEDIR/Sympa/Constants.pm

@Philippe34
Copy link
Author

Hi @ikedas
thank you for your interest.

Sympa.zip

I have just replaced sensitive informations with XXXX.

@ikedas
Copy link
Member

ikedas commented May 27, 2018

Hi @Philippe34, very sorry for delayed response.

I could not reproduce the behavior you reported. If you see the same behavior again, please show us following information:

  • Exact names of files in /var/spool/sympa/moderation (list name or domain name may be masked).

Thanks.

@Philippe34
Copy link
Author

Hi @ikedas,
Thank you for the time you have spent testing this problem.
So I suppose I have to investigate to my sympa server. I use the packages for CentOS 7. Is it the case for you when you could not reproduce this behavor ?

@ikedas
Copy link
Member

ikedas commented May 28, 2018

Hi @Philippe34,
Yes, I used Sympa 6.2.32 RPM for Cent OS 7, too.

@Philippe34
Copy link
Author

Hi @ikedas,

I have found what is the bug in sympa.
I compared /usr/share/sympa/lib/Sympa/Request/Handler/distribute.pm with /usr/share/sympa/lib/Sympa/Request/Handler/reject.pm

I could distribute messages but reject command never worked.

distribute.pm:
my $spindle = Sympa::Spindle::ProcessModeration->new(
distributed_by => $sender,
context => $robot,
authkey => $key,
quiet => $request->{quiet}
);

reject.pm:
my $spindle = Sympa::Spindle::ProcessModeration->new(
rejected_by => $sender,
context => $list,
authkey => $key,
quiet => $request->{quiet}
);

When I replace reject.pm with the context robot, the reject command works fine for me:
my $spindle = Sympa::Spindle::ProcessModeration->new(
rejected_by => $sender,
context => $robot,
authkey => $key,
quiet => $request->{quiet}
);

Best regards

@ikedas ikedas added bug and removed question labels Jul 6, 2018
@ikedas ikedas self-assigned this Jul 6, 2018
@ikedas
Copy link
Member

ikedas commented Jul 14, 2018

Hi @Philippe34,
Do you set host parameter in config file of the list in question?

@Philippe34
Copy link
Author

Hi @ikedas,
Yes, I add host parameter in all my lists config to have:
host $domain
and not: host $host.$domain
But in sympa 6.2.34, host parameter is deprecated. So, shoud I upgrade my sympa from 6.2.32 to 6.2.34 ?

Regards

@ikedas
Copy link
Member

ikedas commented Jul 16, 2018

Hi @Philippe34,

I got it. It may be a bug of 6.2.32. I guess that content of moderation directory is, e.g.

maliste2@<host parameter in list config>_85316661d455e443c18a959065d92159

instead of

maliste2@<domain parameter in sympa.conf>_85316661d455e443c18a959065d92159

But in sympa 6.2.34, host parameter is deprecated. So, shoud I upgrade my sympa from 6.2.32 to 6.2.34 ?

If my guess above is right, yes.

However, once you upgraded, all lists would recognize theirselves as <list name>@<domain parameter> instead of <list name>@<host parameter>. You may have to change domain parameter in sympa.conf to value of older host parameter.

And, to make messages already in moderation spool accessible, you may have to rename them.

@Philippe34
Copy link
Author

Hi ikedas,
I upgraded sympa 6.2.32 to 6.2.34.
It was not to easy for me and it took a long time. For me, the issue was that when I added the host parameter in each list config, this caused moderation problem when a message was rejected and the message never appeared in the web gui. Very strange.

So when I upgraded to sympa 6.2.34, I can only have the domain parameter in sympa.conf.
domain listhost.mydomain
became
domain mydomain
But when I did this change, all my lists lost the subscribers. I did not have any subscribers in my lists.

I had to export and reimport for each of my lists my subscribers (copy and paste).

Now, everything seems to work normally.

@ikedas
Copy link
Member

ikedas commented Sep 10, 2018

Hi @Philippe34,

Thanks for folow-up. I'll think about updating description in Upgrading notes to make up for your case.

@ikedas
Copy link
Member

ikedas commented Dec 16, 2018

Documentation was updated: sympa-community/sympa-community.github.io@6ae757f
This issue is closed. About improvement of documentation, visit issue to documentation repo.

@Philippe34, thanks for reporting bug!

@ikedas ikedas closed this as completed Dec 16, 2018
@ikedas ikedas added this to the 6.2.38 milestone Dec 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants