I'm sorry for taking everyone's time talking to myself.

I finally found a pointer to a blog post that said that every valid user needs to be in the virtual file. So I just added:

al...@abc.local al...@abc.local
b...@abc.local b...@abc.local
ca...@abc.local ca...@abc.local

along with:

@abc.local j...@abc.local

And it seems to work. The lines that map addresses to themselves seems redundant, but I can see how that keeps it from mapping to the catch-all.

I wish there was a way to specify the list just once - it would be nice to be able to use variables in the vmailbox file.

I also wish there was a way to specify "all subdomains" in the virtual file. I tried using @.abc.com, but it didn't work. I also tried adding virtual_alias_maps to parent_domain_matches_subdomains, but that didn't work either.

So if anyone knows how I can set it up to not have to list every server in the virtual file, please let me know.

Thanks!

...Ralph Johnston

Ralph Johnston wrote:
> If it helps, here is what I've tried. With this configuration, it creates new mailboxes, even for invalid users. I tried adding a line to the end of the virtual file (@abc.local j...@abc.local) as a catch-all, and it catches *all* the mail, even if sent to a valid user.
>
> /etc/postfix/virtual
> --------------------
> @srv1.abc.local @abc.local
> @localhost.abc.local @abc.local
> @localhost @abc.local
> @mail.abc.local @abc.local
> @abc.com @abc.local
> @mail.abc.com @abc.local
> @def.com @abc.local
> @mail.def.com @abc.local
>
> ad...@abc.local al...@abc.local
> rob...@abc.local b...@abc.local
>
> gr...@abc.local al...@abc.local b...@abc.local ca...@abc.local
>
>
> /etc/postfix/vmailbox
> ---------------------
> al...@abc.local alice/Maildir/
> b...@abc.local bob/Maildir/
> ca...@abc.local carol/Maildir/
> j...@abc.local junk/Maildir/
>
> postconf -n
> -----------
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> data_directory = /var/lib/postfix
> debug_peer_level = 2
> html_directory = no
> inet_interfaces = all
> local_header_rewrite_clients = permit_inet_interfaces permit_mynetworks
> local_recipient_maps =
> luser_relay = j...@abc.local
> mail_owner = postfix
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> masquerade_domains = abc.local abc.com def.com
> milter_protocol = 2
> mydestination =
> mydomain = abc.local
> myorigin = $mydomain
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-2.6.5/README_FILES
> relayhost = 192.168.0.1
> sample_directory = /usr/share/doc/postfix-2.6.5/samples
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> smtp_helo_name = mail.abc.com
> smtpd_milters = unix:/var/amavis/amavisd-milter.sock
> soft_bounce = yes
> unknown_local_recipient_reject_code = 550
> virtual_alias_domains = srv1.abc.local, localhost.abc.local, localhost, mail.abc.local, abc.com, mail.abc.com, def.com, mail.def.com
> virtual_alias_maps = hash:/etc/postfix/virtual
> virtual_gid_maps = static:504
> virtual_mailbox_base = /var/vmail
> virtual_mailbox_domains = abc.local
> virtual_mailbox_maps = hash:/etc/postfix/vmailbox
> virtual_minimum_uid = 500
> virtual_transport = dovecot:
> virtual_uid_maps = static:504
>
> Thanks!
>
>
> ...Ralph Johnston
>
> Ralph Johnston wrote:
>> I am moving our email system to Postfix, but I'm not quite able to get it to do what I want.
>>
>> I would like to "collapse" (alias?) all our domains and subdomains down to one, so email to a name @ any of our domains ends up in one mailbox. I have this working (as best as I can tell) using virtual domains.
>>
>> I would like to use virtual mailboxes, not system accounts. I think I've got this working, too, using Postfix virtual mailboxes.
>>
>> I would like to list, in one place, all the valid users; in the same (or another) place, list aliases.
>>
>> And somehow have any address not in that list get put into a catch-all mailbox. I can't get that part to work - it just creates new virtual mailboxes.
>>
>> To top it off, I'm using Dovecot deliver to allow server-side filtering using sieve.
>>
>> Postfix 2.6.5
>> Dovecot 1.2.9
>> CentOS 5.4
>>
>> Thanks!
>>
>> ...Ralph Johnston

Reply via email to