1 (edited by theiosx 2013-07-31 04:19:48)

Topic: After hard Ubuntu CD Upgrade

======== Required information ====
- iRedMail version: 0.6.1
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 12.04 LTS
- Related log if you're reporting an issue:
====
Hi. My client has updated his server from OLD Ubuntu OS to NEW Ubuntu OS by CD Disc. After reboot obviously nothing work.
Sure it's strong mistake, but now my client ask me to help him, because old system administrator has disappeared.
In this case it's my first experience with iRedMail and please believe me - before I start to write this message I spend a lot of time in Google and documentation for it. I think after hard upgrade OS some libs and configs was rewrited or removed, also new software versions have new syntax.

I fixed many errors in config files etc and now I just have one problem.
I can't get new mail. I just can see old mail in Roundcube before upgrade. Fetchmail works fine and in prove of it I attached log.
For example I compose new message from my Gmail to client e-mail. Well, let's look fetchmail log file

Jul 31 01:16:44 example fetchmail[2561]: 6.3.21 querying pop3.timeweb.ru (protocol POP3) at Wed Jul 31 01:16:44 2013: poll started
Jul 31 01:16:44 example fetchmail[2561]: Trying to connect to 92.53.98.109/110...connected.
Jul 31 01:16:44 example fetchmail[2561]: POP3< +OK POP3 ready
Jul 31 01:16:44 example fetchmail[2561]: POP3> CAPA
Jul 31 01:16:45 example fetchmail[2561]: POP3< +OK Capability list follows
Jul 31 01:16:45 example fetchmail[2561]: POP3< TOP
Jul 31 01:16:45 example fetchmail[2561]: POP3< USER
Jul 31 01:16:45 example fetchmail[2561]: POP3< SASL LOGIN PLAIN
Jul 31 01:16:45 example fetchmail[2561]: POP3< STLS
Jul 31 01:16:45 example fetchmail[2561]: POP3< .
Jul 31 01:16:45 example fetchmail[2561]: POP3> STLS
Jul 31 01:16:45 example fetchmail[2561]: POP3< +OK
Jul 31 01:16:45 example fetchmail[2561]: Server certificate:
Jul 31 01:16:45 example fetchmail[2561]: Issuer Organization: Thawte, Inc.
Jul 31 01:16:45 example fetchmail[2561]: Issuer CommonName: Thawte SSL CA
Jul 31 01:16:45 example fetchmail[2561]: Subject CommonName: *.timeweb.ru
Jul 31 01:16:45 example fetchmail[2561]: Subject Alternative Name: *.timeweb.ru
Jul 31 01:16:45 example fetchmail[2561]: pop3.timeweb.ru key fingerprint: E3:FD:C9:D5:B9:FD:73:41:6B:A7:5D:A1:0E:A5:3E:4E
Jul 31 01:16:45 example fetchmail[2561]: POP3> CAPA
Jul 31 01:16:45 example fetchmail[2561]: POP3< +OK Capability list follows
Jul 31 01:16:45 example fetchmail[2561]: POP3< TOP
Jul 31 01:16:45 example fetchmail[2561]: POP3< USER
Jul 31 01:16:45 example fetchmail[2561]: POP3< SASL LOGIN PLAIN
Jul 31 01:16:45 example fetchmail[2561]: POP3< .
Jul 31 01:16:45 example fetchmail[2561]: pop3.timeweb.ru: upgrade to TLS succeeded.
Jul 31 01:16:45 example fetchmail[2561]: POP3> USER rinat@example.com
Jul 31 01:16:46 example fetchmail[2561]: POP3< +OK
Jul 31 01:16:46 example fetchmail[2561]: POP3> PASS *
Jul 31 01:16:46 example fetchmail[2561]: POP3< +OK logged in.
Jul 31 01:16:46 example fetchmail[2561]: POP3> STAT
Jul 31 01:16:46 example fetchmail[2561]: POP3< +OK 1 2362
Jul 31 01:16:46 example fetchmail[2561]: POP3> LAST
Jul 31 01:16:46 example fetchmail[2561]: POP3< -ERR Invalid command.
Jul 31 01:16:46 example fetchmail[2561]: Invalid command.
Jul 31 01:16:46 example fetchmail[2561]: POP3> UIDL
Jul 31 01:16:47 example fetchmail[2561]: POP3< +OK
Jul 31 01:16:47 example fetchmail[2561]: POP3< 1 UID5646-1256027415
Jul 31 01:16:47 example fetchmail[2561]: POP3< .
Jul 31 01:16:47 example fetchmail[2561]: 1 message for rinat@example.com at pop3.timeweb.ru (2362 octets).
Jul 31 01:16:47 example fetchmail[2561]: POP3> LIST 1
Jul 31 01:16:47 example fetchmail[2561]: POP3< +OK 1 2362
Jul 31 01:16:47 example fetchmail[2561]: POP3> TOP 1 99999999
Jul 31 01:16:47 example fetchmail[2561]: POP3< +OK headers follow.
Jul 31 01:16:47 example fetchmail[2561]: reading message rinat@example.com@imap.timeweb.ru:1 of 1 (2362 octets)Trying to connect to 127.0.0.1/25...connected.
Jul 31 01:16:48 example postfix/smtpd[10615]: connect from localhost.localdomain[127.0.0.1]
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 220 example.com ESMTP iRedMail (Ubuntu)
Jul 31 01:16:48 example fetchmail[2561]: SMTP> EHLO example.com
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-example.com
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-PIPELINING
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-SIZE 51200000
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-ETRN
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-STARTTLS
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-AUTH PLAIN
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-AUTH=PLAIN
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-ENHANCEDSTATUSCODES
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250-8BITMIME
Jul 31 01:16:48 example fetchmail[2561]: SMTP< 250 DSN
Jul 31 01:16:48 example fetchmail[2561]: SMTP> MAIL FROM:<theiosx@gmail.com> SIZE=2362
Jul 31 01:16:49 example fetchmail[2561]: SMTP< 250 2.1.0 Ok
Jul 31 01:16:49 example fetchmail[2561]: SMTP> RCPT TO:<rinat@example.com>
Jul 31 01:16:49 example postfix/trivial-rewrite[10620]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
Jul 31 01:16:49 example postfix/smtpd[10615]: C4F393E02E8: client=localhost.localdomain[127.0.0.1]
Jul 31 01:16:49 example fetchmail[2561]: SMTP< 250 2.1.5 Ok
Jul 31 01:16:49 example fetchmail[2561]: SMTP> DATA
Jul 31 01:16:49 example fetchmail[2561]: SMTP< 354 End data with <CR><LF>.<CR><LF>
Jul 31 01:16:49 example fetchmail[2561]: SMTP>. (EOM)
Jul 31 01:16:50 example postfix/cleanup[10621]: C4F393E02E8: message-id=<CA+8xZY-2zy1hkqeDN3Ch7VJ1UOkHcvpj-=zNnuXZC_zEdL98gA@mail.gmail.com>
Jul 31 01:16:50 example fetchmail[2561]: SMTP< 250 2.0.0 Ok: queued as C4F393E02E8
Jul 31 01:16:50 example fetchmail[2561]:  flushed
Jul 31 01:16:50 example fetchmail[2561]: POP3> DELE 1
Jul 31 01:16:50 example postfix/qmgr[10251]: C4F393E02E8: from=<theiosx@gmail.com>, size=2710, nrcpt=1 (queue active)
Jul 31 01:16:50 example fetchmail[2561]: POP3< +OK Deleted.
Jul 31 01:16:50 example fetchmail[2561]: POP3> QUIT
Jul 31 01:16:50 example fetchmail[2561]: POP3< +OK Bye-bye.
Jul 31 01:16:50 example fetchmail[2561]: SMTP> QUIT
Jul 31 01:16:50 example postfix/smtpd[10615]: disconnect from localhost.localdomain[127.0.0.1]
Jul 31 01:16:50 example fetchmail[2561]: SMTP< 221 2.0.0 Bye
Jul 31 01:16:50 example fetchmail[2561]: 6.3.21 querying pop3.timeweb.ru (protocol POP3) at Wed Jul 31 01:16:50 2013: poll completed
Jul 31 01:16:50 example fetchmail[2561]: sleeping at Wed Jul 31 01:16:50 2013 for 300 seconds
Jul 31 01:16:51 example postfix/pipe[10622]: C4F393E02E8: to=<rinat@example.com>, relay=autoresponder, delay=2, delays=1.4/0.12/0/0.52, dsn=2.0.0, status=sent (delivered via autoresponder service)
Jul 31 01:16:51 example postfix/qmgr[10251]: C4F393E02E8: removed
Jul 31 01:16:51 example postfix/pickup[10252]: 2EF3A3E02E9: uid=1006 from=<theiosx@gmail.com>
Jul 31 01:16:51 example postfix/cleanup[10621]: 2EF3A3E02E9: message-id=<CA+8xZY-2zy1hkqeDN3Ch7VJ1UOkHcvpj-=zNnuXZC_zEdL98gA@mail.gmail.com>
Jul 31 01:16:51 example postfix/qmgr[10251]: 2EF3A3E02E9: from=<theiosx@gmail.com>, size=2820, nrcpt=1 (queue active)
Jul 31 01:16:51 example postfix/trivial-rewrite[10620]: warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains
Jul 31 01:16:51 example postfix/pipe[10631]: 2EF3A3E02E9: to=<rinat@example.com>, relay=dovecot, delay=0.63, delays=0.33/0.01/0/0.29, dsn=5.1.1, status=bounced (user unknown)
Jul 31 01:16:51 example postfix/cleanup[10621]: 8D1033E02E8: message-id=<20130730191651.8D1033E02E8@example.com>
Jul 31 01:16:51 example postfix/qmgr[10251]: 8D1033E02E8: from=<>, size=4451, nrcpt=1 (queue active)
Jul 31 01:16:51 example postfix/bounce[10633]: 2EF3A3E02E9: sender non-delivery notification: 8D1033E02E8
Jul 31 01:16:51 example postfix/qmgr[10251]: 2EF3A3E02E9: removed
Jul 31 01:16:52 example postfix/smtp[10635]: 8D1033E02E8: to=<theiosx@gmail.com>, relay=smtp.timeweb.ru[92.53.117.15]:25, delay=1.4, delays=0.06/0.16/0.96/0.2, dsn=5.0.0, status=bounced (host smtp.timeweb.ru[92.53.117.15] said: 550 Disabled (in reply to RCPT TO command))
Jul 31 01:16:53 example postfix/qmgr[10251]: 8D1033E02E8: removed

In this case I see that rinat@example.com has got the new message and fetchmail download him and forward to postfix. But postfix can't deliver it to dovecot.

Now we're going to look dovecot.log

Jul 31 01:16:48 auth: Debug: Loading modules from directory: /usr/lib/dovecot/modules/auth
Jul 31 01:16:48 auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libauthdb_ldap.so
Jul 31 01:16:48 auth: Debug: Module loaded: /usr/lib/dovecot/modules/auth/libdriver_mysql.so
Jul 31 01:16:48 auth: Debug: auth client connected (pid=10615)
Jul 31 01:16:51 auth: Debug: master in: USER    1       rinat@example.com service=lda
Jul 31 01:16:51 auth: Debug: ldap(rinat@example.com): user search: base=o=domains,dc=example,dc=com scope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lda)(|(mail=rinat@example.com)(&(enabledService=shadowaddress)(shadowAddress=rinat@example.com)))) fields=homeDirectory,mailMessageStore,mailQuota
Jul 31 01:16:51 auth: Info: ldap(rinat@example.com): unknown user
Jul 31 01:16:51 auth: Debug: master out: NOTFOUND       1

I think something wrong in /etc/dovecot/dovecot-ldap.conf
And even suppose something wrong with user_filter

hosts           = 127.0.0.1:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=vmail,dc=example,dc=com
dnpass          = vmail
base            = o=domains,dc=example,dc=com
scope           = subtree
deref           = never

# Below two are required by command 'doveadm mailbox ...'
iterate_attrs   = mail=user
iterate_filter  = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail))

user_filter     = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_filter     = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_attrs      = userPassword=password
default_pass_scheme = CRYPT
user_attrs      = homeDirectory=home,mailMessageStore=mail=maildir:/var/vmail/%$/Maildir/,mailQuota=quota_rule=*:bytes=%$

Weird.

# doveadm mailbox list -u rinat@example.com
Drafts
Archives
Archives.2013
Deleted Messages
Sent
Junk
Sent Messages
Notes
Trash
INBOX
INBOX.Trash
# ldapsearch -v -h 127.0.0.1 -x -W -D "cn=vmail,dc=example,dc=com" -b dc=example,dc=com '(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lda)(|(mail=rinat@example.com)(&(enabledService=shadowaddress)(shadowAddress=rinat@example.com))))'
ldap_initialize( ldap://127.0.0.1 )
Enter LDAP Password: 
filter: (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lda)(|(mail=rinat@example.com)(&(enabledService=shadowaddress)(shadowAddress=rinat@example.com))))
requesting: All userApplication attributes
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lda)(|(mail=rinat@example.com)(&(enabledService=shadowaddress)(shadowAddress=rinat@example.com))))
# requesting: ALL
#

# search result
search: 2
result: 0 Success

# numResponses: 1

My configs :
root@example:~# doveconf -n

# 2.0.19: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-23-generic i686 Ubuntu 12.04 LTS 
auth_debug = yes
auth_debug_passwords = yes
auth_verbose = yes
dict {
  expire = db:/var/lib/dovecot/expire/expire.db
}
disable_plaintext_auth = no
listen = *
log_path = /var/log/dovecot.log
login_greeting = POP3/IMAP server ready.
mail_debug = yes
mail_gid = 1002
mail_location = maildir:/%Lh/Maildir/:INDEX=/%Lh/Maildir/
mail_uid = 1002
passdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
plugin {
  auth_default_realm = example.com
  auth_socket_path = /var/run/dovecot/auth-master
  autocreate = INBOX
  autocreate2 = Sent
  autocreate3 = Trash
  autocreate4 = Drafts
  autocreate5 = Junk
  autosubscribe = INBOX
  autosubscribe2 = Sent
  autosubscribe3 = Trash
  autosubscribe4 = Drafts
  autosubscribe5 = Junk
  expire = Trash 7 Trash/* 7 Junk 30
  expire_dict = proxy::expire
  login_process_per_connection = yes
  quota = maildir
  quota_rule = *:storage=100M
  quota_warning = storage=85%% /usr/local/bin/dovecot-quota-warning.sh 85
  quota_warning2 = storage=90%% /usr/local/bin/dovecot-quota-warning.sh 90
  quota_warning3 = storage=95%% /usr/local/bin/dovecot-quota-warning.sh 95
  sieve = /var/vmail/sieve/%Ld/%Ln/dovecot.sieve
  sieve_dir = /var/vmail/sieve/%Ld/%Ln/
}
protocols = pop3 imap
service auth {
  unix_listener /var/spool/postfix/dovecot-auth {
    group = postfix
    mode = 0666
    user = postfix
  }
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
  unix_listener auth-master {
    group = vmail
    mode = 0666
    user = vmail
  }
  unix_listener auth-userdb {
    group = vmail
    mode = 0660
    user = vmail
  }
  user = vmail
}
ssl_cert = </etc/ssl/certs/dovecot.pem
ssl_key = </etc/ssl/private/dovecot.pem
userdb {
  args = /etc/dovecot/dovecot-ldap.conf
  driver = ldap
}
protocol imap {
  imap_client_workarounds = tb-extra-mailbox-sep
  mail_plugins = quota imap_quota zlib
}
protocol pop3 {
  mail_plugins = quota zlib
  pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
  pop3_uidl_format = %08Xu%08Xv
}
protocol lda {
  auth_socket_path = /var/run/dovecot/auth-master
  log_path = /var/log/sieve.log
  mail_plugins = sieve quota autocreate
  postmaster_address = root
}

root@example:~# postconf -n

alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
append_dot_mydomain = no
autoresponder_destination_recipient_limit = 1
biff = no
bounce_queue_lifetime = 1d
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps =
mail_name = iRedMail
mail_version = 0.6.1
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 15728640
maximal_backoff_time = 4000s
maximal_queue_lifetime = 1d
message_size_limit = 51200000
minimal_backoff_time = 300s
mydomain = example.com
myhostname = example.com
mynetworks = 127.0.0.0/8,192.168.10.0/24
mynetworks_style = subnet
myorigin = example.com
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 = no
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
relayhost = smtp.timeweb.ru
sender_bcc_maps = proxy:ldap:/etc/postfix/ldap_sender_bcc_maps_domain.cf, proxy:ldap:/etc/postfix/ldap_sender_bcc_maps_user.cf
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/time_passwd
smtp_sasl_security_options =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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, 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:7777
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, reject_sender_login_mismatch, permit_sasl_authenticated
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_loglevel = 0
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
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
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 hash:/etc/postfix/aliases
virtual_gid_maps = static:1002
virtual_mailbox_base = /var/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 = 1002
virtual_transport = dovecot
virtual_uid_maps = static:1002

Any idea ?

----

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

2

Re: After hard Ubuntu CD Upgrade

*) What's the iRedMail version before you upgraded Ubuntu OS? You can check /etc/iredmail-release.
*) Did you upgrade iRedMail to the latest stable release, 0.8.5?

theiosx wrote:

# ldapsearch -v -h 127.0.0.1 -x -W -D "cn=vmail,dc=example,dc=com" -b dc=example,dc=com '(&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=lda)(|(mail=rinat@example.com)(&(enabledService=shadowaddress)(shadowAddress=rinat@example.com))))'

Does filter "(&(objectClass=mailUser)(mail=rinat@example.com))" return something? If so, show us the returned LDIF data.
You should check whether it has required LDAP attribute/value pairs in returned LDIF data.

3

Re: After hard Ubuntu CD Upgrade

# cat /etc/iredmail-release
cat: /etc/iredmail-release: No such file or directory
I'm sure that actual version still 0.6.1, because in all config files which has been generate by iRedMail I see:
# File generated by iRedMail (2011.04.12.16.34.12):
# Version:  0.6.1

No, I did not upgrade iRedMail to the latest stable release, 0.8.5.

root@example:~# ldapsearch -v -h 127.0.0.1 -x -W -D "cn=vmail,dc=example,dc=com" -b dc=example,dc=com"(&(objectClass=mailUser)(mail=rinat@example.com))"
ldap_initialize( ldap://127.0.0.1 )
Enter LDAP Password: 
filter: (&(objectClass=mailUser)(mail=rinat@example.com))
requesting: All userApplication attributes
# extended LDIF
#
# LDAPv3
# base <dc=example,dc=com> with scope subtree
# filter: (&(objectClass=mailUser)(mail=rinat@example.com))
# requesting: ALL
#

# rinat@example.com, Users, example.com, domains, example.com
dn: mail=rinat@example.com,ou=Users,domainName=example.com,o=domains,dc=example,dc=
 com
objectClass: inetOrgPerson
objectClass: mailUser
objectClass: shadowAccount
objectClass: amavisAccount
mail: rinat@example.com
sn: rinat
uid: rinat
storageBaseDirectory: /var/vmail
mailMessageStore: vmail1/example.com/r/ri/rin/rinat-2011.04.18.20.06.49/
homeDirectory: /var/vmail/vmail1/example.com/r/ri/rin/rinat-2011.04.18.20.06.49/
mtaTransport: dovecot
enabledService: mail
enabledService: smtp
enabledService: deliver
enabledService: pop3
enabledService: pop3secured
enabledService: imap
enabledService: imapsecured
enabledService: managesieve
enabledService: managesievesecured
enabledService: sieve
enabledService: sievesecured
enabledService: internal
enabledService: forward
enabledService: senderbcc
enabledService: recipientbcc
enabledService: shadowaddress
enabledService: displayedInGlobalAddressBook
enabledService: doveadm
enabledService: smtpsecured
cn:: 0KDQuNC90LDRgiDQkNC70LjQtdCy
mailQuota: 2147483648
accountStatus: active
userPassword:: e1NTSEF9Y29relBtRnJJZ1V3cklFZ2Y0MjEvSXVzUmE1dnYzSWE=

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1

4

Re: After hard Ubuntu CD Upgrade

Thanks for you reply. Few minutes ago I fixed a problem.
I just read this section http://www.iredmail.org/doc.html#upgrade_tutorial and edit my config files
FROM "0.6.1 -> 0.7.0" TILL "0.8.1 -> 0.8.2" and I started to get new mail.

Now I want to ask you.
Is it possible to recover all mail mesages which I lost when fetchmail download them from IMAP server and forward to postfix ?

5

Re: After hard Ubuntu CD Upgrade

theiosx wrote:

Is it possible to recover all mail mesages which I lost when fetchmail download them from IMAP server and forward to postfix ?

Not sure how fetchmail works on your server, if fetched emails were delivered to mailbox, you should be able to access it with Webmail or other mail clients. if not delivered to mailbox, i have no idea. sorry.

6 (edited by theiosx 2013-08-01 13:19:05)

Re: After hard Ubuntu CD Upgrade

Exactly.
1. fetchmail gets messages from external boxes
2. fetchmail forward them to postfix
3. postfix forward them to dovecot
In this case dovecot didn't get anything on that time, becouse had problem with LDAP and can't detect user.
Therefore all messages should be in the postfix queue.

root@example:/# postqueue -p
Mail queue is empty
root@example:/# mailq 
Mail queue is empty
root@example:/# ls -l /var/spool/mail/
total 0
root@example:/# cat /etc/postfix/main.cf | grep queue_directory
queue_directory = /var/spool/postfix
root@example:/# du -h /var/spool/postfix/*
20K     /var/spool/postfix/active
4.0K    /var/spool/postfix/bounce
172K    /var/spool/postfix/corrupt
4.0K    /var/spool/postfix/defer/6
4.0K    /var/spool/postfix/defer/D
4.0K    /var/spool/postfix/defer/8
4.0K    /var/spool/postfix/defer/B
4.0K    /var/spool/postfix/defer/3
4.0K    /var/spool/postfix/defer/7
4.0K    /var/spool/postfix/defer/C
4.0K    /var/spool/postfix/defer/0
4.0K    /var/spool/postfix/defer/5
4.0K    /var/spool/postfix/defer/F
4.0K    /var/spool/postfix/defer/9
4.0K    /var/spool/postfix/defer/1
4.0K    /var/spool/postfix/defer/E
4.0K    /var/spool/postfix/defer/4
4.0K    /var/spool/postfix/defer/A
4.0K    /var/spool/postfix/defer/2
68K     /var/spool/postfix/defer
4.0K    /var/spool/postfix/deferred/6
4.0K    /var/spool/postfix/deferred/D
4.0K    /var/spool/postfix/deferred/8
4.0K    /var/spool/postfix/deferred/B
4.0K    /var/spool/postfix/deferred/3
4.0K    /var/spool/postfix/deferred/7
4.0K    /var/spool/postfix/deferred/C
4.0K    /var/spool/postfix/deferred/0
4.0K    /var/spool/postfix/deferred/5
4.0K    /var/spool/postfix/deferred/F
4.0K    /var/spool/postfix/deferred/9
4.0K    /var/spool/postfix/deferred/1
4.0K    /var/spool/postfix/deferred/E
4.0K    /var/spool/postfix/deferred/4
4.0K    /var/spool/postfix/deferred/A
4.0K    /var/spool/postfix/deferred/2
68K     /var/spool/postfix/deferred
4.0K    /var/spool/postfix/dev
0       /var/spool/postfix/dovecot-auth
232K    /var/spool/postfix/etc/ssl/certs
236K    /var/spool/postfix/etc/ssl
276K    /var/spool/postfix/etc
8.0K    /var/spool/postfix/flush
4.0K    /var/spool/postfix/hold
36K     /var/spool/postfix/incoming
340K    /var/spool/postfix/lib/i386-linux-gnu
416K    /var/spool/postfix/lib
4.0K    /var/spool/postfix/maildrop
8.0K    /var/spool/postfix/pid
4.0K    /var/spool/postfix/private
4.0K    /var/spool/postfix/public
4.0K    /var/spool/postfix/saved
4.0K    /var/spool/postfix/trace
4.0K    /var/spool/postfix/usr/lib/sasl2
4.0K    /var/spool/postfix/usr/lib/zoneinfo
12K     /var/spool/postfix/usr/lib
16K     /var/spool/postfix/usr

I think at the moment to recover my lost mail is impossible sad They all was rejected and deleted sad
And eventually I fount this on logs sad

Jul 31 07:37:49 example postfix/pickup[12354]: F0B6E3E02E8: uid=0 from=<root>
Jul 31 07:37:49 example postfix/cleanup[12733]: F0B6E3E02E8: message-id=<20130731013748.F0B6E3E02E8@example .com>
Jul 31 07:37:49 example postfix/qmgr[10251]: F0B6E3E02E8: from=<root@example .com>, size=1226, nrcpt=1 (queue active)
Jul 31 07:37:50 example postfix/pipe[12736]: F0B6E3E02E8: to=<www@example .com>, relay=dovecot, delay=3.3, delays=2.3/0.02/0/1, dsn=5.1.1, status=bounced (user unknown)
Jul 31 07:37:50 example postfix/cleanup[12733]: CD4253E02E9: message-id=<20130731013750.CD4253E02E9@example .com>
Jul 31 07:37:50 example postfix/bounce[12740]: F0B6E3E02E8: sender non-delivery notification: CD4253E02E9
Jul 31 07:37:50 example postfix/qmgr[10251]: CD4253E02E9: from=<>, size=2844, nrcpt=1 (queue active)
Jul 31 07:37:50 example postfix/qmgr[10251]: F0B6E3E02E8: removed
Jul 31 07:37:50 example postfix/pipe[12736]: CD4253E02E9: to=<www@example .com>, relay=dovecot, delay=0.14, delays=0.08/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown)
Jul 31 07:37:50 example postfix/qmgr[10251]: CD4253E02E9: removed