1

Topic: Help! No Mail delivery following ISP reboot

Hi all I hope someone is able to help...

My ISP in their wisdom rebooted the node where my VPS is hosted, this had the affect of re-booting my server. None of the services came back up which is ok I start them manually, but I now do not get mail (Everythign was ok prior to re-boot)

MailQ
I have messages in my mailq - with (mail transport unavailable)

mail.log
Oct 29 12:23:17 mail postfix/cleanup[6346]: warning: E47AA24D0336: virtual_alias_maps map lookup problem for postmaster@mail.matthouldsworth.com
Oct 29 12:23:17 mail postfix/smtpd[6310]: disconnect from mail-bw0-f51.google.com[209.85.214.51]
Oct 29 12:23:18 mail postfix/trivial-rewrite[6354]: fatal: proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf(0,lock|fold_fix): table lookup problem
Oct 29 12:23:19 mail postfix/smtpd[5872]: warning: problem talking to service rewrite: Success
Oct 29 12:23:19 mail postfix/smtpd[5782]: warning: problem talking to service rewrite: Connection reset by peer
Oct 29 12:23:19 mail postfix/master[541]: warning: process /usr/lib/postfix/trivial-rewrite pid 6354 exit status 1

I have read this issue with the table lookup can be a password issue but I have logged into mysql with the Vmail user/pass and all is fine with that

mail.err
Oct 29 12:23:18 mail postfix/trivial-rewrite[6354]: fatal: proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf(0,lock|fold_fix): table lookup problem

However...
nothing seems to be logging to the log files anymore (for the last hour) Even restarts of postfix etc do not trigger any logs which I would expect them to?

dovecot.log is logging people logging in and out of accounts

All services are up:

MySql
Amavisd (amavis-new)
Spamassasin
Clamav-daemon
Postfix
Dovecot

What am I missing?

Thanks for nay help I will provide any further info if needed

Matt Houldsworth

----

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

2

Re: Help! No Mail delivery following ISP reboot

More info:

When I comment out:

#content_filter = amavis:[127.0.0.1]:10024

in main.cf mail is delivered... I gues unfiltered for amavisd

so it is an amavisd issue? but what?

3

Re: Help! No Mail delivery following ISP reboot

digitalquill wrote:

mail.err
Oct 29 12:23:18 mail postfix/trivial-rewrite[6354]: fatal: proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf(0,lock|fold_fix): table lookup problem

It means MySQL server was not running or there's a connection related issue.

If it works again after disable Amavisd, their must be something wrong with Amavisd or related components, try to disable it again to get some error log to help troubleshoot.

4

Re: Help! No Mail delivery following ISP reboot

MySQL Issue legacy from not comming up correctly so that is sorted

When I enable amavisd I get:

Oct 30 09:53:17 mail postfix/qmgr[9407]: warning: connect to transport private/amavis: No such file or directory

in mail.log

5

Re: Help! No Mail delivery following ISP reboot

ok so I have changed

content_filter = amavis:[127.0.0.1]:10024

to

content_filter = smtp-amavis:[127.0.0.1]:10024

and this now appears to be working, how would I test to ensure?

Has something changed with a recent upgrade of postfix/amavis? I have not upgraded iRedmail at all since I installed 12+ months ago, how do I find my IredMail version? Should I think about upgrading?

Thanks

Matt Houldsworth

6

Re: Help! No Mail delivery following ISP reboot

still getting

'warning: connect to transport private/amavis: No such file or directory'

in mail.log

7 (edited by smartdrive 2011-10-30 20:34:00)

Re: Help! No Mail delivery following ISP reboot

digitalquill wrote:

still getting

'warning: connect to transport private/amavis: No such file or directory'

in mail.log

I think it is yours mails in postfix queue because you changed your content_filter and I think some retry with the old config.

Try "postqueue -f" in your command line.

If it doesn't work then paste your master.cf here.

8

Re: Help! No Mail delivery following ISP reboot

Done a postqueue -f

gave:

Oct 30 12:42:17 mail postfix/error[11465]: 5E20224D036B: to=<EMAIL ADDRESS REMOVED >, relay=none, delay=83674, delays=83674/0.06/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)

in the mail.log and still 113 mails in mailq

but mail from my gmail account is delivered now and getting emails from other sources, should I worry about those in teh queue?

main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
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 = 4h

alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
relayhost =
mynetworks = 127.0.0.0/8, 94.229.66.89, 77.74.199.71, matthouldsworth.com, mail.matthouldsworth.com
mynetworks_style=class
inet_interfaces = all
recipient_delimiter = +
myhostname = mail.matthouldsworth.com
myorigin = mail.matthouldsworth.com
mydomain = matthouldsworth.com
mail_name = iRedMail
mail_version = 0.6.1
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql_relay_domains.cf
inet_protocols = ipv4
mynetworks_style = subnet
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
delay_warning_time = 0h
policy_time_limit = 3600
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
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_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
home_mailbox = Maildir/
allow_min_user = no
mailbox_size_limit = 15728640
virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
virtual_mailbox_base = /var/vmail
transport_maps = proxy:mysql:/etc/postfix/mysql_transport_maps_user.cf, proxy:mysql:/etc/postfix/mysql_transport_maps_domain.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql_virtual_alias_maps.cf, proxy:mysql:/etc/postfix/mysql_domain_alias_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_sender_bcc_maps_user.cf
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_domain.cf, proxy:mysql:/etc/postfix/mysql_recipient_bcc_maps_user.cf
relay_recipient_maps = proxy:mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql_sender_login_maps.cf
smtpd_reject_unlisted_sender = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = no
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:10031
smtpd_tls_security_level = may
smtpd_enforce_tls = no
smtpd_tls_loglevel = 0
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
#
# Uncomment the following line to enable policyd sender throttle.
#
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
mailbox_command = /usr/lib/dovecot/deliver
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024
#message_size_limit = 10485760



master.cf

#
# 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       -       -       -       -       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
#smtps     inet  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       -       -       -       -       qmqpd
#pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
        -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
retry     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache    unix  -       -       -       -       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/bin/maildrop -d ${recipient}
#
# 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/lib/bsmtp/bsmtp -t$nexthop -f$sender $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}

# Bypass checks for internally generated mail.
pickup    fifo  n       -       n       60      1       pickup
  -o content_filter=
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

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 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/lib/dovecot/deliver -f ${sender} -d ${user}@${domain}
procmail unix    -       n       n       -       -      pipe
  flags=DRhu user=vmail:vmail argv=/usr/bin/procmail -r -t SENDER=${sender} RECIPIENT=${recipient} DOMAIN=${nexthop} -m USER=${user} EXTENSION=${extension} /etc/procmailrc
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_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -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

9

Re: Help! No Mail delivery following ISP reboot

digitalquill wrote:

Done a postqueue -f
<snip>
should I worry about those in teh queue?
<snip>

Yes, you should worry about because it seems it made an error "mail transport unavailable" and don't deliver.

I checked your postfix's config and I don't see anything wrong.

Maybe, retry with "postsuper -r ALL"

10

Re: Help! No Mail delivery following ISP reboot

They seem to be coming through or failing which is ok, new mail is being delivered. I may have lost a few emails but thats not so bad

Thanks for all the help

Matt