1 (edited by bTal 2012-02-29 13:08:12)

Topic: Mail saved to server, but users don't get mail

==== Provide required information to help troubleshoot and get quick answer ====
- Linux/BSD distribution name and version: CentOS release 5.7 (Final)
- iRedMail version and backend (LDAP/MySQL): v1.3.0 (MySQL)
- Any related log? Log is helpful for troubleshooting.

Feb 28 10:33:45 email amavis[3112]: (03112-05) Passed CLEAN, LOCAL [96.47.30.240] [96.47.30.240] <FD9I5H6-ZYT8-XT71T-6VCSMZ-QCXIY-H-M2-20120228-a85d7e14c65582bbaa@partylite.bounce.ed10.net> -> <####-@-####.com>, Message-ID: <950-210-FD9I5H6-ZYT8-XT71T-6VCSMZ-QCXIY-H-M2-20120228-a85d7e14c65582bbaa@e-dialog.com>, mail_id: ljyCz9-Zyhi6, Hits: -7.648, size: 18343, queued_as: A39CF86994F, dkim_id=####@emails.####.com, 8689 ms

====

I watch "tail -f /var/log/maillog" and see what looks to me like "normal" activity. Some are rejected, some are CLEAN.

Problem is that the DASHBOARD shows the server is getting emails, but I can't download them to my computer. I don't get any errors, it just acts like I don't have any email, but I can go to the DASHBOARD, click on my email address (as one of the top ten) and see dates, times and subjects of emails that I should be getting.

What process needs to be restarted or ??

Thanks,

~ bTal

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Mail saved to server, but users don't get mail

What services are running or not...

Hope this helps.

service --status-all
acpid (pid 2676) is running...
amavisd (pid 10991 10990 2968) is running...
amavis-milter is stopped
anacron is stopped
atd (pid  3279) is running...
auditd (pid  2376) is running...
automount (pid 2757) is running...
Avahi daemon is running
Avahi DNS daemon is not running
hcid (pid 2595) is running...
sdpd (pid 2599) is running...
clamd (pid 2823) is running...
conmand is stopped
Frequency scaling enabled using ondemand governor
crond (pid  3138) is running...
cupsd (pid  2789) is running...
cups-config-daemon is obsolete
dc_client is stopped
dc_server is stopped
dnsmasq is stopped
dovecot (pid  2946) is running...
dund is stopped
Fail2ban (pid 3207) is running...
Status
|- Number of jail:      4
`- Jail list:           ssh-iredmail, roundcube-iredmail, postfix-iredmail, dovecot-iredmail
Usage: /etc/init.d/firstboot {start|stop}
freshclam (pid 3147) is running...
gpm (pid  3045) is running...
hald (pid 2685) is running...
hidd (pid 2725) is running...
hpiod (pid 2774) is running...
hpssd (pid 2779) is running...
I don't know of any running hsqldb server.
httpd (pid  3129) is running...
Firewall is stopped.
Table: filter
Chain INPUT (policy DROP)
num  target     prot opt source               destination
1    fail2ban-ssh  tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:22
2    fail2ban-dovecot  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,25,465,110,995,143,993,2000
3    fail2ban-postfix  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,25,465,110,995,143,993,2000
4    fail2ban-roundcube  tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,25,465,110,995,143,993,2000
5    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
6    ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0           multiport dports 80,443,25,465,110,995,143,993,587,465,22
7    ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0
8    ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           icmp type 8

Chain FORWARD (policy DROP)
num  target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination

Chain fail2ban-dovecot (1 references)
num  target     prot opt source               destination
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0

Chain fail2ban-postfix (1 references)
num  target     prot opt source               destination
1    DROP       all  --  112.159.217.241      0.0.0.0/0
2    DROP       all  --  66.170.21.4          0.0.0.0/0
3    DROP       all  --  95.181.37.190        0.0.0.0/0
4    RETURN     all  --  0.0.0.0/0            0.0.0.0/0

Chain fail2ban-roundcube (1 references)
num  target     prot opt source               destination
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0

Chain fail2ban-ssh (1 references)
num  target     prot opt source               destination
1    RETURN     all  --  0.0.0.0/0            0.0.0.0/0

irattach is stopped
iredapd is running.
irqbalance (pid 2472) is running...
iscsid (pid  2026) is running...
iscsid (pid  2026) is running...
krb524d is stopped
mcstransd is stopped
dbus-daemon (pid 2586) is running...
multipathd is stopped
mysqld (pid 2906) is running...
netconsole module not loaded
netplugd is stopped
Configured devices:
lo eth0 eth1
Currently active devices:
lo eth0 eth1
NetworkManager is stopped
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
rpc.statd (pid  2548) is running...
nscd is stopped
ntpd (pid  2814) is running...
oddjobd is stopped
pand is stopped
pcscd (pid  2666) is running...
policyd (pid  3374) is running...
portmap (pid 2490) is running...
master (pid 3034) is running...
Process accounting is disabled.
rdisc is stopped
rpc.idmapd (pid 2571) is running...
saslauthd is stopped
Shorewall-4.0.15 Status at email.thatsite.com - Tue Feb 28 14:25:29 PST 2012

Shorewall is stopped
State:Unknown

smartd (pid 3384) is running...
spamd is stopped
openssh-daemon (pid  2502) is running...
syslogd (pid  2400) is running...
klogd (pid  2403) is running...
tcsd is stopped
Xvnc is stopped
wdaemon is stopped
wpa_supplicant is stopped
xfs (pid  3186) is running...
xinetd (pid  2802) is running...
ypbind is stopped
yum-updatesd (pid 3470) is running...

3

Re: Mail saved to server, but users don't get mail

Seems you have different maildir path in MySQL and Dovecot config file.

Could you please paste below info to help troubleshoot:

*) File: /etc/dovecot-ldap.conf (REMOVE/HIDE password before posting)
*) mail_location setting in file /etc/dovecot.conf
*) Export SQL data of this mail user with phpMyAdmin or MySQL command line. For example:

mysql> SELECT * FROM mailbox WHERE username='user@domain.ltd';

Please replace 'user@domain.ltd' by the real email address.

4

Re: Mail saved to server, but users don't get mail

It worked for months with no issues, I was looking for a locked file or a process that was stalled.

But you know best, so I'll check out what you asked for.

Thanks, I'll reply again soon.

~ bTal

5 (edited by bTal 2012-02-29 13:10:53)

Re: Mail saved to server, but users don't get mail

I can't read email with dovecot or with POP3.

POP3 is more important to me and here is the info you asked for...


**** I don't have a file: /etc/dovecot-ldap.conf

**** mail_location setting in file /etc/dovecot.conf
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/

**** Export SQL data of this mail user with phpMyAdmin or MySQL command line.

Database used was vmail

mysql> SELECT * FROM mailbox WHERE username='www@thatsite.com';
+------------------+------------------------------------+------+----------------------+-------------+---------------------------------------------+-------+----------+----------+--------------+-----------+------------+--------+------------+------------+-------------------+------------+-------------------+------------+-------------------+---------------+-----------+-------------------+--------------------------+-------------+--------------------+----------------+---------------------+---------------+-------------------+------------+---------------------+---------------------+---------------------+---------------------+--------+------------+
| username         | password                           | name | storagebasedirectory | storagenode | maildir                                     | quota | bytes    | messages | domain       | transport | department | rank   | employeeid | enablesmtp | enablesmtpsecured | enablepop3 | enablepop3secured | enableimap | enableimapsecured | enabledeliver | enablelda | enablemanagesieve | enablemanagesievesecured | enablesieve | enablesievesecured | enableinternal | lastlogindate       | lastloginipv4 | lastloginprotocol | disclaimer | passwordlastchange  | created             | modified            | expired             | active | local_part |
+------------------+------------------------------------+------+----------------------+-------------+---------------------------------------------+-------+----------+----------+--------------+-----------+------------+--------+------------+------------+-------------------+------------+-------------------+------------+-------------------+---------------+-----------+-------------------+--------------------------+-------------+--------------------+----------------+---------------------+---------------+-------------------+------------+---------------------+---------------------+---------------------+---------------------+--------+------------+
| www@thatsite.com | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | www  | /var/vmail           | vmail1      | thatsite.com/w/w/w/www-2011.11.20.12.05.37/ |   100 | 43121817 |      298 | thatsite.com |           |            | normal |            |          1 |                 1 |          1 |                 1 |          1 |                 1 |             1 |         1 |                 1 |                        1 |           1 |                  1 |              1 | 0000-00-00 00:00:00 |             0 |                   |            | 0000-00-00 00:00:00 | 2011-11-20 12:06:48 | 2011-11-20 21:52:40 | 9999-12-31 00:00:00 |      1 |            |
+------------------+------------------------------------+------+----------------------+-------------+---------------------------------------------+-------+----------+----------+--------------+-----------+------------+--------+------------+------------+-------------------+------------+-------------------+------------+-------------------+---------------+-----------+-------------------+--------------------------+-------------+--------------------+----------------+---------------------+---------------+-------------------+------------+---------------------+---------------------+---------------------+---------------------+--------+------------+
1 row in set (0.00 sec)

6

Re: Mail saved to server, but users don't get mail

I don't think I'm out of HD space...

df -all
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup01-LogVol00
                     267741664   5290616 248631144   3% /
proc                         0         0         0   -  /proc
sysfs                        0         0         0   -  /sys
devpts                       0         0         0   -  /dev/pts
/dev/cciss/c0d0p1       101086     40294     55573  43% /boot
tmpfs                  2974304         0   2974304   0% /dev/shm
none                         0         0         0   -  /proc/sys/fs/binfmt_misc
sunrpc                       0         0         0   -  /var/lib/nfs/rpc_pipefs

7

Re: Mail saved to server, but users don't get mail

bTal wrote:

**** I don't have a file: /etc/dovecot-ldap.conf

My mistake, please paste /etc/dovecot-mysql.conf.

Also, it's a good idea to turn on debug mode in Dovecot to check details. You can set 'mail_debug = yes' in /etc/dovecot.conf, then restart Dovecot service, monitor its log files:

- /var/log/dovecot.log
- /var/log/sieve.log

8

Re: Mail saved to server, but users don't get mail

If I can get POP3 working, I would be very happy. Dovecot is used 2% of the time. POP3 98%

more /etc/dovecot-mysql.conf
driver = mysql
default_pass_scheme = CRYPT
connect = host=127.0.0.1 dbname=vmail user=vmail password=xxxxxxxxxxxxx
password_query = SELECT password FROM mailbox WHERE username='%u' AND active='1'
user_query = SELECT CONCAT(mailbox.storagebasedirectory, '/', mailbox.storagenode, '/', mailbox.maildir) AS home, CONCAT('*:bytes=', mailbox.quota*1048576) A
S quota_rule FROM mailbox,domain WHERE mailbox.username='%u' AND mailbox.domain='%d' AND mailbox.enable%Ls%Lc=1 AND mailbox.domain=domain.domain AND domain.b
ackupmx=0 AND domain.active=1 AND mailbox.active=1

Thanks,

~ bTal

9

Re: Mail saved to server, but users don't get mail

I did more searching.

It seems all the incoming (outgoing works fine) emails are stuck in the queue.

postqueue -p

seems to show the emails I'm looking for (they are all from the last two days).

What controls the queue and how do I reset/restart it?

Thanks,

~ bTal

10

Re: Mail saved to server, but users don't get mail

I tried to resend the queue and got tons of this same error...

eb 29 01:30:27 email postfix/pipe[713]: 42B80869DC1: to=<xxxxx@xxxxx.org>, relay=dovecot, delay=58597, delays=58583/11/0/2.4, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:27 email postfix/pipe[662]: 56517868C07: to=<xxxxx@xxxxx.org>, relay=dovecot, delay=64012, delays=63999/5.1/0/8.3, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:27 email postfix/pipe[626]: DAAE1868FF9: to=<xxxxx@xxxxx.org>, relay=dovecot, delay=29635, delays=29621/0.03/0/14, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:27 email postfix/pipe[707]: AE5F1869C3F: to=<xxxxx@xxxxx.com>, relay=dovecot, delay=72514, delays=72501/8.8/0/4, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:27 email postfix/pipe[663]: 9833B8689FC: to=<xxxxx@xxxxx.com>, relay=dovecot, delay=26423, delays=26410/7/0/5.4, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:27 email postfix/pipe[733]: 64D178684E5: to=<xxxxx@xxxxx.com>, relay=dovecot, delay=55120, delays=55108/2.9/0/9.1, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:27 email postfix/pipe[778]: 2423C869DA9: to=<xxxxx@xxxxx.com>, relay=dovecot, delay=43294, delays=43281/5.5/0/7.5, dsn=4.3.0, status=deferred (temporary failure)
Feb 29 01:30:28 email postfix/pipe[701]: 4DE8486867B: to=<xxxx@xxxx.org>, relay=dovecot, delay=75796, delays=75782/10/0/3.6, dsn=4.3.0, status=deferred (temporary failure)

11

Re: Mail saved to server, but users don't get mail

I redefined my search and found another post in these forums (status=deferred (temporary failure)) with what sounds like the exact same problem. Sadly, there was never a solution.

Hope this helps.

~ bTal

12

Re: Mail saved to server, but users don't get mail

bTal wrote:

Feb 29 01:30:28 email postfix/pipe[701]: 4DE8486867B: to=<xxxx@xxxx.org>, relay=dovecot, delay=75796, delays=75782/10/0/3.6, dsn=4.3.0, status=deferred (temporary failure)

There's something wrong with Dovecot, please check its log file immediately. Log files are /var/log/dovecot.log and /var/log/sieve.log.