Web Tool Bag  
Home · Articles · Downloads · Discussion Forum · Web Links · News Categories · Synonyms DatabaseMarch 28 2024 11:20:34
Navigation
Home
Articles
Downloads
Discussion Forum
Web Links
News Categories
Synonyms Database
Search
Users Online
Guests Online: 2
No Members Online

Registered Members: 856
Unactivated Members: 118
Newest Member: lakim
Forum Threads
Newest Threads
Error: Cannot find m...
Uncaught Error: _reg...
Module build failed:...
Installation
mochi script questions
Hottest Threads
Installation [12]
Any questions and... [5]
Captcha picture d... [4]
Integrate with Vi... [4]
Mods: Sucess/Than... [4]
 
Latest Articles
Ubuntu: the vpn conn...
Howto Install HP Pri...
ReactJS progress met...
react-show-more-text
react-collapsible-co...
Howto setup postfix on Debian

Install Packages

> apt-get install postfix postfix-tls postfix-pcre

Aliases

Normally, sympa requires several aliases for each list in order to pipe different addresses to different commands. This can only be done in non-virtual alias file, so a little trickiery is needed to map the virtual aliases to non-virtual aliases.
We take this one step further by using regular expression based virtual aliases so that all we need is one set of entries per domain. You cannot use this method if your list server is not set up for virtual domains.
/etc/postfix/main.cf:
virtual_maps = regexp:/etc/postfix/virtual.regexp
recipient_delimiter = +

The recipient_delimiter of '+' is the default, but it is required for the trick to work so we set it explicitly.
/etc/postfix/aliases:
mydomain:              "| /home/sympa/bin/queue $EXTENSION@my.domain.org"
mydomain-request:      "| /home/sympa/bin/queue "EXTENSION-request@my.domain.org"
mydomain-editor:       "| /home/sympa/bin/queue $EXTENSION-editor@my.domain.org"
mydomain-owner:        "| /home/sympa/bin/bouncequeue $EXTENSION@my.domain.org"
mydomain-subscribe:    "| /home/sympa/bin/queue $EXTENSION-subscribe@my.domain.org"
mydomain-unsubscribe:  "| /home/sympa/bin/queue $EXTENSION-unsubscribe@my.domain.org"

What does this do? Lets look at the first line: It takes the address 'mydomain' and pipes it to the command "|/queue $EXTENSION@my.domain.org". But what does $EXTENSION equal? This variable will hold our list name. In order to set the $EXTENSION variable to the list name, we use a + to add an additional recipient in the virtual aliases file.
Suppose we had the virtual alias:
mylist@my.domain.org mydomain+mylist
This would forward mail sent to mylist@my.domain.org to the local address mydomain with the additional recipient of 'mylist'. When we resolve the address 'mydomain' in the aliases file, the variable $EXTENSION will then be set to 'mylist'.
Instead of creating a virtual alias like this for each list, we use regular expressions to cover all lists.
/etc/postfix/virtual.regexp:
/^my\.domain\.org$/           xxx
/^(postmaster|root|abuse)@my\.domain\.org$/   $1@otherdomain.org
/^(.*)-(request|editor|owner|subscribe|unsubscribe)@my\.domain\.org$/ mydomain-$2+$1
/^(.*)@my\.domain\.org$/      "mydomain+$1"

The first line just tells postfix we are handling mail for the virtual domain my.domain.org. The xxx is just a placeholder, but it is required. The second line catches important addresses which we do not want processed as lists. You can forward these non-list addresses to another domain or use the same domain. The third line is where it gets interesting. Here is an example of how this expression will resolve:
mylist-subscribe@my.domain.org mydomain-subscribe+mylist mylist-owner@my.domain.org mydomain-owner+mylist
The forth line will resolve like this:
mylist@my.domain.org mydomain+mylist
Which is what we need for the alias file we have set up.
Note the difference between my.domain.org and mydomain. The first is the actual domain. The second is an arbitrary tag which we have chosen to associate with the domain.
To make sure that postfix can handle the regular expression map type:
> postconf -m

This will give you a list of supported map types. Check for "regexp".
This alias setup is adapted from the mailman+postfix setup described at listes.rezo.net/how.php.

Exim

reportedly, this in exim will do the same thing:
Routers:
sympa_user:
        driver = accept
        domains = scooter.mupp.net
        local_parts = sympa
        transport = sympa_pipe

sympa:
        driver = accept
        require_files = /home/sympa/expl/$local_part
        transport = sympa_pipe



sympa_special:
        driver = accept
        transport = sympa_special_pipe
        local_part_suffix  =  -request : -editor : -unsubscribe
        require_files = /home/sympa/expl/$local_part

sympa_subscribe:
        driver = accept
        transport = sympa_subscribe_pipe
        local_part_suffix  =  -subscribe
        require_files = /home/sympa/expl/$local_part

sympa_owner_bounce:
        driver = accept
        transport = sympa_owner_bounce_pipe
        local_part_suffix = -owner
        require_files = /home/sympa/expl/$local_part

sympa_bounce:
        driver = accept
        local_part_prefix = bounce+
        transport = sympa_bounce_pipe


Transports:
sympa_pipe:
        driver = pipe
        command = "/home/sympa/bin/queue $local_part"
        return_path_add
        delivery_date_add
        envelope_to_add
        user = nobody
        group = nogroup

sympa_special_pipe:
        driver = pipe
        command = "/home/sympa/bin/queue $local_part$local_part_suffix"
        return_path_add
        delivery_date_add
        envelope_to_add
        user = nobody
        group = nogroup

sympa_subscribe_pipe:
        driver = pipe
        command = "/home/sympa/bin/queue
$local_part$local_part_suffix@$domain@$domain"
        return_path_add
        delivery_date_add
        envelope_to_add
        user = sympa
        group = sympa

sympa_owner_bounce_pipe:
        driver = pipe
        command = "/home/sympa/bin/bouncequeue $local_part@$domain"
        return_path_add
        delivery_date_add
        envelope_to_add
        user = sympa
        group = sympa

sympa_bounce_pipe:
        driver = pipe
        command = "/home/sympa/bin/bouncequeue sympa@scooter.mupp.net"
        return_path_add
        delivery_date_add
        envelope_to_add
        user = nobody
        group = nogroup

Posted by admin on December 06 2006 14:01:15 11638 Reads · Print
Ratings
Rating is available to Members only.

Please login or register to vote.

No Ratings have been Posted.
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Member Poll
Which PHP framework do you preffer?

Symfony

Zend

CodeIgniter

PHP on TRAX

eZ Components

Fusebox

PhpOpenbiz

Prado

QPHP

Seagull

You must login to vote.
Shoutbox
You must login to post a message.

Vince
03/10/2011 18:17
Hi, How to remove Register from Login screen? I don't want them to register and have full access! if you leave register then they should not have any rights until the admin assigns them

webtoolz
26/09/2011 08:28
Please describe your problem with more details. Thank you.

bimmer98
22/11/2010 18:31
Help. There was a problem with the request; error regarding feedbackzdr form program

Custom web software development by Devzone Tech
Copyright © 2024 - www.webtoolbag.com