On 11/23/2010 12:48 PM, Andrew Beverley wrote:
On Sun, 2010-11-21 at 16:50 -0500, Jerrale G wrote:
On 11/21/2010 4:40 PM, Andrew Beverley wrote:
Hi,
I have noticed that my Postfix (version 2.3.8) is performing a
virtual_alias_maps mysql database query for every email that it is
processing, even if the domain is not listed in virtual_alias_domains.
So for example, I have andybev.com in virtual_alias_domains and a
database query set up for virtual_alias_maps. When I send an email
*from* the server to an external email address, then that recipient (eg
joeblo...@hotmail.com) gets looked up in the virtual_alias_maps database
query first before it is delivered.
Is this normal? This doesn't seem right, so I am thinking that there is
something wrong with my configuration (all of the thousands of outbound
emails are causing database lookups).
Thanks,
Andy
You have outgoing mail being processed by smtpd where it is suppose to
be processed by smtp.
I would tell you how you did this but you didnt include your postconf -n
The above statement is nonsense. Ignore it.
Thanks for the reply. I have copied the output from postconf -n as well
as master.cf below (a few things removed). I am using dkim-filter to
sign outgoing messages with DKIM - could this be the reason that I am
using smtpd?
There is nothing significant wrong with your config -- postfix
is working correctly and performing the queries required.
My only suggestion is to be careful what you put in the
"access" table under smtpd_recipient_restrictions so you don't
inadvertently become an open relay.
http://www.postfix.org/SMTPD_ACCESS_README.html#danger
-- Noel Jones
postconf -n:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases, regexp:/etc/postfix/aliases-regexp
allow_min_user = yes
alternate_config_directories = /etc/postfix-174
command_time_limit = 5000
config_directory = /etc/postfix
default_privs = simple
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = /usr/share/doc/postfix-2.3.3/html
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 20480000
milter_connect_macros = i b j _ {daemon_name} {if_name} {if_addr}
milter_default_action = accept
milter_mail_macros = {auth_author} {auth_type} {auth_authen}
mydestination = $myhostname, localhost.$mydomain, localhost, mx1.$mydomain,
ns1.$mydomain, www.$mydomain, root.$mydomain
newaliases_path = /usr/bin/newaliases
non_smtpd_milters = unix:/var/run/dkim-filter/dkim-filter.sock
parent_domain_matches_subdomains =
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
smtpd_authorized_verp_clients = $mynetworks
smtpd_client_restrictions = permit_sasl_authenticated reject_rbl_client
zen.spamhaus.org
smtpd_helo_required = yes
smtpd_helo_restrictions = reject_invalid_helo_hostname
reject_non_fqdn_helo_hostname
smtpd_milters = unix:/var/run/clamav/milter.ctl
unix:/var/spool/postfix/spamass/spamass.sock
unix:/var/run/dkim-filter/dkim-filter.sock
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/access,
reject_unknown_sender_domain, permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination,reject_unauth_pipelining
smtpd_restriction_classes = restrict_smtp_ip
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = /etc/postfix/virtual-domains
virtual_alias_maps = hash:/etc/postfix/virtual,
regexp:/etc/postfix/virtual-regexp, mysql:/etc/postfix/mysql-global-aliases.cf,
mysql:/etc/postfix/mysql-bounce-aliases.cf,
mysql:/etc/postfix/mysql-majordomo-aliases.cf,
mysql:/etc/postfix/mysql-aliases.cf
master.cf:
smtp inet n - n - - smtpd
submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_sasl_auth_enable=yes
-o
smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - n 1000? 1 tlsmgr
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
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
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
retry unix - - n - - error
Thanks,
Andy