myhostname = mail.example.com
mydestination = localhost, localhost.localdomain, localhost, $myhostname
virtual_alias_maps = hash:/etc/postfix/valias.txt
transport_maps = hash:/etc/postfix/transport.txt
/etc/postfix/valias.txt:
example.com thisdoesntmatter
mailinglist@example.com mailinglist@example
@example.com example
/etc/postfix/transport.txt:
example smtp:[1.2.3.4]
# What happens:
#
# * Mail for anything@example.com is resolved to
# "example@mail.example.com" by valias.txt and
# delivered locally. This is good.
#
# * Mail for mailinglist@example.com is resolved to
# "mailinglist@example" by valias.txt and delivered
# by sending via the SMTP server at 1.2.3.4. Close,
# but I need it to be delivered as
# "mailinglist@example.com".