DevHeads.net

Postfix installation guid

Hi,

Can someone share a very good postfix 2.10 installation guide for managing
2-5million emails per day? My current postfix is unable to handle such
large volume as lot of emails are getting stuck in the incoming folder and
thus the deliveries are delayed upto 2-3 days. My current postfix
configuration is on the following platform

OS: RHELRed Hat Enterprise Linux Server release 5.4 (Tikanga) 32bit
RAM: 4GB
Postfix: postfix-2.3.3-2.1.el5_2, postfix-pflogsumm-2.3.3-2.1.el5_2 (rpms
installed which come through RHEL5.4)

Dovecot: dovecot-1.0.7-7.el5

output of postconf -n
cat /etc/transport
yahoo.com slow:yahoo.com
yahoo.co.in slow:yahoo.co.in
yahoo.co.uk slow:yahoo.co.uk
yahoo.us slow:yahoo.us
yahoo.ca slow:yahoo.ca
yahoo.fr slow:yahoo.fr
yahoogroups.com slow:yahoogroups.com
yahoo.co.nz slow:yahoo.co.nz
yahoo-inc.com slow:yahoo-inc.com
yahoo.de slow:yahoo.de
yahoo.co.kr slow:yahoo.co.kr
yahoo.es slow:yahoo.es
gmail.com gmail:gmail.com
msn.com hotmail:msn.com
hotmail.com hotmail:hotmail.com
cox.net cox:cox.net
cat /etc/postfix/virtual

#smtp1.xxxxxxdomainmail.com
smtp1.xxxxxxdomainmail.com virtual
<a href="mailto: ... at smtp1 dot xxxxxxdomainmail.com"> ... at smtp1 dot xxxxxxdomainmail.com</a> smtp1.xxxxxxdomainmail.com
#Abuse
<a href="mailto: ... at smtp1 dot xxxxxxdomainmail.com"> ... at smtp1 dot xxxxxxdomainmail.com</a> abuse
<a href="mailto: ... at smtp1 dot xxxxxxdomainmail.com"> ... at smtp1 dot xxxxxxdomainmail.com</a> smtp1
The same kind of configuration is there for my other smtp server and it
processes fine, but in case of this server it is not able to handle bulk
mails. How to resolve this issue.

Comments

Re: Postfix installation guid

By lists@rhsoft.net at 11/23/2013 - 09:21

Am 23.11.2013 13:39, schrieb Kranti Kiran Patnaik:
for that high traffic you need *exremly* fast disks
which means a RAID with as much disks as possible

i would go so far to say you need more than one MX
to spread the load

<a href="http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried" title="http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when-should-you-be-worried">http://blog.scoutapp.com/articles/2011/02/10/understanding-disk-i-o-when...</a>

Re: Postfix installation guide

By Wietse Venema at 11/23/2013 - 09:20

Kranti Kiran Patnaik:
If you are sending 2.5M/day to Uahoo etc. then you need to make
arrangements with the receiving sites. Search for the Yahoo etc.
postmaster webpages.

<a href="http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html" title="http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html">http://help.yahoo.com/l/us/yahoo/mail/postmaster/bulkv2.html</a>
<a href="http://postmaster.aol.com/" title="http://postmaster.aol.com/">http://postmaster.aol.com/</a>

etc.

Wietse

Re: Postfix installation guide

By Kranti Kiran Patnaik at 11/23/2013 - 09:59

THank You, we have filled these forms. But still we are facing delay in
delivery, can you suggest with the postconf -n output that i have shared.

Re: Postfix installation guide

By Wietse Venema at 11/23/2013 - 10:05

Kranti Kiran Patnaik:
The reason for delays is in the MAILLOG file.

Look for the breakdown of the "delays=a/b/c/d" logging.

The format of the "delays=a/b/c/d" logging is as follows:

o a = time from message arrival to last active queue entry

o b = time from last active queue entry to connection setup

o c = time in connection setup, including DNS, EHLO and STARTTLS

o d = time in message transmission

If your "c" numbers are not a fraction of a second then that is
your problem.

Wietse

Re: Postfix installation guide

By Kranti Kiran Patnaik at 11/23/2013 - 10:09

Sir,

From my logs i found some as mentioned below.
delays=3994/44/0.09/1.5,
delays=4238/0.23/0/0.02
delays=2944/48/0.01/0.01
delays=903/0.08/0/0.01
delays=4893/48/0/0.01

Please advise.

Re: Postfix installation guide

By Wietse Venema at 11/23/2013 - 10:21

Kranti Kiran Patnaik:
That is your problem. If

1) You have master.cf transports with low process limit (or low
per-destinaton concurrency),

AND

2) Those transports have c/d delays that are more than a fraction
of a second,

THEN all mail will pile up in your queue, even when some mail can
be delivered in a fraction of a second.

Wietse

Re: Postfix installation guide

By Wietse Venema at 11/23/2013 - 12:02

Wietse Venema:
See here:

default_destination_concurrency_limit = 5
default_destination_recipient_limit = 5

That is totally ridiculous. Don ot chage settings when you
are learning to use Postfix.

Wietse

Re: Postfix installation guide

By Kranti Kiran Patnaik at 11/23/2013 - 10:27

cat /etc/postfix/master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - 150 smtpd
2525 inet n - n - 150 smtpd
slow unix - - n - - smtp
gmail unix - - n - - smtp
hotmail unix - - n - - smtp
cox unix - - n - - smtp
secureserver.net unix - - n - - smtp
#cat /etc/postfix/main.cf
smtpd_milters = unix:/var/run/dkim-milter/dkim-milter.sock,
unix:/var/run/dk-milter/dk-milter.sock
non_smtpd_milters = unix:/var/run/dkim-milter/dkim-milter.sock,
unix:/var/run/dk-milter/dk-milter.sock
smtpd_banner = smtp1.conrepmail.com
smtpd_reject_unlisted_sender = yes
notify_classes = bounce, delay, resource
#maximal_queue_lifetime = 1d
virtual_alias_maps = hash:/etc/postfix/virtual
#maximal_backoff_time = 5000s
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated,
reject_unauth_destination, reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_security_options=noanonymous
transport_maps=hash:/etc/postfix/transport
smtpd_delay_reject=no
queue_run_delay = 2m
slow_concurrency_failed_cohort_limit=$slow_destination_concurrency_failed_cohort_limit
slow_destination_concurrency_failed_cohort_limit=1
slow_destination_recipient_limit=1
slow_destination_concurrency_limit=2
slow_destination_rate_delay=10s
#smtp_destination_concurrency_limit=2
gmail_destination_rate_delay=20s
hotmail_destination_rate_delay=30s
cox_destination_rate_delay=30s
gmail_destination_concurrency_limit=2
hotmail_destination_concurrency_limit=2
cox_destination_concurrency_limit=2
default_destination_concurrency_limit=5
default_destination_recipient_limit=5
#default_process_limit=150
slow_process_limit=50
gmail_destination_recipient_limit=5
gmail_process_limit=50
hotmail_destination_recipient_limit=5
hotmail_process_limit=50
cox_destination_recipient_limit=5
cox_process_limit=50
initial_destination_concurrency=2
smtpd_error_sleep_time=1s
smtpd_soft_error_limit=10
smtpd_hard_error_limit=20
secureserver.net_destination_rate_delay=30s
secureserver.net_destination_concurrency_limit=2
secureserver.net_destination_recipient_limit=1
secureserver.net_process_limit=50
Can you advise which one to change?

Re: Postfix installation guide

By Kranti Kiran Patnaik at 11/23/2013 - 10:18

I do see these kind of delays also in some lines.
delays=11656/252/0.06/0.02
delay=65892, delays=65875/14/0.15/2

Please advise.

On Sat, Nov 23, 2013 at 8:39 PM, Kranti Kiran Patnaik <

Re: Postfix installation guide

By tejas sarade at 11/23/2013 - 10:28

Mails are spending too much time in incoming queue.
May be this will help.
<a href="http://www.postfix.org/QSHAPE_README.html#incoming_queue" title="http://www.postfix.org/QSHAPE_README.html#incoming_queue">http://www.postfix.org/QSHAPE_README.html#incoming_queue</a>

On Sat, Nov 23, 2013 at 8:48 PM, Kranti Kiran Patnaik <

Re: Postfix installation guid

By tejas sarade at 11/23/2013 - 09:08

The most important thing when sorting out delay is to check logs for delay.
It will give the processing time each Postfix component spent on email.
Also check the full header of delayed mail.

Read this two manuals.

Postfix Performance tunning guide
<a href="http://www.postfix.org/TUNING_README.html" title="http://www.postfix.org/TUNING_README.html">http://www.postfix.org/TUNING_README.html</a>

Postfix Bottleneck analysis
<a href="http://www.postfix.org/QSHAPE_README.html" title="http://www.postfix.org/QSHAPE_README.html">http://www.postfix.org/QSHAPE_README.html</a>

Can you provide the current load and memory usage with current
configuration. Because I see a lot of bottleneck with this configuration.

On Sat, Nov 23, 2013 at 6:09 PM, Kranti Kiran Patnaik <

Re: Postfix installation guid

By Kranti Kiran Patnaik at 11/23/2013 - 09:24

How do i take that information from my server? I am new to this, can you
guide me. Also if possible can you provide a good postfix configuration for
my kind of setup. I am setting up a new server now with the latest postfix
stable release. DO you think the default configuration would be ok.

On Sat, Nov 23, 2013 at 7:38 PM, tejas sarade <tejas.a. ... at gmail dot com>wrote:

Re: Postfix installation guid

By tejas sarade at 11/23/2013 - 10:00

w : for load
free -m : for memory usage.

First of all keep the default configuration, later on you can optimize it.

On Sat, Nov 23, 2013 at 7:54 PM, Kranti Kiran Patnaik <

Re: Postfix installation guid

By Kranti Kiran Patnaik at 11/23/2013 - 10:02

#w
09:29:42 up 9 days, 6:48, 2 users, load average: 0.00, 0.00, 0.00

# free -m
total used free shared buffers cached
Mem: 4041 3018 1022 0 207 2415
-/+ buffers/cache: 395 3645
Swap: 6000 0 6000

FYI, currently mails are not being triggered in this server.

On Sat, Nov 23, 2013 at 8:30 PM, tejas sarade <tejas.a. ... at gmail dot com>wrote:

Re: Postfix installation guid

By tejas sarade at 11/23/2013 - 10:10

Then there is no point in collecting usage details now.
Can you tell me if the the source of the mails.

On Sat, Nov 23, 2013 at 8:32 PM, Kranti Kiran Patnaik <

Re: Postfix installation guid

By Jim Seymour at 11/23/2013 - 10:33

On Sat, 23 Nov 2013 20:40:52 +0530

For God's sake: Please learn how to trim quoted text. Thank you!

And please read this:
<a href="http://blog.zixcorp.com/2012/09/boilerplate-confidentiality-notices-in-email-why-bother/" title="http://blog.zixcorp.com/2012/09/boilerplate-confidentiality-notices-in-email-why-bother/">http://blog.zixcorp.com/2012/09/boilerplate-confidentiality-notices-in-e...</a>

Regards,
Jim

Re: Postfix installation guid

By Kranti Kiran Patnaik at 11/23/2013 - 10:12

Source of the mails is from our clients who send it to their clients for
recruitment.

On Sat, Nov 23, 2013 at 8:40 PM, tejas sarade <tejas.a. ... at gmail dot com>wrote:

Re: Postfix installation guid

By tejas sarade at 11/23/2013 - 10:19

No, I mean mails are locally generated on server, or from local network to
which server is connected, or from internet.

On Sat, Nov 23, 2013 at 8:42 PM, Kranti Kiran Patnaik <

Re: Postfix installation guid

By Kranti Kiran Patnaik at 11/23/2013 - 10:28

From local network.

On Sat, Nov 23, 2013 at 8:49 PM, tejas sarade <tejas.a. ... at gmail dot com>wrote: