|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
"Virtual" config for primary domain
From: Nathanael Hoyle (nhoyle
speedexpress.net)
Date: Wed Aug 24 2005 - 12:10:16 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Greetings all. I have come across what I hope is a quick issue to fix,
but it has been giving me a real headache. What I am trying to do is
make Postfix use "virtual" style delivery and user lookups for a single
domain for which it would normally be considered to be part of
mydestination.
The scenario:
The mail server is for ISP usage. As the customer base has grown it has
become very undesirable to have a system account per customer, even with
all customer access to the box (email aside) denied. We want to have
all users exist only in a database for lookups and do maildir style
delivery to an NFS share for eventual MX load-balancing. I expected to
be able to use a fairly normal Postfix+MySQL+Courier-IMAP type of setup.
I've used this setup before quite successfully for virtual-hosted
domains. In this case however, the server's hostname will be
mail.domain.tld and needs to accept email in a *virtual* manner for
users
domain.tld rather than normal lookup and delivery via system
accounts. I'm not sure what changes I need to make to get Postfix to do
this properly, as it doesn't seem to want to let domain.tld be a virtual
domain.
Postfinger:
# sh ./postfinger
postfinger - postfix configuration on Wed Aug 24 12:07:08 CDT 2005
version: 1.30
Warning: postfinger output may show private configuration information,
such as ip addresses and/or domain names which you do not want to show
to the public. If this is the case it is your responsibility to modify
the output to hide this private information. [Remove this warning with
the --nowarn option.]
--System Parameters--
mail_version = 2.1.5
hostname = goliath
uname = Linux goliath 2.6.11-gentoo-r9nhoyle #4 SMP Tue Aug 9 20:47:32
CDT 2005 i686 Intel(R) Xeon(TM) CPU 2.66GHz GenuineIntel GNU/Linux
--Packaging information--
--main.cf non-default parameters--
alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases
broken_sasl_auth_clients = yes
default_destination_concurrency_limit = 2
home_mailbox = .maildir/
mydestination = localhost
myhostname = mail.speedexpress.net
mynetworks = 66.142.28.0/24, 64.218.249.0/24
myorigin = mail.speedexpress.net
proxy_read_maps = $local_recipient_maps $mydestination
$virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps
$virtual_mailbox_domains $relay_recipient_maps $relay_domains
$canonical_maps $sender_canonical_maps $recipient_canonical_maps
$relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_non_fqdn_hostname,
reject_non_fqdn_sender, reject_non_fqdn_recipient,
reject_unauth_destination, reject_unauth_pipelining,
reject_invalid_hostname, reject_rbl_client opm.blitzed.org,
reject_rbl_client list.dsbl.org, reject_rbl_client
bl.spamcomp.net, reject_rbl_client sbl-xbl.smaphaus.org
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_create_maildirsize = yes
virtual_gid_maps = static:207
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_mailbox_limit_maps =
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps =
proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 207
virtual_overquota_bounce = yes
virtual_uid_maps = static:207
--master.cf--
smtp inet n - n - - smtpd -v
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension}
${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
-- end of postfinger output --
I have tried several different things along the way, and so logs are
kind of muddled. Normally I've ended up either with it refusing the
mail altogether, or accepting it and then bouncing with "loops back to
myself..." message. The main thing I've tried is overriding
mydestination to be "localhost" in an attempt to get it to not try
normal treatment of domain.tld as a non-virtual domain.
Help?
--
Nathanael Hoyle
Systems and Networking
Speed Express Networks
nhoyle
speedexpress.net
432.837.2811
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]