View Full Version : Very high delay in receiving mail!
tennents
5th July 2007, 19:12
Hi all.
I'm using ispconfig for about 1 year without any problem.
Now I've got one!
When someone sends me an email it takes very long to reach the mailbox. :eek: (more than half an hour in the best cases!!!!)
outgoing mail goes without any problem/delay...
I've got about 10 domains with an average of 10 users each and I have the same problem in any of them.
some times ago I tried the postgrey tool, but now it's uninstalled and no greylisting option is specified in /etc/postfix/main.cf. I have
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
anyone has some hints??
Second question:
In the next future i will change the machine running ispconfig. I would like to make a fresh install, but i don't know how to move all the accounts (and its datas) from the old to the new server....
thankyou very much!!!!
How many emails do you have in the mailqueue? You can check this with:
postqueue -p
Herbert
5th July 2007, 23:18
Its not only me..
I have the same problem with 0 mails in the mailqueue
The delay is here also between 5 and 15 minutes
tennents
6th July 2007, 01:47
root@server:~# postqueue -p
Mail queue is empty
:confused:
tennents
6th July 2007, 05:42
i tried to apt-get remove --purge postfix and then reinstall the whole server following the "perfect setup". I evend deinstalled ispconfig and reinstalled it, but i still have the same problem...
tennents
6th July 2007, 05:47
/etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
delay_warning_time = 1h
# TLS parameters
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
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = server.mecbassi.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = server.mecbassi.com, localhost.mecbassi.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
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
tls_random_source = dev:/dev/urandom
disable_dns_lookups = yes
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
How long does it take when you send a email from one local account on your server to another local account?
Please do not do such things as reinstalling postfix, this may make things even wordse an break your setup.
Please post the content of /etc/resolv.conf and a excerpt of your mail.log.
tennents
6th July 2007, 12:27
root@server:~# cat /etc/resolv.conf
nameserver 192.168.5.50
nameserver 213.140.2.43
nameserver 213.140.2.49
where 192.168.5.50 is the ip of my ispconfig server and the others are the dns of my provider.
for a message from an account of one domain to one account of another domain, both on the same server, takes more than 10 minutes, when the message does not get lost... i sent e message to admin but the message is disappeared from the queue but never reached my inbox!
Thanks for your kind help!
falko
7th July 2007, 17:28
Can you try
nameserver 145.253.2.75
nameserver 193.174.32.18
in /etc/resolv.conf instead?
Can you then check with dig mx yourdomain.com that the MX records of the domains you're sending emails to are pointing to the correct server?
Also, what happens in your mail log when you send a mail to an account on your server?
What's the output of netstat -tap?
tennents
23rd August 2007, 19:01
hi all,
I just reinstalled all the server on a new machine (newer and more powerfull than the old one)...
ubuntu 6.06 following the perfect setup.
no customizations or anything else
The email are still with high delay (only incoming email, outgoing ones are in real time...)
I don't know what to do...
please help!
I use fastweb, it's an italian provider the provides a private IP, but i bought also a pubblic static ip that is natted in my cisco router to reach the ipcop-box that makes PAT the the ispconfig-box for the ports 110,25,53,80,81,445.
postqueue -p:
root@server:~# postqueue -p
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
EC6BF4DD973* 2067 Thu Aug 23 17:49:29 bronson@comm.mot.com
web2_etoxxxx@server.xxxxxxxxx.com
576794DD974* 10420 Thu Aug 23 17:50:18 burtondelp@lagg.net
web2_bexxxx@server.xxxxxxxxx.com
9A0394DD975* 3708 Thu Aug 23 17:51:28 isthemik@greencross.com
web2_arxxxx@server.xxxxxxx.com
4A9DE4DD976* 3740 Thu Aug 23 17:51:31 brody@golsong.com
web2_arxxxx@server.xxxxxxx.com
0A4934DD960* 5784 Thu Aug 23 17:51:32 denmarkwj8@buffalo.edu
web2_arxxxx@server.mxxxxxx.com
41F9F4DD962* 3692 Thu Aug 23 17:51:32 proliant@golfdelapreze.com
web2_arxxxxx@server.mxxxxxx.com
0D0CC4DD96A* 3705 Thu Aug 23 17:51:34 chief@gmcook.com
web2_arxxxxxx@server.xxxxxxxxx.com
web2_ezxxxxxx@server.xxxxxxxx.com
408244DD963* 3752 Thu Aug 23 17:51:35 ken@gonegambling.com
web2_axxxxxxx@server.xxxxxxxxxx.com
95C124DD964* 2582 Thu Aug 23 17:51:35 costacruise.com@environmentchina.com
web2_axxxxxxx@server.xxxxxxxxx.com
web2_exxxxxxxx@server.xxxxxxxx.com
65F744DD965* 757 Thu Aug 23 17:52:57 p.gabrielli@xxxxxxxxx.it
web2_axxxxxx@server.xxxxxxxxx.com
2A44D4DD967* 2496 Thu Aug 23 17:51:47 MAILER-DAEMON
web2_axxxxxx@server.xxxxxxxx.com
026BF4DD969* 6565 Thu Aug 23 17:54:37 mesquite5195@inspectorsoffice.com
web2_arcxxxxxxx@server.xxxxxx.com
C7CE14DD968* 3764 Thu Aug 23 17:51:50 fleming@globalsportsent.com
web2_arxxxxxxxx@server.xxxxxxxx.com
D82BA4DD96C* 3918 Thu Aug 23 17:51:50 crown@glacierclub.com
web2_cenxxxxxx@server.xxxxxxxx.com
20B934DD961* 6632 Thu Aug 23 17:51:55 edmumpvosie@bosbyshell.com
web2_etxxxxxxx@server.xxxxxxxx.com
C82194DD96B 3283 Thu Aug 23 17:19:43 rgmctybna@bondol.com
web2_bxxxxxxxx@server.xxxxxxxx.com
01A334DD96E 2576 Thu Aug 23 17:35:58 xxxxxxxxx@gmail.com
web2_ammixxxxxxx@server.xxxxxxxxx.com
444D54DD971 17417 Thu Aug 23 17:37:19 kunto.davie@lhl.at
web2_gaxxxxxxx@server.xxxxxxxx.com
DA15D4DD972 2912 Thu Aug 23 17:40:49 rapiderfpm7@direcpc.com
web2_xxxxxxx@server.xxxxxxx.com
1DAD14DD959 1869878 Thu Aug 23 09:37:59 xxxxxx@xxxxxxxxxxxxxxxxx.it
(connect to mail.leonferrari.com.ar[200.123.133.99]: Connection timed out)
info@leonferrari.com.ar
what can I do???
tennents
24th August 2007, 02:47
little update:
the incoming message reachs in real time the postfix queue, but then takes a while (10 minutes to half an hour!!!) to be delivered to the mailbox...:eek: :confused:
till
24th August 2007, 10:59
Please make sure that server.xxxxxxxxx.com as a valid DNS A-Record that points to the IP of your server.
tennents
24th August 2007, 12:14
yes, it has...
in the server:
dig server.xxxxxxxxxxxxx.com
; <<>> DiG 9.3.2 <<>> server.xxxxxxxxxxxx.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13135
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;server.xxxxxxxxxxxxxxx.com. IN A
;; ANSWER SECTION:
server.xxxxxxxxxxxxxxxx.com. 86400 IN A 192.168.5.50
;; AUTHORITY SECTION:
xxxxxxxxxxxx.com. 86400 IN NS server.xxxxxxxxxxxxx.com.
;; Query time: 1 msec
;; SERVER: 192.168.5.50#53(192.168.5.50)
;; WHEN: Fri Aug 24 11:08:30 2007
;; MSG SIZE rcvd: 67
where 192.168.5.50 is the ip of the server.
Digging in my pc at home gives back:
dig server.xxxxxxxxxxxx.com
; <<>> DiG 9.3.4 <<>> server.xxxxxxxxxxxxxxxxx.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56477
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;server.xxxxxxxxxxxxxxxxx.com. IN A
;; ANSWER SECTION:
server.xxxxxxxxxxxxxxxxx.com. 86263 IN A 81.xxx.xx.x
;; Query time: 7 msec
;; SERVER: 192.168.2.1#53(192.168.2.1)
;; WHEN: Fri Aug 24 11:07:53 2007
;; MSG SIZE rcvd: 53
i don't think that the problem is in the dns, cause the message from outside (i.e. gmail) reaches the queue immediatly after being sent... but then stays in the quele for long time before reaching the mailbox... the delay in inside the server...
till: are you available to "commercial" support?
Jcorrea920
10th September 2007, 21:48
Tennants said:
The email are still with high delay (only incoming email, outgoing ones are in real time...)
I have the same problem and I have had it for quite sometime. Although sometime emails don't arrive in mailbox until after 12 hours. It's not a dns problem like Till suggested. What's going on? Any updates?
till
10th September 2007, 21:59
Check the load on your server, if its high, switch to clamd instead of clamscan antivirus scanning.
Jcorrea920
10th September 2007, 22:59
On 10th September 2007 11:59
till said:
Check the load on your server, if its high, switch to clamd instead of clamscan antivirus scanning.
Till load is not a problem. When I run top every service is running average about 0.1% CPU with spurts of 1-3% CPU on some requests. I am running version 2.2.13 on this server. The others are running 2.2.12. I will plan to upgrade soon. But I don't think that is the issue. Although there have been some issues with ntpd, ntpdate, and just syncing the date with a stable time server. I have it running a cron job every 10 minutes ntpdate to time server. I have ntpd stopped. Otherwise the time gets behind quite a bit. Could this be the issue?
till
11th September 2007, 08:58
ISPConfig is just writing config files, it is not a MTA. So if you use 2.2.12, 2.2.13 or 2.2.16 does not make a difference.
Please post the log lines from a typical delayed email.
Jcorrea920
13th September 2007, 05:15
Sep 12 18:52:02 ccs06 postfix/smtpd[11938]: warning: 121.56.114.91: address not listed for hostname 91.114.56.121.broad.cf.nm.dynamic.163data.com.cn
Sep 12 18:52:02 ccs06 postfix/smtpd[11938]: connect from unknown[121.56.114.91]
Sep 12 18:52:02 ccs06 postfix/smtpd[11938]: lost connection after CONNECT from unknown[121.56.114.91]
Sep 12 18:52:02 ccs06 postfix/smtpd[11938]: disconnect from unknown[121.56.114.91]
Sep 12 18:52:14 ccs06 postfix/smtpd[11948]: connect from pc-135-162-83-200.cm.vtr.net[200.83.162.135]
Sep 12 18:52:19 ccs06 sendmail[11956]: l8D1psKW011956: from=web3_username, size=117, class=0, nrcpts=1, msgid=<200709130151.l8D1psKW011956@ccs06.ourdomain.com>, relay=web3_username@localhost
Sep 12 18:52:19 ccs06 postfix/smtpd[11938]: connect from localhost.localdomain[127.0.0.1]
Sep 12 18:52:19 ccs06 postfix/smtpd[11938]: setting up TLS connection from localhost.localdomain[127.0.0.1]
Sep 12 18:52:19 ccs06 postfix/smtpd[11938]: TLS connection established from localhost.localdomain[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Sep 12 18:52:19 ccs06 sendmail[11956]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Sep 12 18:52:19 ccs06 postfix/smtpd[11938]: E4075345919: client=localhost.localdomain[127.0.0.1], sasl_sender=web3_username@ccs06.ourdomain.com
Sep 12 18:52:19 ccs06 postfix/cleanup[11940]: E4075345919: message-id=<200709130151.l8D1psKW011956@ccs06.ourdomain.com>
Sep 12 18:52:19 ccs06 postfix/qmgr[28863]: E4075345919: from=<web3_username@ccs06.ourdomain.com>, size=821, nrcpt=1 (queue active)
Sep 12 18:52:20 ccs06 sendmail[11956]: l8D1psKW011956: to=admispconfig@localhost.localdomain, ctladdr=web3_username (10034/10003), delay=00:00:26, xdelay=00:00:01, mailer=relay, pri=30117, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as E4075345919)
Sep 12 18:52:20 ccs06 postfix/smtpd[11938]: disconnect from localhost.localdomain[127.0.0.1]
Sep 12 18:52:20 ccs06 postfix/local[11973]: E4075345919: to=<admispconfig@localhost.localdomain.ourdomain.com>, relay=local, delay=0.4, delays=0.07/0.04/0/0.29, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Sep 12 18:52:20 ccs06 postfix/qmgr[28863]: E4075345919: removed
Sep 12 18:52:23 ccs06 postfix/smtpd[11948]: E2454345919: client=pc-135-162-83-200.cm.vtr.net[200.83.162.135]
Sep 12 18:52:29 ccs06 postfix/cleanup[11940]: E2454345919: message-id=<7678434351.20070913015323@globalsatla.com>
Sep 12 18:52:29 ccs06 postfix/qmgr[28863]: E2454345919: from=<rcasamajo@globalsatla.com>, size=3650, nrcpt=1 (queue active)
Sep 12 18:52:32 ccs06 postfix/smtpd[11948]: E945434591A: client=pc-135-162-83-200.cm.vtr.net[200.83.162.135]
Sep 12 18:52:38 ccs06 postfix/cleanup[11940]: E945434591A: message-id=<5254106458.20070913015333@goodisp.com>
Sep 12 18:52:38 ccs06 postfix/qmgr[28863]: E945434591A: from=<tward@goodisp.com>, size=3597, nrcpt=1 (queue active)
Sep 12 18:52:38 ccs06 postfix/local[11999]: E945434591A: to=<root@ccs06.ourdomain.com>, orig_to=<mail@ourdomain.com>, relay=local, delay=7.2, delays=7.1/0.04/0/0.04, dsn=2.0.0, status=sent (delivered to maildir)
Sep 12 18:52:38 ccs06 postfix/qmgr[28863]: E945434591A: removed
Sep 12 18:52:44 ccs06 postfix/smtpd[11948]: 160CD34591A: client=pc-135-162-83-200.cm.vtr.net[200.83.162.135]
Sep 12 18:52:50 ccs06 postfix/cleanup[11940]: 160CD34591A: message-id=<5475876174.20070913015345@gladswood.com.au>
Sep 12 18:52:50 ccs06 postfix/qmgr[28863]: 160CD34591A: from=<samuraiman@gladswood.com.au>, size=3614, nrcpt=1 (queue active)
Sep 12 18:52:54 ccs06 sendmail[11988]: l8D1qTGW011988: from=web3_username, size=117, class=0, nrcpts=1, msgid=<200709130152.l8D1qTGW011988@ccs06.ourdomain.com>, relay=web3_username@localhost
Sep 12 18:52:54 ccs06 postfix/smtpd[11938]: connect from localhost.localdomain[127.0.0.1]
Sep 12 18:52:54 ccs06 postfix/smtpd[11938]: setting up TLS connection from localhost.localdomain[127.0.0.1]
Sep 12 18:52:54 ccs06 postfix/smtpd[11938]: TLS connection established from localhost.localdomain[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Sep 12 18:52:54 ccs06 sendmail[11988]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Sep 12 18:52:54 ccs06 postfix/smtpd[11938]: EADC734591B: client=localhost.localdomain[127.0.0.1], sasl_sender=web3_username@ccs06.ourdomain.com
Sep 12 18:52:55 ccs06 postfix/cleanup[11940]: EADC734591B: message-id=<200709130152.l8D1qTGW011988@ccs06.ourdomain.com>
Sep 12 18:52:55 ccs06 sendmail[11988]: l8D1qTGW011988: to=admispconfig@localhost.localdomain, ctladdr=web3_username (10034/10003), delay=00:00:26, xdelay=00:00:01, mailer=relay, pri=30117, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as EADC734591B)
Sep 12 18:52:55 ccs06 postfix/qmgr[28863]: EADC734591B: from=<web3_username@ccs06.ourdomain.com>, size=821, nrcpt=1 (queue active)
Sep 12 18:52:55 ccs06 postfix/smtpd[11938]: disconnect from localhost.localdomain[127.0.0.1]
Sep 12 18:52:55 ccs06 postfix/local[11999]: EADC734591B: to=<admispconfig@localhost.localdomain.ourdomain.com>, relay=local, delay=0.59, delays=0.07/0/0/0.52, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Sep 12 18:52:55 ccs06 postfix/qmgr[28863]: EADC734591B: removed
Sep 12 18:52:58 ccs06 postfix/smtpd[11948]: disconnect from pc-135-162-83-200.cm.vtr.net[200.83.162.135]
Sep 12 18:53:06 ccs06 postfix/smtpd[11938]: connect from ccs05.ourdomain.com[x . x . 43.50]
Sep 12 18:53:06 ccs06 postfix/smtpd[11938]: disconnect from ccs05.ourdomain.com[x . x . 43.50]
Sep 12 18:53:24 ccs06 dovecot: pop3-login: Aborted login: rip=::ffff:x . x . 43.50, lip=::ffff:x . x . 43.185
Sep 12 18:54:07 ccs06 postfix/local[11941]: 84D3A345918: to=<web3_username@ccs06.ourdomain.com>, orig_to=<support@ourdomain.com>, relay=local, delay=133, delays=0.04/0.01/0/133, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail -f-)
Sep 12 18:54:07 ccs06 postfix/qmgr[28863]: 84D3A345918: removed
Sep 12 18:54:15 ccs06 dovecot: pop3-login: Aborted login: rip=::ffff:x . x .180.142, lip=::ffff:x . x . 43.185
Notice the delay. In actuallity it takes much longer than the time stated in the logs. What do you think it may be?
falko
14th September 2007, 18:24
What's in /etc/postfix/main.cf?
Jcorrea920
14th September 2007, 22:30
Took the comments out.
/etc/postfix/main.cf :
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
inet_interfaces = all
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
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
mynetworks = 127.0.0.0/8
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
home_mailbox = Maildir/
mailbox_command =
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
falko
15th September 2007, 17:18
Looks ok.
Maybe it has something to do with name resolution. What's in /etc/resolv.conf?
Jcorrea920
20th September 2007, 01:19
Falko,
When I run top I noticed that clamscan is using up 98% of CPU in two services/jobs. Does this mean anything?
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2167 web3_user 25 0 14412 8932 996 R 49.5 1.7 0:29.89 clamscan
2185 web3_user 25 0 14280 8900 996 R 47.8 1.7 0:28.93 clamscan
10th September 2007 11:59
till:
Check the load on your server, if its high, switch to clamd instead of clamscan antivirus scanning.
Sorry Till you were right all along. I guess when I ran top that time there was no email traffic at that time. So how was I supposed to know. This could be exactly why it slows everything down. Is there a way to switch to clamd?
Thanks for your help. Falko & Till
UPDATE: found solution for Fedora similar to Centos:
http://www.howtoforge.com/forums/showthread.php?t=12864&highlight=clamd
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.