Skip to Content.
Sympa Menu

devel - [sympa-dev] matching SMTP headers on command messages

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Adam Bernstein <address@concealed>
  • To: address@concealed
  • Subject: [sympa-dev] matching SMTP headers on command messages
  • Date: Wed, 24 May 2006 12:44:45 -0700

Sympa folks --

We've been trying to get something to work for a client with no success, and I think we've just discovered why. They want to require confirmations for some subscriptions, but to allow subscription requests from certain IP addresses to go through without confirmation. I thought this would be easy using a 'match' command with msg_header->'Received', but the rule seems to have no effect, and it looks like it's related to this from the Sympa doc:

"The variable notation [msg_header-><smtp_key_word>] is interpreted as the SMTP header value only when evaluating the authorization scenario for sending messages."

I see no obvious reason why you wouldn't want to make that function available for command messages (as opposed to distributed list messages), and looking in the code, I think the cause is simply that the full message is not retained in the sequence of function calls involved in processing a command. I think we would have to add the message hash as an argument to the call to Commands::parse in sympa::DoCommand, and then to the argument list for that parse() function, and then to the call to $comms{$j} from that function, and then to the subscribe() function's argument list, and then to the call to request_action from that function....

Am I right that the change would have to follow that whole chain, or is there a simpler answer that I'm missing? If I get that working, can we add it to the Sympa distribution? It would sure be nice to be able to use such a flexible authorization criterion for both commands and list messages, rather than just the latter.

ab



Archive powered by MHonArc 2.6.19+.

Top of Page