Good Day all, I am trying to get the virtual_alias_map working with my setup. I have an address h...@example.com that will go to two other address, because after all the wife has to know everything I know ;).
My pgsql query line is: select array_to_string(array_agg(destination),',') from postfix.alias_destination where alias = (select alias_id from postfix.alias_map where alias = 'h...@example.com'); This returns a comma separated list of destinations. destination ----------------------------------------- tho...@example.com,oli...@example.com postman works perfectly. I send mail h...@example.com < /etc/group and I see the following in the logs: May 24 10:01:03 helios postfix/pickup[25429]: D1DDF807AA: uid=0 from=<root> May 24 10:01:03 helios postfix/cleanup[25472]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "tho...@example.com" -- ignored May 24 10:01:03 helios postfix/cleanup[25472]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "@example.com" -- ignored May 24 10:01:03 helios postfix/cleanup[25472]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "oli...@example.com" -- ignored May 24 10:01:03 helios postfix/cleanup[25472]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "@example.com" -- ignored May 24 10:01:03 helios postfix/cleanup[25472]: D1DDF807AA: message-id=<20130524100103.d1ddf80...@helios.example.com> May 24 10:01:03 helios postfix/qmgr[25430]: D1DDF807AA: from=<r...@helios.example.com>, size=1052, nrcpt=2 (queue active) May 24 10:01:04 helios postfix/smtpd[25477]: connect from localhost[127.0.0.1] May 24 10:01:04 helios postfix/trivial-rewrite[25473]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "helios.example.com" -- ignored May 24 10:01:04 helios postfix/trivial-rewrite[25473]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "example.com" -- ignored May 24 10:01:04 helios postfix/smtpd[25477]: 3D1DF80779: client=localhost[127.0.0.1] May 24 10:01:04 helios postfix/trivial-rewrite[25473]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "example.com" -- ignored May 24 10:01:04 helios postfix/cleanup[25472]: 3D1DF80779: message-id=<20130524100103.d1ddf80...@helios.example.com> May 24 10:01:04 helios postfix/qmgr[25430]: 3D1DF80779: from=<r...@helios.example.com>, size=1645, nrcpt=2 (queue active) May 24 10:01:04 helios postfix/smtpd[25477]: disconnect from localhost[127.0.0.1] May 24 10:01:04 helios postfix/trivial-rewrite[25473]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "example.com" -- ignored May 24 10:01:04 helios postfix/trivial-rewrite[25473]: warning: table "pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf": empty lookup result for: "example.com" -- ignored May 24 10:01:04 helios amavis[24990]: (24990-03) Passed CLEAN {RelayedInbound}, <r...@helios.example.com> -> <oli...@example.com>,<tho...@example.com>, Message-ID: <20130524100103.d1ddf80...@helios.example.com>, mail_id: gx_E_LOedP5f, Hits: 1.767, size: 1052, queued_as: 3D1DF80779, 368 ms May 24 10:01:04 helios postfix/lmtp[25474]: D1DDF807AA: to=<oli...@example.com>, orig_to=<h...@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.44, delays=0.05/0.01/0/0.38, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 3D1DF80779) May 24 10:01:04 helios postfix/lmtp[25474]: D1DDF807AA: to=<tho...@example.com>, orig_to=<h...@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.44, delays=0.05/0.01/0/0.38, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 3D1DF80779) May 24 10:01:04 helios postfix/qmgr[25430]: D1DDF807AA: removed May 24 10:01:04 helios postfix/virtual[25478]: 3D1DF80779: to=<oli...@example.com>, relay=virtual, delay=0.06, delays=0.01/0.03/0/0.02, dsn=2.0.0, status=sent (delivered to maildir) May 24 10:01:04 helios postfix/virtual[25478]: 3D1DF80779: to=<tho...@example.com>, relay=virtual, delay=0.07, delays=0.01/0.03/0/0.03, dsn=2.0.0, status=sent (delivered to maildir) May 24 10:01:04 helios postfix/qmgr[25430]: 3D1DF80779: removed my postconf -n is: broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix content_filter = amavisfeed:[127.0.0.1]:10024 daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 home_mailbox = Maildir/ html_directory = no inet_interfaces = $myhostname, localhost inet_protocols = ipv4 local_recipient_maps = mail_owner = postfix mail_spool_directory = /var/spool/mail mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost myhostname = helios.example.com mynetworks = 1.1.1.19/32, 2.2.2.22/32, 127.0.0.0/8 mynetworks_style = subnet myorigin = $myhostname newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_invalid_hostname, reject_unauth_pipelining, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_rbl_client relays.ordb.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client cbl.abuseat.org, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl.spamhaus.org, permit smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_path = private/auth smtpd_sasl_security_options = noanonymous smtpd_sasl_type = dovecot unknown_local_recipient_reject_code = 550 virtual_alias_maps = pgsql:/etc/postfix/pgsql/virtual_alias_maps.cf virtual_gid_maps = static:2000 virtual_mailbox_base = /prod/mail virtual_mailbox_domains = pgsql:/etc/postfix/pgsql/virtual_mailbox_domains.cf virtual_mailbox_maps = pgsql:/etc/postfix/pgsql/virtual_mailbox_maps.cf virtual_minimum_uid = 2000 virtual_transport = virtual virtual_uid_maps = static:2000 So.. I must not understand what is happening during the cleanup and trivial-rewrite. The examples I have seen for doing this always seem to return a single address but if I were to use a hash:/etc/postfix/aliases.db it would "work" returning multiple addresses. Knowing that means I don't know enough about the actual process :( I have read the man pages but have not cracked the code open. I am missing something fundamental. Any help or sections in docs that could point me in the right direction would be appreciated….. I am guessing that my fundamental question is.. Why when the mail is destined for h...@example.com and the database spits back tho...@example.com, oli...@example.com does it attempted to do all possible iterations. I know its a config problem, just not sure where else to look after 4 hours of configuring this thing (from scratch). It could be that 24 hours no sleep makes me miss the obvious Thanks for your time and help in advance, Thomas