Skip to Content.
Sympa Menu

en - Re: [sympa-users] Postfix to sympas script

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Bastien ROUCARIES <address@concealed>
  • To: "Roger B.A. Klorese" <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Postfix to sympas script
  • Date: Wed, 9 Feb 2011 12:58:25 +0100

On Wed, Feb 9, 2011 at 12:20 AM, Roger B.A. Klorese <address@concealed>
wrote:
> Hello - some questions below, which will help me understand your assumptions

>>
>> my $USE_SUBDOMAIN_SCHEME = '1';
>> my $DEFAULT_POSTERMASTER = 'listmaster';
>> # not used if $USE_SUBDOMAIN_SCHEME = 1;
>> my $DEFAULT_DOMAIN = 'exemple.com';
>
>
> So your expectation here is that if $USE_SUBDOMAIN_SCHEME is set:
> - you have a lists.DOMAIN subdomain
> - you have control over both DOMAIN and lists.DOMAIN

exactly it is my use case
>
> And if it is not, whatever domain you're in, at whatever level, is also
> where the administrative addresses are.
>
> ...correct?
yes

[..]

> You describe an optional third argument, [extension] -- but never use it
> later, and if you get it here, die -- why?

I plan to expend it in order to use verp

>> my $domain = $ARGV[0];
>> my $user = $ARGV[1];
>>
>> my $LIST_OWNER = '';
>> if($USE_SUBDOMAIN_SCHEME == 1) {
>>     $domain =~ /(lists)\.(.*)/;
>>     my $subdomain = $2;
>>     if(!defined($subdomain)) {
>>        $! = $EX_USAGE;
>>         die('domain does not seems to be valid!');
>>     }
>>     $LIST_OWNER = $DEFAULT_POSTERMASTER.'@'.$subdomain;
>> } else {
>>     $LIST_OWNER = $DEFAULT_POSTERMASTER;
>> }
>
>
> Besides the misspelling of POSTMASTER, I am trying to figure out the logic
> here.
Thanks you. Could you send me a version with mistake corrected ?

> Are you saying that:
> - the list owner is always set to either listmaster@DOMAIN or
> address@concealed -- no matter what the domain's config says is the
> address of the listmaster or what the list's config says is the address of
> the list-owner?
listmaster is the general listmaster for the sympa virtual host... see
http://www.sympa.org/manual/conf-parameters/part1#listmaster not per
list

>> # Redirect required addresses required by rfc
>> root|postmaster|abuse|mailer-daemon
>> # of by sympa: sympa-request|sympa-owner
>> # to list owner
>> $user =~
>> /(root|postmaster|abuse|mailer-daemon|sympa-request|sympa-owner|listowner)/;
>> if(defined($1)) {
>>     $! = 0;
>>     exec("/usr/sbin/sendmail $LIST_OWNER");
>>     exit(1);
>> }
>
>
> And mail to {root, etc.}@DOMAIN is treated as above, whether or not the
> administrators for the system are the same as the listmaster for the domain?
>  And what is this "listowner" alias?

They could not be the same. listowner is a rfc alias for abuse in case
of the domain supply mailling list.
>
>> # Redirect ARF as sympa documentation
>> if($user eq 'abuse-feedback-report') {
>>     exec('/usr/lib/sympa/lib/sympa/bouncequeue '.'sympa@'."$domain");
>>     exit(1);
>> }
>>
>> # Redirect bounce if requiered
>> if($user eq 'bounce') {
>>     exec('/usr/lib/sympa/lib/sympa/bouncequeue '.'sympa@'."$domain");
>>     exit(1);
>> }
>
> So these will loop around through Sympa, and re-enter Postfix to be
> processed via the code above?

no because postfix will redirect to this script only list.domain.org
and not domain.org. if list.domain.org is the main domain, you need to
create alias before this script in order to avoid loop.
the schema is
send to mail server -> script -> sympa -> postfix send to list suscriber

>
>> # search if address is special
>> $user =~ /(.*)-(request|editor|subscribe|unsubsribe)/;
>> if(defined($2)) {
>>     exec('/usr/lib/sympa/lib/sympa/queue '."$user".'@'."$domain");
>>     exit(1);
>> }
>>
>
> Other than the typo above ("unsubsCribe"), these are also queued or
> re-queued in the same way...

no trace postfix and will see nonloop
>
>> $user =~ /(.*)-(owner)/;
>> if(defined($2)) {
>>     exec('/usr/lib/sympa/lib/sympa/bouncequeue '."$user".'@'."$domain");
>>     exit(1);
>> }
>
> Wouldn't it make more sense for listmaster@ to be treated the same way as
> the "special" above, but without the listname, as in:
>
> if($user eq 'listmaster') {
>    exec('/usr/lib/sympa/lib/sympa/bouncequeue listmaster@'."$domain");
>    exit(1);
> }

no because per rfc these special alias should be available is list
daemon is down (think misconfiguration), so delivered directlty

thanks

Bastien




Archive powered by MHonArc 2.6.19+.

Top of Page