PDA

View Full Version : Postfix - SMTP takes 8-10 seconds to send


Reptile
20th April 2007, 12:31
I am running Debian 4 with postfix and am sending email from my thunderbird client.

I set up main.cf as seen below.


The problem is when I send an email from the thunderbird client the "sending message" bar takes between 8-10 seconds to send the email. The email sends just fine and is received fine but something is obviously not working 100%

I don't see any errors in the mail log so what could be the cause? My other server (running vhcs) sends smtp immediately.



smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

append_dot_mydomain = no


smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache


myhostname = server.northerner.se
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname

mydomain = $myhostname
myorigin = $mydomain
mydestination = $myhostname, /etc/postfix/virtual/domains, localhost
virtual_maps = hash:/etc/postfix/virtual/addresses

relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_error_sleep_time = 2
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/

Reptile
20th April 2007, 14:22
Just to add some extra info

doing a telnet on the port takes up to 10 seconds as well while doing telnet on port 110 is istantaneous.

maybe its a dns lookup problem but i am unsure how to fix it.

edge
20th April 2007, 14:43
Yes it's a DNS lookup problem. Login to your FTP server will probably also be slow.

http://www.howtoforge.com/forums/showthread.php?t=5407&highlight=slow+login

and: http://www.howtoforge.com/forums/search.php?searchid=422561

Reptile
20th April 2007, 14:55
yeah fixing /etc/resolv.conf did the trick. thanks.

edge
20th April 2007, 15:11
You are welcome..