On Mon, Oct 21, 2013 at 01:20:25PM -0500, List wrote: > >What kind of "alias"? Are you using virtual(5) aliases via > >virtual_alias_maps, and with backend database, the database schema > >and query used as well as information about available indexes may > >be pertinent? > > > >Or are you using local aliases(5)? > > I am using a virtual alias via virtual_alias_maps. The query is > very efficient and runs sub-second.
You're forgetting that virtual expansion is *recursive*, each resulting user is then also expanded. So the initial query time is not material. Instead, split that into lines on commas, and then time "postmap -q - type:table < listfile". > >For clients feeding MTAs that expand large recipient lists, I've > >sometimes set timeouts of 1200s (or more as required). > > Which timeout setting would need be set higher? $ postconf -d | egrep -v '_tls_' | grep '^smtp_.*_timeout = ' smtp_connect_timeout = 30s smtp_data_done_timeout = 600s smtp_data_init_timeout = 120s smtp_data_xfer_timeout = 180s smtp_helo_timeout = 300s smtp_mail_timeout = 300s smtp_quit_timeout = 300s smtp_rcpt_timeout = 300s smtp_rset_timeout = 20s smtp_starttls_timeout = 300s smtp_xforward_timeout = 300s The timeout in question is: smtp_data_done_timeout = 600s > >No. Delivery happends asynchronously. However, virtual alias > >expansion (which is recursive) happens synchronously during cleanup(8) > >processing. Large lists can take time to expand, especially if your > >database is poorly indexed. > > The database query replies with a comma delimited list of aliases in > less than a second. You're forgetting recursion. -- Viktor.