Hi,

I'm setting up a new site that is going to handle all a mailing list
(with mailman, on its own domain lists.example.org) and a few aliases
@example.org.  The host is named mail1.example.org.
I successfully did it using:

----- main.cf:
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail1.example.org, localhost
relay_domains = lists.example.org
virtual_alias_maps = hash:/etc/postfix/virtual_domains
mailman_destination_recipient_limit = 1
transport_maps = hash:/etc/postfix/transport
-----

----- master.cf
mailman   unix  -       n       n       -       -       pipe
   flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
   ${nexthop} ${user}
-----

----- transport
lists.example.org   mailman:
-----

---- virtual_domains
mat...@example.org mat...@mapreri.org
f...@example.org  blablabla@gmail
f...@example.org  asdasdasd@gmail
-----

Now, this all works, but there is one thing that has been nagging me.

Backstory: I also inherited a host running exim4 that handles a few
aliases, and there I have a file /etc/exim4/aliases/example.org, and in
exim4.conf there this snippet:
----- exim4.conf
domain_aliases:
  driver = redirect
  allow_fail
  allow_defer
  domains = dsearch;/etc/exim4/aliases
  data = ${lookup{$local_part}wildlsearch{/etc/exim4/aliases/$domain}}
-----
Then the alias file is just
----- /etc/exim4/aliases/example.org
root: mat...@mapreri.org
info: root
blabla: a@b.c, d@e.f
-----
...and the like, without having @example.org at each alias line.  It's
really the same syntax of the system's /etc/aliases, but it applies only
the single virtual domain (or "virtual alias" in postfix terms, I guess).

Is it possible to have anything like that?  Also assuming in the future
this host will have to handle a separate domain, I'd prefer to have
different files for each set of aliases, and keep it tidy.


Thank you in advance for any suggestion you can give me!

-- 
regards,
                        Mattia Rizzolo

GPG Key: 66AE 2B4A FCCF 3F52 DA18  4D18 4B04 3FCD B944 4540      .''`.
more about me:  https://mapreri.org                             : :'  :
Launchpad user: https://launchpad.net/~mapreri                  `. `'`
Debian QA page: https://qa.debian.org/developer.php?login=mattia  `-

Attachment: signature.asc
Description: PGP signature

Reply via email to