On Thu, Mar 20, 2014 at 09:26:12PM +0530, KK Patnaik wrote: > I am having issue with my SMTP servers where the mails are taking long time > before the queue manager.
http://www.postfix.org/QSHAPE_README.html http://www.postfix.org/TUNING_README.html > Mar 20 10:43:55 smtp2 postfix/smtp[13548]: 25142124292D: to=<s...@gmail.net>, > relay=aspmx.l.google.com[74.125.142.26]:25, delay=29217, > delays=29775/1441/0.14/1.4, dsn=2.0.0, status=sent (250 2.0.0 OK 1395326635 > ac8si2519638icc.108 - gsmtp Is this a bounce? Or a regular outbound message. With congested queues, a single log entry is not that interesting, you need to understand the average behaviour of the queue. You MUST analyze your logs. - Where is most mail coming from? - At what rate? - Where is mail going? - At what rate? - What is the typical delivery latency (c+d in delays=a/b/c/d)? - Are you generating bounces? Too many postmaster notices? - ... Understand what your system is doing, then ask for help. > bounce_queue_lifetime = 0 > maximal_queue_lifetime = 0 These are rather unwise. Why have you disabled delivery retries? > mydomain = smtp2.oursmtpmail.com > myhostname = smtp2.oursmtpmail.com > mydestination = $myhostname, localhost.$mydomain, localhost > local_recipient_maps = Why have you disabled recipient validation? You accept and then bounce mail to invalid recipients, this congests your queue. Consider setting: # Empty, default is (effectively sub-domains of) $mydestination relay_domains = > notify_classes = bounce, delay, resource On a congested mailserver, you're far better off setting: # empty notify_classes = and monitor logs instead. > smtpd_delay_reject = no > > smtpd_client_restrictions = > permit_mynetworks, permit_sasl_authenticated, > reject_unauth_destination, reject_unknown_sender_domain > With "smtpd_delay_reject = no", there is no login, recipient or sender information at connect time, so this setting is pointless. > smtpd_recipient_restrictions = > permit_mynetworks, > permit_sasl_authenticated, > reject_unauth_destination An RBL or two might help. > smtpd_reject_unlisted_sender = yes There are no unlisted senders, because local_recipient_maps is empty, and you have no virtual_mailbox_domains. -- Viktor.