Ok, so I have been working on your suggestions all morning.  I
switched from virtual_mailbox_domains, to virtual_alias_maps, since
dbmail will take care of the delivery for me.  But I am still having
problems, I can e-mail users and their aliases with no problems,
[EMAIL PROTECTED] -> [EMAIL PROTECTED], but when I try to send an e-mail
to an aliased domain, foo.bar.uk, I get a "550 Recipient address
rejected: User unknown in virtual alias table; "  All of my users are
in the [EMAIL PROTECTED] format since I am migrating from vpopmail.
I tried setting an alias in the dbmail_aliases table: 
@foo.bar deliver_to @foo.bar.uk
and
[EMAIL PROTECTED] deliver_to [EMAIL PROTECTED]

Neither work.

I already have all of my domains listed in mydestination.  I was using
the recommended sql-recipients.cf from the dbmail docs.  Still no
luck.  At this point, I have made so many changes to my main.cf, that
I am running out of numbers for revisions.  Here is what I am
currently working with:


main.cf:
alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
debug_peer_list = 127.0.0.1
header_checks = regexp:/etc/postfix/header_checks
html_directory = no
mail_owner = postfix
mailbox_transport = dbmail-lmtp:localhost:24
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = localhost, ozone.foo.bar $virtual_alias_domains
mydomain = foo.bar
myhostname = foo.bat
mynetworks = 127.0.0.0/8
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5-r2/readme
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_recipient_restrictions = reject_non_fqdn_sender,
reject_non_fqdn_recipient, reject_unlisted_recipient,
reject_unknown_sender_domain, reject_unknown_recipient_domain,
permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination, reject_unlisted_recipien,
reject_unauth_pipelining, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/ozone.pem
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/ssl/ozone.crt
smtpd_tls_key_file = /etc/postfix/ssl/ozone.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
virtual_alias_domains = foo.bar foo.bar.uk
virtual_alias_maps = mysql:/etc/postfix/virtual_aliases.cf

virtual_aliases.cf:

user = dbmail
password = mypw
hosts = localhost
dbname = dbmail
table = dbmail_aliases
select_field = alias
where_field = alias


With the above config, postfix will reject a mail to an aliased domain.

Reply via email to