On 14/12/15 12:43, Wietse Venema wrote:
> Jan Ceuleers:
>> Hi
>>
>> I'm a new Postfix user, having just switched from sendmail (which I set
>> up years ago and then forgot how).
>>
>> I want my Postfix server to locally deliver emails for my own accounts
>> and those of my housemates, but relay all others. So for example:
> 
> See "Delivering some but not all accounts locally"
> http://www.postfix.org/STANDARD_CONFIGURATION_README.html#some_local

Thank you for your reply.

I had seen that section in the docs, but I'm afraid I don't understand
it. I'm already using virtual_alias_maps; this file contains the mapping
of the email addresses I or my housemates own to local usernames. What I
need is for emails locally sent to accounts not listed in
virtual_alias_maps but within one of my virtual_alias_domains to be sent
to the relay_host rather than being rejected as undeliverable.

Here is my configuration:

/etc/postfix/main.cf
====================

smtpd_banner = $myhostname ESMTP $mail_name
biff = no

append_dot_mydomain = no

readme_directory = no

smtpd_tls_cert_file=/etc/ssl/certs/postfix.pem
smtpd_tls_key_file=/etc/ssl/private/postfix.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_security_level = may
smtpd_tls_loglevel = 1
smtpd_tls_mandatory_ciphers = high
smtpd_tls_mandatory_exclude_ciphers = aNULL, MD5
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3

myhostname = zotac.xperim.be
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = zotac.xperim.be, localhost.xperim.be, localhost,
smtpserver.xperim.be zotac
relayhost = smtp.myisp.be
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
inet_protocols = ipv4
mynetworks = 127.0.0.0/8 192.168.1.0/24 192.168.122.0/24

virtual_alias_domains = computer.org myisp.be gmail.com
virtual_alias_maps = hash:/etc/postfix/virtual
smtpd_sasl_type = dovecot
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth

smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination

local_recipient_maps =


/etc/postfix/virtual
====================
jan.ceule...@computer.org       user1
someacco...@myisp.be            user1
anotheracco...@myisp.be         user2
yetanotheracco...@gmail.com     user2
onemoreacco...@gmail.com        user1
twomoreacco...@gmail.com        user1
threemoreacco...@myisp.be       user1


Thank you.

Reply via email to