Hallo,

Dit is mijn main.cnf

# 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 (Ubuntu)
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 = no

# TLS parameters
#smtpd_tls_cert_file = /etc/ssl/certs/iRedMail_CA.pem
#smtpd_tls_key_file = /etc/ssl/private/iRedMail.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 = mail.example.com
#myhostname = vps28845.public.cloudvps.com
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
myorigin = mail.example.com
mydestination = $myhostname, localhost, localhost.localdomain,
localhost.$myhostname
relayhost =
mynetworks = 127.0.0.0/8,192.168.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_alias_domains =
mydomain = public.cloudvps
mynetworks_style = subnet
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sender_restrictions = permit_mynetworks,
reject_sender_login_mismatch, permit_sasl_authenticated
#smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated
delay_warning_time = 0h
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_sender_restrictions
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
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
message_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,
proxy:mysql:/etc/postfix/mysql/catchall_maps.cf,
proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
sender_bcc_maps = proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf,
proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
recipient_bcc_maps = proxy:mysql:/etc/postfix/mysql/
recipient_bcc_maps_user.cf, proxy:mysql:/etc/postfix/mysql/
recipient_bcc_maps_domain.cf
relay_domains = $mydestination, proxy:mysql:/etc/postfix/mysql/
relay_domains.cf
smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/
sender_login_maps.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
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
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10031
smtpd_tls_security_level = may
smtpd_tls_loglevel = 0
smtpd_tls_CAfile = /etc/ssl/certs/iRedMail_CA.pem
tls_random_source = dev:/dev/urandom
mailbox_command = /usr/lib/dovecot/deliver
#virtual_transport = filter-pipe
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
smtp-amavis_destination_recipient_limit = 1


And the master contains beside the defaults:

filter-pipe    unix  -       n       n       -       10      pipe
    flags=FX user=vmail null_sender=
argv=/srv/scripts/postmasterFilterScript.sh -f ${sender} -- ${recipient}

127.0.0.1:10025 inet n  -   -   -   -  smtpd
    -o content_filter=filter-pipe:dummy
    -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

# First domain with SSL
XXX.XXX.XXX.180:smtp inet n - - - - smtpd
        -o smtpd_proxy_filter=
        -o content_filter=filter-pipe:dummy
        -o smtpd_sasl_auth_enable=yes
        -o smtpd_tls_key_file=/etc/ssl/private/mail.example.com.key
        -o smtpd_tls_cert_file=/etc/ssl/certs/mail.example.com.bundle
        -o smtp_helo_name=mail.example.com
        -o smtpd_banner=mail.example.com

# Second domain with SSL
XXX.XXX.XXX.227:smtp inet n - n - - smtpd
        -o smtpd_proxy_filter=127.0.0.1:10024
        -o content_filter=
        -o smtpd_sasl_auth_enable=yes
        -o smtpd_tls_key_file=/etc/ssl/private/mail.example.eu.key
        -o smtpd_tls_cert_file=/etc/ssl/certs/mail.example.eu.bundle
        -o smtp_helo_name=mail.example.eu
        -o smtpd_banner=mail.example.eu


With this configuration all go wrong and it loops around. Here are the log
lines:


Jan 31 18:49:36 mailserver1 postfix/smtpd[4872]: connect from
mail-ea0-f178.google.com[209.85.215.178]
Jan 31 18:49:36 mailserver1 postfix/smtpd[4872]: NOQUEUE: client=
mail-ea0-f178.google.com[209.85.215.178]
Jan 31 18:49:37 mailserver1 postfix/smtpd[4883]: connect from
localhost[127.0.0.1]
Jan 31 18:49:37 mailserver1 postfix/smtpd[4883]: 38EF68036A:
client=localhost[127.0.0.1]
Jan 31 18:49:37 mailserver1 postfix/cleanup[4884]: 38EF68036A: message-id=<
52ebe216.80...@test.nl>
Jan 31 18:49:37 mailserver1 postfix/smtpd[4883]: disconnect from
localhost[127.0.0.1]
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 38EF68036A: from=<
mich...@test.nl>, size=2484, nrcpt=1 (queue active)
Jan 31 18:49:37 mailserver1 amavis[1366]: (01366-05) Passed CLEAN, LOCAL
[209.85.215.178] [82.72.204.85] <mich...@test.nl> -> <mich...@example.com>,
Message-ID: <52ebe216.80...@test.nl>, mail_id: I4jZoVNgJO0E, Hits: -0.7,
size: 2024, queued_as: 38EF68036A, 345 ms
Jan 31 18:49:37 mailserver1 postfix/smtpd[4872]: proxy-accept:
END-OF-MESSAGE: 250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued
as 38EF68036A; from=<mich...@test.nl> to=<mich...@example.com> proto=ESMTP
helo=<mail-ea0-f178.google.com>
Jan 31 18:49:37 mailserver1 postfix/smtpd[4872]: disconnect from
mail-ea0-f178.google.com[209.85.215.178]
Jan 31 18:49:37 mailserver1 postfix/pickup[4863]: 405E9810EF: uid=1000
from=<mich...@test.nl>
Jan 31 18:49:37 mailserver1 postfix/pipe[4885]: 38EF68036A: to=<
mich...@example.com>, relay=filter-pipe, delay=0.04,
delays=0.02/0.01/0/0.02, dsn=2.0.0, status=sent (delivered via filter-pipe
service)
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 38EF68036A: removed
Jan 31 18:49:37 mailserver1 postfix/cleanup[4884]: 405E9810EF: message-id=<
52ebe216.80...@test.nl>
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 405E9810EF: from=<
mich...@test.nl>, size=2603, nrcpt=1 (queue active)
Jan 31 18:49:37 mailserver1 postfix/smtpd[4883]: connect from
localhost[127.0.0.1]
Jan 31 18:49:37 mailserver1 postfix/smtpd[4883]: 86CFE8036A:
client=localhost[127.0.0.1]
Jan 31 18:49:37 mailserver1 postfix/cleanup[4884]: 86CFE8036A: message-id=<
52ebe216.80...@test.nl>
Jan 31 18:49:37 mailserver1 postfix/smtpd[4883]: disconnect from
localhost[127.0.0.1]
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 86CFE8036A: from=<
mich...@test.nl>, size=3099, nrcpt=1 (queue active)
Jan 31 18:49:37 mailserver1 amavis[32091]: (32091-11) Passed CLEAN, LOCAL
[127.0.0.1] [82.72.204.85] <mich...@test.nl> -> <mich...@example.com>,
Message-ID: <52ebe216.80...@test.nl>, mail_id: I+yHOx1X-P39, Hits: -0.7,
size: 2603, queued_as: 86CFE8036A, 282 ms
Jan 31 18:49:37 mailserver1 postfix/pickup[4863]: 8C72A810F5: uid=1000
from=<mich...@test.nl>
Jan 31 18:49:37 mailserver1 postfix/smtp[4894]: 405E9810EF: to=<
mich...@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.32,
delays=0.01/0.01/0/0.29, dsn=2.0.0, status=sent (250 2.0.0 from
MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 86CFE8036A)
Jan 31 18:49:37 mailserver1 postfix/pipe[4885]: 86CFE8036A: to=<
mich...@example.com>, relay=filter-pipe, delay=0.02, delays=0/0/0/0.02,
dsn=2.0.0, status=sent (delivered via filter-pipe service)
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 86CFE8036A: removed
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 405E9810EF: removed
Jan 31 18:49:37 mailserver1 postfix/cleanup[4884]: 8C72A810F5: message-id=<
52ebe216.80...@test.nl>
Jan 31 18:49:37 mailserver1 postfix/qmgr[4864]: 8C72A810F5: from=<
mich...@test.nl>, size=3218, nrcpt=1 (queue active)



This is what come up 10 times. When is finished i get the follow message in
my sender box

This is the mail system at host mail.example.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system
<mich...@example.com> <michael.tijh...@tjellens.eu>: host
127.0.0.1[127.0.0.1] said: 554 5.4.0
    id=05172-07 - Rejected by MTA on relaying, from MTA([127.0.0.1]:10025): 554
    5.4.0 Error: too many hops (in reply to end of DATA command)



Hope someone can help me with this issue. I tried to add the content filter
at the 'XXX.XXX.XXX.180:smtp inet n - - - - smtpd '
but also that not worked.

Thanks in advance

Michael


2014-01-28 Wietse Venema [via Postfix] <
ml-node+s1071664n64704...@n5.nabble.com>:

> bensjomic1:
> > Thank you for your answer.
> >
> > That is what i exactly was doing, after 1,5 days of trying I still not
> > can find a solution. The problem is, that when I use the filter,
> > following the example of the documentation. I get a loop.
>
> There are many ways that Postfix can report a loop. "I get a loop"
> is not sufficient to diagnose which loop scenario applies to you.
>
> If you want help then you need to show the logfile records for
> abnormal mail handling, and the configuration that is responsible
> for the logs. The master.cf fragment below is not sufficient.
>
>         Wietse
>
> > After trying many different ways i can not find the reason why the
> > server is doing.
> >
> > If i get the loop, it use the filterscript. And save the file (10 times)
> > then it returns the e-mail with a message that it have too many loops.
> >
> > This parts can in my server only handle the filter:
> >
> > 127.0.0.1:10025 inet n  -   -   -   -  smtpd
> >      -o content_filter=filter-pipe:dummy
> >      -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
>
> >
> > But every time it comes in a loop.
> >
> > The only 3 options i get is that it or handle the filter and start a
> > loop, or the filter is ignored or the mail not end anymore in the
> mailbox.
> >
> > What can it be?
> >
> > Michael
> >
> >
> > On 01/28/2014 01:29 PM, Wietse Venema [via Postfix] wrote:
> > > bensjomic1:
> > > > Since I use this confuration mail will be not deliverd and also not
> > > stored.
> > > > Sometimes it ignores the filter and go directly in the mailbox.
> > >
> > > My advice: go back to the working configuration.
> > >
> > > Make a first change, and verify that it works.
> > >
> > > Then make the second change, and verify that it works.
> > >
> > > Do not make a change before the previous change works.
> > >
> > > Crucially, look at the LOGFILE, both with "good" deliveries and
> > > bad.
> > >
> > >         Wietse
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > > If you reply to this email, your message will be added to the
> > > discussion below:
> > >
> http://postfix.1071664.n5.nabble.com/Problem-with-postfix-pipe-a-mail-tp64699p64700.html
>
> > >
> > > To unsubscribe from Problem with postfix pipe a mail, click here
> > > <
>
> > > NAML
> > > <
> http://postfix.1071664.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
> > >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> http://postfix.1071664.n5.nabble.com/Problem-with-postfix-pipe-a-mail-tp64699p64701.html
>
> > Sent from the Postfix Users mailing list archive at Nabble.com.
> >
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://postfix.1071664.n5.nabble.com/Problem-with-postfix-pipe-a-mail-tp64699p64704.html
>  To unsubscribe from Problem with postfix pipe a mail, click 
> here<http://postfix.1071664.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=64699&code=bWljaGFlbEBtdGlqaHVpcy5ubHw2NDY5OXw2NDE2NjEyNTY=>
> .
> NAML<http://postfix.1071664.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://postfix.1071664.n5.nabble.com/Problem-with-postfix-pipe-a-mail-tp64699p64860.html
Sent from the Postfix Users mailing list archive at Nabble.com.

Reply via email to