Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Sympa
Commits
7701bcfb
Unverified
Commit
7701bcfb
authored
Sep 22, 2020
by
IKEDA Soji
Committed by
GitHub
Sep 22, 2020
Browse files
Merge pull request #1003 from ikedas/issue-957 by ikedas
Mail loop with sympa-request address because of misconfiguration (#957)
parents
560606f5
bfb262ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/lib/Sympa.pm
View file @
7701bcfb
...
...
@@ -612,7 +612,9 @@ sub get_address {
return
$that
->
{'
name
'}
.
'
-subscribe
'
.
'
@
'
.
$that
->
{'
domain
'};
}
elsif
(
$type
eq
'
unsubscribe
')
{
return
$that
->
{'
name
'}
.
'
-unsubscribe
'
.
'
@
'
.
$that
->
{'
domain
'};
}
elsif
(
$type
eq
'
sympa
'
or
$type
eq
'
listmaster
')
{
}
elsif
(
$type
eq
'
sympa
'
or
$type
eq
'
sympaowner
'
or
$type
eq
'
listmaster
')
{
# robot address, for convenience.
return
Sympa::
get_address
(
$that
->
{'
domain
'},
$type
);
}
...
...
@@ -626,7 +628,10 @@ sub get_address {
}
elsif
(
$type
eq
'
sympa
')
{
# same as above, for convenience
return
Conf::
get_robot_conf
(
$that
,
'
email
')
.
'
@
'
.
Conf::
get_robot_conf
(
$that
,
'
domain
');
}
elsif
(
$type
eq
'
owner
'
or
$type
eq
'
request
')
{
}
elsif
(
$type
eq
'
owner
'
or
$type
eq
'
request
'
# for convenience
or
$type
eq
'
sympaowner
'
)
{
return
Conf::
get_robot_conf
(
$that
,
'
email
')
.
'
-request
'
.
'
@
'
...
...
@@ -1008,7 +1013,8 @@ These are accessors derived from configuration parameters.
Site or robot:
Returns the site or robot email address of type $type: email command address
(default, <sympa> address), "owner" (<sympa-request> address) or "listmaster".
(default, <sympa> address), "sympaowner" (<sympa-request> address) or
"listmaster".
List:
Returns the list email address of type $type: posting address (default),
...
...
@@ -1016,10 +1022,22 @@ Returns the list email address of type $type: posting address (default),
(<LIST-owner> address), "subscribe" or "unsubscribe".
Note:
=over
=item *
%Conf::Conf or Conf::get_robot_conf() may return <sympa> and
<sympa-request> addresses by "sympa" and "request" arguments, respectively.
They are obsoleted. Use this function instead.
=item *
C<"sympaowner"> with robot context was introduced on 6.2.57b.2.
C<"owner"> and C<"request"> may also be used for convenience.
=back
=item get_listmasters_email ( $that )
# To get addresses of super-listmasters.
...
...
src/lib/Sympa/Spindle/ProcessIncoming.pm
View file @
7701bcfb
...
...
@@ -232,7 +232,15 @@ sub _twist {
:
undef
;
my
$list_address
;
if
(
$message
->
{'
listtype
'}
and
$message
->
{'
listtype
'}
eq
'
listmaster
')
{
if
(
$message
->
{'
listtype
'}
and
$message
->
{'
listtype
'}
eq
'
sympaowner
')
{
# Discard messages for sympa-request address to avoid loop caused by
# misconfiguration.
$log
->
syslog
('
err
',
'
Don
\'
t forward sympa-request to Sympa. Check configuration of MTA
'
);
return
undef
;
}
elsif
(
$message
->
{'
listtype
'}
and
$message
->
{'
listtype
'}
eq
'
listmaster
')
{
$list_address
=
Sympa::
get_address
(
$robot
,
'
listmaster
');
}
elsif
(
$message
->
{'
listtype
'}
and
$message
->
{'
listtype
'}
eq
'
sympa
')
{
$list_address
=
Sympa::
get_address
(
$robot
);
...
...
src/lib/Sympa/Spool.pm
View file @
7701bcfb
...
...
@@ -361,7 +361,13 @@ sub split_listname {
my
$type
;
if
(
$suffix
eq
'
request
')
{
# -request
$type
=
'
owner
';
if
(
$name
eq
Conf::
get_robot_conf
(
$robot_id
,
'
email
')
or
$robot_id
eq
$
Conf::
Conf
{'
domain
'}
and
$name
eq
$
Conf::
Conf
{'
email
'})
{
# sympa-request
(
$name
,
$type
)
=
(
undef
,
'
sympaowner
');
}
else
{
$type
=
'
owner
';
}
}
elsif
(
$suffix
eq
'
editor
')
{
$type
=
'
editor
';
}
elsif
(
$suffix
eq
'
subscribe
')
{
...
...
@@ -425,10 +431,12 @@ sub unmarshal_metadata {
if
(
exists
$data
->
{'
priority
'})
{
# Priority was given by metadata.
;
}
elsif
(
$type
and
$type
eq
'
sympaowner
')
{
# sympa-request
$priority
=
0
;
}
elsif
(
$type
and
$type
eq
'
listmaster
')
{
## highest priority
$priority
=
0
;
}
elsif
(
$type
and
$type
eq
'
owner
')
{
# -request
}
elsif
(
$type
and
$type
eq
'
owner
')
{
# -request
$priority
=
Conf::
get_robot_conf
(
$robot_id
,
'
request_priority
');
}
elsif
(
$type
and
$type
eq
'
return_path
')
{
# -owner
$priority
=
Conf::
get_robot_conf
(
$robot_id
,
'
owner_priority
');
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment