Okay, I made the changes people have suggested, but it still doesn't work.

Recipient address rejected: User unknown in virtual alias table

Below are the files which I believe are relevant.

I for the most part understand the what the documentation tries to say, but 
there is so much I don't know still about how postfix works.

/etc/virtual
example1.com    anything
example2.org    anything
[email protected]       [email protected]
[email protected]     [email protected]

/etc/mailname
example1.com


/etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = genex.example1.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.localdomain
virtual_alias_domains =  example1.com, genex.example1.com, 
localhost.example1.com, example2.org, localhost.example2.org genex.example2.org
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

#added by Tim Legg on May 10, 2009
#http://www.debianadmin.com/debian-mail-server-setup-with-postfix-dovecot-sasl-squirrel-mail.html
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = example1.com
smtpd_recipient_restrictions = 
permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_security_options = noanonymous








--- On Thu, 6/4/09, Noel Jones <[email protected]> wrote:

> From: Noel Jones <[email protected]>
> Subject: Re: Limitations of setting mydestination with virtual domains
> To: "Tim Legg" <[email protected]>, "postfix users list" 
> <[email protected]>
> Date: Thursday, June 4, 2009, 3:52 PM
> Tim Legg wrote:
> > Thanks for the tip and the links you provided
> me.  The Standard Configuration Readme provided a lot
> of insight!
> > 
> > This is how my main.cf is set up and seems to work,
> but it is not correct according to what I read earlier.
> > 
> > /etc/postfix/main.cf
> > mydestination = example1.com, genex.example1.com,
> localhost.example1.com, localhost
> > virtual_alias_domains =  example2.org,
> localhost.example2.org genex.example2.org
> > virtual_alias_maps = hash:/etc/postfix/virtual
> 
> OK, example1.com is a local domain, example2.org is a
> virtual alias domain.
> 
> > 
> > /etc/postfix/virtual
> > [email protected] 
>   legg
> > [email protected] 
>   legg
> 
> These are user mappings.  Bare usernames in the result
> get $myorigin added to them; generally it's better to use a
> fully qualified address to prevent surprises.
> 
> > 
> > 
> > So I changed the main.cf to this
> > /etc/postfix/main.cf
> > mydestination = localhost
> > virtual_alias_domains =  example1.com,
> genex.example1.com, localhost.example1.com, example2.org,
> localhost.example2.org genex.example2.org
> > virtual_alias_maps = hash:/etc/postfix/virtual
> > 
> > Upon instating these changes, mail to [email protected]
> gets returned back.  User unknown in virtual alias
> table.
> 
> Because example1.com is now a virtual_alais_domain, and
> virtual_alias_maps rewrites [email protected]
> ==> legg ==> l...@$myorigin, which is apparently [email protected].
> All users in virtual_alias_domains must be rewritten to a
> different domain, typically a domain listed in
> mydestination.
> 
> 
> > Any suggestions how this can be set up in a way that
> is proper, robust and still delivers mail?
> 
> # main.cf
> mydestination = ... localhost.localdomain
> 
> # virtual_alias_maps
> [email protected] 
> [email protected]
> 
> In this example you can substitute some domain listed in
> mydestination for "localhost.localdomain" or literally use
> "localhost.localdomain".
> 
> 
>   -- Noel Jones
> 



Reply via email to