1

Topic: E-mails lost

One of our users seems to lose his emails.

Iredmail is configured to forward his emails to a gmail account and his local account, on the gmail account the email is received but it is not received on the local server.

His email account also keeps telling me there is 6,2 MB of emails in his mailbox but when logging in to roundcube it tells me there are no emails at all.

I have allready deleted the entire domain and recreated it but this didn't solve the problem.

----

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

2

Re: E-mails lost

May I know how you configure forwarding address for this user? Any related log in Postfix/Dovecot when he/she received an email?

3

Re: E-mails lost

I've configured it using forwarding in the user control panel.
I've used the option with saving a copy in the users mailbox.

I've included part of the maillog where for an e-mail that is lost.
It's the email to robert.

4

Re: E-mails lost

Any idea on how this is possible?

5

Re: E-mails lost

Any related Postfix mail log about this issue?

6

Re: E-mails lost

ZhangHuangbin wrote:

Any related Postfix mail log about this issue?

Nothing in the postfix log related to this problem

7

Re: E-mails lost

Zhang,

Do you have any ideas, we are losing e-mails from customers and this is, of course, a big problem.

Hope to hear from you soon.

8

Re: E-mails lost

I'm so sorry that i cannot help without related log.

luxus wrote:

His email account also keeps telling me there is 6,2 MB of emails in his mailbox but when logging in to roundcube it tells me there are no emails at all.

What do you mean "telling me there is 6,2 MB of emails in his mailbox"? Where did you see it?

Could you please export account info to help troubleshoot? REMOVE password info before posting:

- If you store mail accounts in OpenLDAP, please export LDIF data of this account with iRedAdmin-Pro-LDAP or phpLDAPadmin. With iRedAdmin-Pro-LDAP, you can get LDIF data of this mail account in user profile page, under tab "General".

- If you store mail accounts in MySQL, please paste output of below SQL commands (replace 'user@domain.ltd' by the real email address when executing commands):

mysql> select * from alias where address='user@domain.ltd';
mysql> select * from mailbox where username='user@domain.ltd';

9 (edited by luxus 2012-01-10 22:03:39)

Re: E-mails lost

ZhangHuangbin wrote:

I'm so sorry that i cannot help without related log.

luxus wrote:

His email account also keeps telling me there is 6,2 MB of emails in his mailbox but when logging in to roundcube it tells me there are no emails at all.

What do you mean "telling me there is 6,2 MB of emails in his mailbox"? Where did you see it?

Could you please export account info to help troubleshoot? REMOVE password info before posting:

- If you store mail accounts in OpenLDAP, please export LDIF data of this account with iRedAdmin-Pro-LDAP or phpLDAPadmin. With iRedAdmin-Pro-LDAP, you can get LDIF data of this mail account in user profile page, under tab "General".

- If you store mail accounts in MySQL, please paste output of below SQL commands (replace 'user@domain.ltd' by the real email address when executing commands):

mysql> select * from alias where address='user@domain.ltd';
mysql> select * from mailbox where username='user@domain.ltd';

In the attachment I've included print screens of the quota page and roundcube where it says the mailbox is 16% full with a quota of 100MB, But in roundcube on the lower right it says 'Mailbox is leeg (Mailbox is empty)'

I've also included the ldif export

10

Re: E-mails lost

Screenshot of Roundcube webmail helps a lot.
Seems Dovecot didn't create all necessary IMAP folders for this account. Could you please check below mailbox on file system to see whether it contains correct/necessary IMAP folders?

# ls -R /home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/

It may contain a long list, you can save them in a plain text file and attach in the post.

11

Re: E-mails lost

ZhangHuangbin wrote:

Screenshot of Roundcube webmail helps a lot.
Seems Dovecot didn't create all necessary IMAP folders for this account. Could you please check below mailbox on file system to see whether it contains correct/necessary IMAP folders?

# ls -R /home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/

It may contain a long list, you can save them in a plain text file and attach in the post.


output of the command:

/home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/:
Maildir

/home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/Maildir:
cur  dovecot.index  dovecot.index.cache  dovecot.index.log  dovecot-uidlist  dovecot-uidvalidity  dovecot-uidvalidity.4eee61ab  new  tmp

/home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/Maildir/cur:

/home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/Maildir/new:

/home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/Maildir/tmp:

12

Re: E-mails lost

Sorry, i forgot '-a' argument. Please try it again:

# ls -aR /home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/

13

Re: E-mails lost

ZhangHuangbin wrote:

Sorry, i forgot '-a' argument. Please try it again:

# ls -aR /home/vmail/vmail1/asagroep.nl/robert.goossens-2011.12.18.22.52.47/

It only adds . and .. to the directories

14

Re: E-mails lost

That means you don't have emails in the mailbox. i'm confused why Roundcube shows incorrect quota usage.
Did you try other mail clients? e.g. Thunderbird.

Please post output of command "postconf -n" to help troubleshoot.

15

Re: E-mails lost

ZhangHuangbin wrote:

That means you don't have emails in the mailbox. i'm confused why Roundcube shows incorrect quota usage.
Did you try other mail clients? e.g. Thunderbird.

Please post output of command "postconf -n" to help troubleshoot.

When the emails arrive they are forwarded to the local user account and to a gmail account.
The email does arrive at gmail but when connecting to pop3 with outlook the email is never received and as you can see the email is also not available at roundcube.

Command output:

]# postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
delay_warning_time = 0h
disable_vrfy_command = yes
enable_original_recipient = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_name = iRedMail
mail_owner = postfix
mail_version = 0.6.0
mailbox_command = /usr/libexec/dovecot/deliver
mailbox_size_limit = 20480000
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_backoff_time = 4000s
maximal_queue_lifetime = 1d
message_size_limit = 20480000
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = [removed]
myhostname = [removed]
mynetworks = 127.0.0.0/8,192.168.10.0/24
mynetworks_style = subnet
myorigin = [removed]
newaliases_path = /usr/bin/newaliases.postfix
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
queue_directory = /var/spool/postfix
queue_run_delay = 300s
readme_directory = /usr/share/doc/postfix-2.5.9/README_FILES
recipient_bcc_maps = proxy:ldap:/etc/postfix/ldap_recipient_bcc_maps_domain.cf, proxy:ldap:/etc/postfix/ldap_recipient_bcc_maps_user.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:ldap:/etc/postfix/ldap_relay_domains.cf
relay_recipient_maps = proxy:ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf
relayhost = [removed]
sample_directory = /usr/share/doc/postfix-2.5.9/samples
sender_bcc_maps = proxy:ldap:/etc/postfix/ldap_sender_bcc_maps_domain.cf, proxy:ldap:/etc/postfix/ldap_sender_bcc_maps_user.cf
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_enforce_tls = no
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
smtpd_recipient_restrictions = reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unlisted_recipient, check_policy_service inet:127.0.0.1:7777, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_policy_service inet:127.0.0.1:10031
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_sasl_local_domain =
smtpd_sasl_path = dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_login_maps = proxy:ldap:/etc/postfix/ldap_sender_login_maps.cf
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
smtpd_tls_cert_file = /etc/pki/tls/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/pki/tls/private/iRedMail.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
tls_random_source = dev:/dev/urandom
transport_maps = proxy:ldap:/etc/postfix/ldap_transport_maps_user.cf, proxy:ldap:/etc/postfix/ldap_transport_maps_domain.cf
unknown_local_recipient_reject_code = 550
virtual_alias_maps = proxy:ldap:/etc/postfix/ldap_virtual_alias_maps.cf, proxy:ldap:/etc/postfix/ldap_virtual_group_maps.cf, proxy:ldap:/etc/postfix/ldap_sender_login_maps.cf, proxy:ldap:/etc/postfix/ldap_catch_all_maps.cf
virtual_gid_maps = static:500
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:ldap:/etc/postfix/ldap_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ldap_virtual_mailbox_maps.cf
virtual_minimum_uid = 500
virtual_transport = dovecot
virtual_uid_maps = static:500

16

Re: E-mails lost

Could you please try to send one more testing email to this user? And monitor Postfix log file, paste all log entries of this testing email here to help troubleshoot.

There should be something we can use for troubleshooting.

17

Re: E-mails lost

ZhangHuangbin wrote:

Could you please try to send one more testing email to this user? And monitor Postfix log file, paste all log entries of this testing email here to help troubleshoot.

There should be something we can use for troubleshooting.

In the attachement I've included part of the maillog en dovecot.log.
As you can see in this file there has not been a connection to dovecot until 7pm and there has arrived mail,
but when connecting to dovecot for the first time it doesn't fetch any emails.

Post's attachments

robert.tar.gz 2.33 kb, 1 downloads since 2012-01-26 

You don't have the permssions to download the attachments of this post.

18

Re: E-mails lost

Hi luxus,

May i know which version of iRedMail and Linux/BSD distribution you're running?

There're two issues in attached file 'maillog':

Jan 25 08:14:25 mail amavis[14598]: (14598-03) (!)WARN save_info_final: sql exec: err=1062, 23000, DBD::mysql::st execute failed: Duplicate entry '0-oh3P+Z-Lr7lz-0' for key 1 at (eval 98) line 166, <GEN14> line 494.

Is this fix applicable to your issue: http://www.iredmail.org/forum/topic1677 … issue.html

Jan 25 07:14:25 mail policyd: mysql_real_connect(): Access denied for user 'policyd'@'localhost' (using password: YES)

Do you have correct MYSQL username/password in Policyd config file?

Two more issues:

1) Filtered log content is useless for troubleshooting. Attach the original one (without any modification) if needed.
2) Is there any network router/gateway between your client (user) and mail server?