# Postfix Probs



## redcoon (9. März 2010)

Hallo Leute,

Ich habe Probleme mit meinem Postfix Mailserver und zwar glaube ich, dass nicht alle Mails ankommen.

In den mail.log konnte ich folgendes finden:

```
Mar  9 08:36:45 server postfix/smtpd[21711]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[21711]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[17246]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[17246]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[19814]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[19814]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[30623]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[30623]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:45 server postfix/smtpd[14249]: lost connection after MAIL from lnxp-1927.app.mediaways.net[195.71.127.38]
Mar  9 08:36:45 server postfix/smtpd[14249]: disconnect from lnxp-1927.app.mediaways.net[195.71.127.38]
Mar  9 08:36:46 server postfix/smtpd[10459]: lost connection after MAIL from srv69.mailer-service.de[217.115.132.169]
Mar  9 08:36:46 server postfix/smtpd[10459]: disconnect from srv69.mailer-service.de[217.115.132.169]
Mar  9 08:36:46 server postfix/smtpd[13751]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:46 server postfix/smtpd[13751]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:46 server postfix/smtpd[24241]: warning: network_biopair_interop: error writing 53 bytes to the network: Broken pipe
Mar  9 08:36:46 server postfix/smtpd[24241]: lost connection after MAIL from mo-p00-fb.rzone.de[81.169.146.163]
Mar  9 08:36:46 server postfix/smtpd[24241]: disconnect from mo-p00-fb.rzone.de[81.169.146.163]
Mar  9 08:36:46 server postfix/smtpd[17059]: lost connection after MAIL from sjl-smtp12.sjl.youtube.com[208.65.153.16]
Mar  9 08:36:46 server postfix/smtpd[17059]: disconnect from sjl-smtp12.sjl.youtube.com[208.65.153.16]
Mar  9 08:36:46 server postfix/smtpd[24242]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:46 server postfix/smtpd[24242]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[29484]: lost connection after MAIL from mm-notify-out-21102.amazon.com[194.7.41.152]
Mar  9 08:36:47 server postfix/smtpd[29484]: disconnect from mm-notify-out-21102.amazon.com[194.7.41.152]
Mar  9 08:36:47 server postfix/smtpd[25558]: lost connection after MAIL from mm-notify-out-21102.amazon.com[194.7.41.152]
Mar  9 08:36:47 server postfix/smtpd[25558]: disconnect from mm-notify-out-21102.amazon.com[194.7.41.152]
Mar  9 08:36:47 server postfix/smtpd[23319]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[23319]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[2278]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[2278]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[32160]: lost connection after MAIL from mail.gmx.net[XXX.XXX.64.20]
Mar  9 08:36:47 server postfix/smtpd[32160]: disconnect from mail.gmx.net[XXX.XXX.64.20]
Mar  9 08:36:47 server postfix/smtpd[20505]: lost connection after MAIL from mm-notify-out-21102.amazon.com[194.7.41.152]
Mar  9 08:36:47 server postfix/smtpd[20505]: disconnect from mm-notify-out-21102.amazon.com[194.7.41.152]
Mar  9 08:36:47 server postfix/smtpd[19258]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[19258]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[8768]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[8768]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[28592]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[28592]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[31717]: lost connection after MAIL from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[14567]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[31717]: disconnect from mercure-twei.ccemails.net[81.92.123.28]
Mar  9 08:36:47 server postfix/smtpd[14567]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[18253]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[18253]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[1662]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[1662]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[13115]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[13115]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[22327]: lost connection after MAIL from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[22327]: disconnect from aluminium-fith.ccmdcampaigns.net[81.92.122.53]
Mar  9 08:36:47 server postfix/smtpd[31716]: lost connection after MAIL from mm-notify-out-21102.amazon.com[194.7.41.152]
```
[...]

Sind das Mails die abgelegnt worden sind?


```
Mar  9 08:43:14 server imapd: Connection, ip=[::ffff:XXX.XXX.75.98]
Mar  9 08:43:14 server imapd: LOGIN, user=manfred@servername.de, ip=[::ffff:XXX.XXX.75.98], port=[33234], protocol=IMAP
Mar  9 08:43:14 server imapd: Error reading ACLs for : Invalid argument
Mar  9 08:43:14 server imapd: Error reading ACLs for : Invalid argument
Mar  9 08:43:15 server imapd: Connection, ip=[::ffff:XXX.XXX.75.98]
Mar  9 08:43:15 server imapd: LOGIN, user=manfred@servername.de, ip=[::ffff:XXX.XXX.75.98], port=[33235], protocol=IMAP
Mar  9 08:43:15 server imapd: Error reading ACLs for : Invalid argument
Mar  9 08:43:17 server imapd: Error reading ACLs for : Invalid argument
Mar  9 08:43:23 server postfix/anvil[26147]: statistics: max connection rate 2/60s for (smtp:XXX.XXX.64.20) at Mar  9 08:39:23
Mar  9 08:43:23 server postfix/anvil[26147]: statistics: max connection count 2 for (smtp:XXX.XXX.64.20) at Mar  9 08:39:23
Mar  9 08:43:23 server postfix/anvil[26147]: statistics: max cache size 10 at Mar  9 08:36:23
Mar  9 08:43:54 server imapd: LOGOUT, user=manfred@servername.de, ip=[::ffff:XXX.XXX.75.98], headers=0, body=0, rcvd=218, sent=950, time=40
Mar  9 08:43:54 server imapd: LOGOUT, user=manfred@servername.de, ip=[::ffff:XXX.XXX.75.98], headers=0, body=0, rcvd=144, sent=842, time=39
Mar  9 08:45:02 server pop3d: Connection, ip=[::ffff:XXX.XXX.29.131]
Mar  9 08:45:02 server pop3d: Disconnected, ip=[::ffff:XXX.XXX.29.131]
Mar  9 08:45:02 server imapd: Connection, ip=[::ffff:XXX.XXX.29.131]
Mar  9 08:45:02 server imapd: Disconnected, ip=[::ffff:XXX.XXX.29.131], time=0
Mar  9 08:45:02 server postfix/smtpd[4545]: connect from server.servername.de[XXX.XXX.29.131]
Mar  9 08:45:02 server postfix/smtpd[4545]: lost connection after CONNECT from server.servername.de[XXX.XXX.29.131]
```
Vor allem der Error macht mich stutzig.. Error reading ACLs for: Invalid argument??
Un es wird eine Max. Connection rate abgezeigt.. ich hatte schonmal das hier in den Logs deswegen gibt es vll dort einen Error, dass der Mailserver so oft ausfällt:


```
Mar  9 08:22:22 server postfix/smtp[30112]: warning: connect to mysql server 127.0.0.1: Host 'server.servername.de' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
Mar  9 08:22:22 server postfix/smtp[30112]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
```
Für eine Hilfe wäre ich sehr dankbar...

Amavis habe ich in der main.cf auskommentiert, da es mit überhaupt nicht geht (Mails werden nicht zugestellt und landen im Queue)

Komischerweise kommen die ganzen Mails im Queue auch jetzt nicht raus, sogar wenn man mit postqueue -f spült...hmmm

OK danke schonmal
Mfg RedCoon


----------



## redcoon (9. März 2010)

P.S.: Falls benötigt hier ein paar Configs

main.cf

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


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package  for
# information on enabling SSL in the smtp client.

myhostname = server.servername.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server.servername.de, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = XXX.XXX.29.131, 127.0.0.1
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps =  proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf,  mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains =  proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps =  proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks,  permit_sasl_authenticated, check_recipient_access  mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps =  mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps =  proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is  over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination  $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps  $virtual_mailbox_domains $relay_recipient_maps $relay_domains  $canonical_maps $sender_canonical_maps $recipient_canonical_maps  $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access  mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access  mysql:/etc/postfix/mysql-virtual_client.cf
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
#content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
```
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 vmail ${extension}  ${recipient} ${user} ${nexthop} ${sender}
#
# 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}


amavis unix - - - - 2 smtp
        -o smtp_data_done_timeout=1200
        -o smtp_send_xforward_command=yes

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_client_restrictions=
        -o smtpd_helo_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o mynetworks=127.0.0.0/8
        -o strict_rfc821_envelopes=yes
        -o  receive_override_options=no_unknown_recipient_checks,no_header_body_checks
        -o smtpd_bind_address=127.0.0.1
```


----------



## Till (10. März 2010)

Installier bitte mal dir 3.0.2 rc 1 (siehe dev forum für download) und wähle beim update aus die dienste zu rekonfigurieren.


----------



## redcoon (10. März 2010)

ok hab ich gemacht.. hat wieder erst funktioniert als ich den content_filter deaktiviert habe...

jetzt habe ich folgende mail.log:


> Mar 10 12:25:04 server pop3d: Connection, ip=[::ffff:XXX.XXX.29.131]
> Mar 10 12:25:04 server pop3d: Disconnected, ip=[::ffff:XXX.XXX.29.131]
> Mar 10 12:25:04 server postfix/smtpd[24501]: connect from server.servername.de[XXX.XXX.29.131]
> Mar 10 12:25:04 server postfix/smtpd[24501]: lost connection after CONNECT from server.servername.de[XXX.XXX.29.131]
> ...


ich hab n para mal diese statistiken mit dem max. connections drin... stellt das ein problem dar? bzw verändert/vernichtet er dadurch nachrichten?

mfg redcoon


----------



## Till (11. März 2010)

Ok. Dann liegt das problem irgendwo beim amavisd. 

a) Was steht denn genau im mail log, wenn Du den content filter drin hast und dann eine Email schickst?
b) Starte mal amavisd neu, erhältst Du irgendeine Fehlermeldung im mail log oder auf der shell?


----------



## stefanr (13. März 2010)

Hallo,

ich habe ein ähnliches Problem, ich erhalte folgende Fehlermeldung in /var/log/mail.log


```
Mar 12 16:24:49 server imapd: Error reading ACLs for  INBOX.verzeichnis/unterverzeichnis: Invalid argument
Mar 12 16:24:49 server imapd: Error reading ACLs for  INBOX.verzeichnis/unterverzeichnis: Invalid argument
Mar 12 16:24:49 server imapd: Error reading ACLs for  INBOX.verzeichnis/unterverzeichnis: Invalid argument
Mar 12 16:24:49 server imapd: Error reading ACLs for  INBOX.verzeichnis/unterverzeichnis: Invalid argument
Mar 12 16:24:49 server imapd: Error reading ACLs for  INBOX.verzeichnis/unterverzeichnis: Invalid argument
Mar 12 16:24:49 server imapd: Error reading ACLs for  INBOX.verzeichnis/unterverzeichnis: Invalid argument
Mar 12 17:00:00 server pop3d: Maximum connection limit reached for  ::ffff:88.78.24.178
```
habe allerdings meinen Amavisin der main.cf NICHT auskommentiert, das email nicht zugestellt werden habe ich so noch nicht mitbekommen.

Ich kann mich aber erinnern eine Regel für das INBOX.verzeichnis/unterverzeichnis angelegt zu haben diese aber eigentlich wieder gelöscht, nun sind nur die Logeinträge noch vorhanden.

was könnte ich noch tun das die Medlungen nicht mehr erscheinen?

Gruß

STEFAN

ISP Version: 3.0.2
System: debian/etch


----------



## redcoon (14. März 2010)

@Till:

zu a) Da steht gar nichts von der Mail drin weil der Server gar nicht an die Zugangsdaten kommt -> table lookup problem

zu b) Nein Fehlermeldungen kommen nicht auch nicht im verbose-modus


----------



## Till (15. März 2010)

@redcoon: Installier bitte mal das update auf ispconfig 3.0.2 und wähle während des updates aus, dass er die Dienste rekonfigurieren soll. Dann wird auch die amavisd Konfiguration neu geschrieben.


----------

