> > > When I send some test mails I can see that most of processing time is > spent > > on: > > SMTP DATA: 37 (34%)38 > > fwd-connect: 17 (15%)77 > > > Is there a way to improve these timings or is it OK? > > The figures are pretty much normal, as Gary and Mike noted. > > The SMTP DATA transfer needs to deal with input, one line at a time > unfortunately, because SMTP protocol requires dot-destuffing, and > timer is supposed to be reset for each line (as decent MTA does it). > > You could shave off a millisecond or two by the following change > (which is in my current code, to be in the next version): > > --- amavisd.orig 2007-06-27 12:43:00.000000000 +0200 > +++ amavisd 2007-11-04 23:39:30.000000000 +0100 > @@ -13940,8 +13940,8 @@ > for ($! = 0; defined($ln=<$sock>); $! = 0) { # optimized for > speed > alarm($smtpd_timeout); # as fast as: last if time>$tmax; > - if ($ln =~ /^\./) { > + if (substr($ln,0,1) eq '.') { # faster than $ln=~/^\./ > if ($ln eq ".\015\012") > { $complete = 1; $within_data_transfer = 0; last } > - $ln =~ s/^\.(.+\015\012)\z/$1/s; # dot de-stuffing, > rfc2821 > + substr($ln,0,1) = ''; # dot de-stuffing, rfc2821 > } > $size += length($ln); # message size is defined in rfc1870 > > Also, you can relatively safely comment out the: alarm($smtpd_timeout); > which is mostly useful when a feed is slow, which does not happen in a > normal post-queue setup with Postfix. This will cut a few milliseconds > more of a SMTP DATA section. And make sure the size limit in amavisd is > not enabled ($smtpd_message_size_limit and @message_size_limit_maps, > both are disabled by default). > > The fwd-connect section is governed almost entirely by a Postfix time to > respond > to a new SMTP session on port 10025. Things like > smtpd_client_restrictions, > and DNS resolving of a loopback interface address may have some effect > there. > But it is mostly an idle latency, CPU can be used meanwhile for some other > task. > > Mark >
Thanks guys for your responses, The test messages I've sent consists of only one line "test message". I understand that the numbers I'm getting are pretty normal, but I've read on the list one of Marks' responses and he says that most of check *_restrictions should be disabled on smtpd at port 10025 (http://www.webservertalk.com/archive390-2006-2-1396006.html). This is what I have in master.cf: 127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o local_recipient_maps= -o relay_recipient_maps= -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o strict_rfc821_envelopes=yes -o smtpd_error_sleep_time=0 -o smtpd_soft_error_limit=1001 -o smtpd_hard_error_limit=1000 -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks Should I disable the following restrictions, i.e. delete these lines to improve fwd-connect timings? Is it safe to disable those? -o smtpd_restriction_classes= -o smtpd_client_restrictions= -o smtpd_helo_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject Best Regards, Leon Kolchinsky ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/