1

Topic: problems after upgrading 0.9.0 from 0.8.7

Hello, we had two problems after upgrading to 0.9.0.

1- After I change query_filter    = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s))) with query_filter    = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s))(!(domainBackupMX=yes))) at /etc/postfix/ldap/transport_maps_domain.cf, I couldnt able to send e-mail and got error "temporary lookup failure". So I set back to old settings and It is ok now.

2- After upgrading, no mails was coming or send. I looked the queue, all the mails that we sent was on queue, but just waiting on the queue. I searched for 3 hours and after I commented the row "content_filter = smtp-amavis:[127.0.0.1]:10024" at /etc/postfix/main.cf" mails started to forward to user. But now amavis is not available cause of that changing. And we have to activate amavis. How can we solve this problem? Any Idea? Thanks.

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
====

----

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

2

Re: problems after upgrading 0.9.0 from 0.8.7

I just realized that if someone send mail to mail group, mail group can't get the e-mails.

3

Re: problems after upgrading 0.9.0 from 0.8.7

Mails come to mail group, but mail group dont send mails to group members. :S

4

Re: problems after upgrading 0.9.0 from 0.8.7

nevsehiredu wrote:

1- After I change query_filter    = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s))) with query_filter    = (&(objectClass=mailDomain)(accountStatus=active)(enabledService=mail)(|(domainName=%s)(domainAliasName=%s))(!(domainBackupMX=yes))) at /etc/postfix/ldap/transport_maps_domain.cf, I couldnt able to send e-mail and got error "temporary lookup failure". So I set back to old settings and It is ok now.

Please reverse this change immediately.
And could you please show us output of "postconf -n" here to help us understand the issue?

5

Re: problems after upgrading 0.9.0 from 0.8.7

I reverse it and it is ok now. I send postconf -n result.

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
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
delay_warning_time = 0h
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
lmtp_tls_protocols = !SSLv2 !SSLv3
mail_owner = postfix
mailbox_command = /usr/libexec/dovecot/deliver
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
maximal_backoff_time = 4000s
maximal_queue_lifetime = 1d
message_size_limit = 29360128
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mydomain = nevsehir.edu
myhostname = mail.nevsehir.edu.tr
mynetworks = 127.0.0.0/8 79.123.190.120/32 79.123.186.135/32 10.0.6.15/32 10.0.6.29/32 10.0.6.15/32 10.0.6.14/32 5.9.236.36/32 10.0.6.73/32 79.123.186.134/32 79.123.186.135/32 79.123.186.104/32 10.0.6.32/32 79.123.186.220/32 79.123.186.130/32 10.100.10.111/32 79.123.186.83/32 79.123.186.149/32 79.123.186.90/32 79.123.186.86/32 79.123.186.88/32 79.123.186.180/32 79.123.186.176/32
mynetworks_style = subnet
myorigin = mail.nevsehir.edu.tr
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.11.0/README_FILES
receive_override_options = no_address_mappings
recipient_bcc_maps = proxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_user.cf, proxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination, proxy:ldap:/etc/postfix/ldap/relay_domains.cf
sample_directory = /usr/share/doc/postfix-2.11.0/samples
sender_bcc_maps = proxy:ldap:/etc/postfix/ldap/sender_bcc_maps_user.cf, proxy:ldap:/etc/postfix/ldap/sender_bcc_maps_domain.cf
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp-amavis_destination_recipient_limit = 1
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
smtp_tls_protocols = !SSLv2 !SSLv3
smtp_tls_security_level = may
smtpd_client_message_rate_limit = 30
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, reject_sender_login_mismatch, permit_sasl_authenticated
smtpd_tls_CAfile = /etc/pki/tls/certs/iRedMail_CA.pem
smtpd_tls_auth_only = no
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_mandatory_protocols = !SSLv2 !SSLv3
smtpd_tls_protocols = !SSLv2 !SSLv3
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_domains =
virtual_alias_expansion_limit = 25000
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/virtual_group_members_maps.cf, proxy:ldap:/etc/postfix/ldap/catchall_maps.cf
virtual_gid_maps = static:500
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 = 500
virtual_transport = dovecot
virtual_uid_maps = static:500

Now two important problems; when i activate amavis, mails waits on the queue. And the second, when someone send to mail group, mail group box got the mail but not forward to group members.

6

Re: problems after upgrading 0.9.0 from 0.8.7

Group problem solved after I delete the "receive_override_options = no_address_mappings" row on postfix/main.cf

Amavis problem still continuing.

7

Re: problems after upgrading 0.9.0 from 0.8.7

Please check whether amavisd and clamav services are running.
and please do execute 'freshclam' to update virus database, if no virus database found, clamav service cannot start.

8

Re: problems after upgrading 0.9.0 from 0.8.7

Both is working. I restarted again but nothing changed. When I run freshclam command the output is;

ClamAV update process started at Sat Jan 10 12:08:12 2015
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.97.7 Recommended version: 0.98.5
DON'T PANIC! Read http://www.clamav.net/support/faq
main.cld is up to date (version: 55, sigs: 2424225, f-level: 60, builder: neo)
daily.cld is up to date (version: 19903, sigs: 1305486, f-level: 63, builder: neo)
bytecode.cld is up to date (version: 245, sigs: 43, f-level: 63, builder: dgoddard)

9

Re: problems after upgrading 0.9.0 from 0.8.7

Any related log in Postfix log file?

10

Re: problems after upgrading 0.9.0 from 0.8.7

Now the row "content_filter = smtp-amavis:[127.0.0.1]:10024" is disabled in /etc/postfix/main.cf. Mails are sending and getting but amavis status is disable. When I open this row and send someone mail.. I got the following error log in /var/log/maillog

Jan 12 08:35:29 mail postfix/qmgr[11983]: BB697155409C5: from=<nuh.87@hotmail.com>, size=1960, nrcpt=1 (queue active)
Jan 12 08:35:30 mail postfix/error[12005]: BB697155409C5: to=<nuh@nevsehir.edu.tr>, relay=none, delay=1.4, delays=0.38/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)

11 (edited by nevsehiredu 2015-01-12 14:52:33)

Re: problems after upgrading 0.9.0 from 0.8.7

Mail server runs on Centos.

And Is it possible this error because of IredAPD upgrading?

12

Re: problems after upgrading 0.9.0 from 0.8.7

nevsehiredu wrote:

Mail server runs on Centos.

And Is it possible this error because of IredAPD upgrading?

I also upgraded from 0.8.7 -> 0.9.0 and no problem here.

Post us with :  netstat -anp | grep amavis

13

Re: problems after upgrading 0.9.0 from 0.8.7

output is;

tcp        0      0 127.0.0.1:9998              0.0.0.0:*                   LISTEN      8221/amavisd (maste 
tcp        0      0 127.0.0.1:10024             0.0.0.0:*                   LISTEN      8221/amavisd (maste 
unix  2      [ ACC ]     STREAM     LISTENING     200529201 8221/amavisd (maste /var/spool/amavisd/amavisd.sock
unix  2      [ ACC ]     STREAM     LISTENING     200672695 17580/master        private/smtp-amavis
unix  2      [ ]         DGRAM                    200529281 8226/amavisd (virgi 
unix  2      [ ]         DGRAM                    200529280 8225/amavisd (virgi 
unix  2      [ ]         DGRAM                    200529199 8221/amavisd (maste 

14

Re: problems after upgrading 0.9.0 from 0.8.7

Please, post /etc/postfix/master.cf so i can compare to my.

15

Re: problems after upgrading 0.9.0 from 0.8.7

Ok.

# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#  -o content_filter=dfilt:
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
    -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop  unix  -       n       n       -       -       pipe
#  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail    unix  -       n       n       -       -       pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp     unix  -       n       n       -       -       pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
submission inet n       -       n       -       -       smtpd
  -o smtpd_enforce_tls=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
#  -o content_filter=smtp-amavis:[127.0.0.1]:10026

# Use dovecot deliver program as LDA.
dovecot unix    -       n       n       -       -      pipe
    flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${domain} -m ${extension}

smtp-amavis unix -  -   -   -   2  smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20

127.0.0.1:10025 inet n  -   -   -   -  smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_delay_reject=no
    -o smtpd_tls_security_level=none
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_end_of_data_restrictions=
    -o mynetworks_style=host
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_address_mappings
#    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks

#altermime sonradan eklenmisti iptal edildi asagisi
#dfilt     unix    -       n       n       -       -       pipe
#      flags=Rq user=filter argv=/etc/postfix/disclaimerX -f ${sender} -- ${recipient}
#smtp      inet  n       -       n       -       1       postscreen
#smtpd     pass  -       -       n       -       -       smtpd
#dnsblog   unix  -       -       n       -       0       dnsblog
#tlsproxy  unix  -       -       n       -       0       tlsproxy

16

Re: problems after upgrading 0.9.0 from 0.8.7

Did you changed smtpd_enforce_tls during upgrade?

submission inet n       -       n       -       -       smtpd
  -o smtpd_enforce_tls=yes 

I'm running with

submission inet n       -       n       -       -       smtpd
  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject
#  -o content_filter=smtp-amavis:[127.0.0.1]:10026

17 (edited by nevsehiredu 2015-01-12 19:55:08)

Re: problems after upgrading 0.9.0 from 0.8.7

No I didnt change it during upgrade.

I changed it with your configuration, but nothing changed. So I reversed it again.

18

Re: problems after upgrading 0.9.0 from 0.8.7

nevsehiredu wrote:

Jan 12 08:35:30 mail postfix/error[12005]: BB697155409C5: to=<nuh@nevsehir.edu.tr>, relay=none, delay=1.4, delays=0.38/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)

Did you reverse this change in upgrade tutorial?
http://www.iredmail.org/docs/upgrade.ir … query-file

I'm sorry about this trouble.

19

Re: problems after upgrading 0.9.0 from 0.8.7

Yes Zhang, I reversed it before.

ZhangHuangbin wrote:
nevsehiredu wrote:

Jan 12 08:35:30 mail postfix/error[12005]: BB697155409C5: to=<nuh@nevsehir.edu.tr>, relay=none, delay=1.4, delays=0.38/1/0/0, dsn=4.3.0, status=deferred (unknown mail transport error)

Did you reverse this change in upgrade tutorial?
http://www.iredmail.org/docs/upgrade.ir … query-file

I'm sorry about this trouble.

20

Re: problems after upgrading 0.9.0 from 0.8.7

Could you please show me output of below commands?

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo $cf; postmap -q 'nevsehir.edu.tr' ldap:./$cf; done

21

Re: problems after upgrading 0.9.0 from 0.8.7

Output is;

catchall_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
transport_maps_domain.cf
dovecot
transport_maps_user.cf
virtual_alias_maps.cf
virtual_group_maps.cf
virtual_group_members_maps.cf
virtual_mailbox_domains.cf
nevsehir.edu.tr
virtual_mailbox_maps.cf

ZhangHuangbin wrote:

Could you please show me output of below commands?

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo $cf; postmap -q 'nevsehir.edu.tr' ldap:./$cf; done

22

Re: problems after upgrading 0.9.0 from 0.8.7

nevsehiredu wrote:

transport_maps_domain.cf
dovecot

virtual_mailbox_domains.cf
nevsehir.edu.tr

As you can see in the output, Postfix correctly returns the transport (dovecot) and virtual domain name. I don't know why "relay=none" appears in Postfix log.

Could you please show me output of additional commands? This time we use full email address:

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo $cf; postmap -q 'nuh@nevsehir.edu.tr' ldap:./$cf; done

23

Re: problems after upgrading 0.9.0 from 0.8.7

catchall_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_login_maps.cf
nuh@nevsehir.edu.tr
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_group_maps.cf
virtual_group_members_maps.cf
nuh@nevsehir.edu.tr
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf
nevsehir.edu.tr/n/u/h/nuh-2011.07.12.20.44.10//Maildir/
ZhangHuangbin wrote:
nevsehiredu wrote:

transport_maps_domain.cf
dovecot

virtual_mailbox_domains.cf
nevsehir.edu.tr

As you can see in the output, Postfix correctly returns the transport (dovecot) and virtual domain name. I don't know why "relay=none" appears in Postfix log.

Could you please show me output of additional commands? This time we use full email address:

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo $cf; postmap -q 'nuh@nevsehir.edu.tr' ldap:./$cf; done

24

Re: problems after upgrading 0.9.0 from 0.8.7

But this error returns if I open the row "content_filter = smtp-amavis:[127.0.0.1]:10024" in main.cf.. If I close that row and disable amavis It's not.

25

Re: problems after upgrading 0.9.0 from 0.8.7

Could you please gather information as described below to help me understand this issue?

*) Send a testing email to user nuh@ (the one you have this issue).
*) Show me FULL log of this testing email in Postfix log file, not just the line contain error message.