OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: "Blocked MTA-BLOCKED", fwd-connect error with amavisd<->postfix

From: Oskar Eyb (oskar-postfixeyb.de)
Date: Wed Dec 26 2007 - 09:28:54 CST


Hi,

> I *think* it might be that postfix is rejecting the mail being
> injected back - what have you specified in mynetworks, for example?

hmm.. But I can send mail to postfix on port 10025 from memydomain to
echofu-berlin.de , this is not beeing rejected!
Only from amavis.. I dont know what there is different.

of course, here it is:

command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
daemon_directory = /usr/local/libexec/postfix
debug_peer_level = 2
header_checks = pcre:/usr/local/etc/postfix/header_checks.pcre
html_directory = no
inet_interfaces = 127.0.0.2
mail_owner = postfix
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
masquerade_domains = $myhostname $mydomain
mydomain = eyb.de
myhostname = srv.intra.eyb.de
mynetworks = 10.0.0.0/24, 127.0.0.0/8
mynetworks_style = subnet
myorigin = $mydomain
newaliases_path = /usr/local/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
relay_domains = proxy:mysql:/usr/local/etc/postfix/sql_relay_domains_maps.cf
relayhost = smtprelaypool.ispgateway.de
sample_directory = /usr/local/etc/postfix
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtpd_banner = $myhostname ESMTP (pri-mx1)
smtpd_client_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client
list.dsbl.org, permit
smtpd_data_restrictions = permit_mynetworks,
reject_unauth_pipelining, permit
smtpd_helo_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_invalid_hostname,
reject_non_fqdn_hostname, permit
smtpd_recipient_restrictions = reject_unknown_recipient_domain,
reject_non_fqdn_recipient, permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination,
check_policy_service inet:127.0.0.2:10023, permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = reject_unknown_sender_domain,
reject_non_fqdn_sender, permit_mynetworks,
permit_sasl_authenticated, reject_rhsbl_sender rhsbl.sorbs.net,
reject_rhsbl_sender dsn.rfc-ignorant.org, permit
smtpd_tls_CAfile = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_cert_file = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_key_file = /usr/local/etc/postfix/ssl/smtpd.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
soft_bounce = yes
tls_random_source = dev:/dev/urandom
transport_maps = mysql:/usr/local/etc/postfix/sql_transport_maps.cf,
pcre:/usr/local/etc/postfix/transport.pcre
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/usr/local/etc/postfix/sql_virtual_alias_maps.cf
virtual_gid_maps = static:130
virtual_mailbox_base = /var/mail
virtual_mailbox_domains =
mysql:/usr/local/etc/postfix/sql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_limit_maps =
mysql:/usr/local/etc/postfix/sql_virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = $transport_maps,
mysql:/usr/local/etc/postfix/sql_virtual_mailbox_maps.cf
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn
his diskspace quota, please try again later.
virtual_minimum_uid = 130
virtual_overquota_bounce = yes
virtual_transport = virtual
virtual_uid_maps = static:130

Regards,
Oskar

Ronald MacDonald schrieb am 26.12.2007 14:18:
> Hi Oskar,
>
> postconf -n output would be useful.
>
> I'm not absolutely brilliant at this, but I think the problem is as follows:
>
> I *think* it might be that postfix is rejecting the mail being injected back
> - what have you specified in mynetworks, for example?
>
> Ronald.
>
> On 26/12/2007, Oskar Eyb <oskar-postfixeyb.de> wrote:
>> Hi!
>>
>> I have worked a lot on postfix - amavisd but I have still an failure
>> which I cant solve.
>>
>> inject a mail by $ telnet 127.0.0.2 10025
>>
>>
>> // so, the message is forwarded by postfix successfully to amavisd-new.
>>
>> Dec 26 13:13:25 srv postfix/qmgr[8384]: 15B4A11852AA:
>> from=<(mysenderadr)>, size=370, nrcpt=1 (queue active)
>> Dec 26 13:13:26 srv amavis[8427]: (08427-01) LMTP::10024
>> /var/amavis/tmp/amavis-20071226T131326-08427: <(mysenderadr)> ->
>> <echofu-berlin.de> SIZE=370 Received: from srv.intra.eyb.de
>> ([127.0.0.2]) by localhost (srv.intra.eyb.de [127.0.0.2]) (amavisd-new,
>> port 10024) with LMTP for <echofu-berlin.de>; Wed, 26 Dec 2007 13:13:26
>> +0100 (CET)
>>
>>
>> // Here amavisd gets into trouble
>>
>> Dec 26 13:13:26 srv amavis[8427]: (08427-01) Checking: NJZugHtZUXfN
>> [127.0.0.2] <(mysenderadr)> -> <echofu-berlin.de>
>> Dec 26 13:13:26 srv amavis[8427]: (08427-01) (!)FWD via SMTP:
>> <(mysenderadr)> -> <echofu-berlin.de>, 451 4.5.0 From
>> MTA([[[127.0.0.2]]]:10025) during fwd-connect (errno=Invalid argument):
>> id=08427-01
>>
>>
>> // and explained why.. but I dont understand this. „BLOCKED MTAÂ"...
>> // I have injected by telnet on 127.0.0.2:10025 from 127.0.0.2 to
>> // postfix successfully a mail. Why amavisd-new fails here??
>> // I guess, that 'fwd-connect' means, that amavis is trying to send back
>> // the mail to postfix.
>>
>>
>> Dec 26 13:13:26 srv amavis[8427]: (08427-01) Blocked MTA-BLOCKED, LOCAL
>> [127.0.0.2] [127.0.0.2] <(mysenderadr)> -> <echofu-berlin.de>,
>> Message-ID: <20071226121319.15B4A11852AAsrv.intra.eyb.de>, mail_id:
>> NJZugHtZUXfN, Hits: -, size: 370, 750 ms
>>
>>
>> Dec 26 13:13:26 srv postfix/lmtp[8470]: 15B4A11852AA:
>> to=<echofu-berlin.de>, relay=127.0.0.2[127.0.0.2]:10024, delay=14,
>> delays=13/0.06/0.05/0.73, dsn=4.5.0, status=deferred (host
>> 127.0.0.2[127.0.0.2] said: 451 4.5.0 From MTA([[[127.0.0.2]]]:10025)
>> during fwd-connect (errno=Invalid argument): id=08427-01 (in reply to
>> end of DATA command))
>>
>>
>>
>>
>>
>> Regards,
>> Oskar
>>
>>
>>
>>
>> masteer.cf
>> ==========================================================================
>> # service type private unpriv chroot wakeup maxproc command + args
>> # (yes) (yes) (yes) (never) (100)
>> #
>> ==========================================================================
>>
>> #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
>> smtp unix - - n - - smtp
>> # When relaying mail as backup MX, disable fallback_relay to avoid MX
>> loops
>> relay unix - - n - - smtp
>> -o 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
>> #
>>
>>
>>
>> pickup fifo n - n 60 1 pickup
>> -o cleanup_service_name=pre-cleanup
>>
>>
>> smtp inet n - n - - smtpd
>> -o cleanup_service_name=pre-cleanup
>> -o content_filter=amavis-lmtp:[127.0.0.2]:10024
>>
>>
>>
>> amavis-lmtp unix - - n - 2 lmtp
>> -o lmtp_data_done_timeout=1200
>> -o lmtp_send_xforward_command=yes
>> -o disable_dns_lookups=yes
>> -o max_use=20
>>
>> 127.0.0.1:10025 inet n - n - - smtpd
>> -o content_filter=
>> -o local_recipient_maps=
>> -o relay_recipient_maps=
>> -o smtpd_delay_reject=no
>> -o smtpd_restriction_classes=
>> -o smtpd_client_restrictions=
>> -o smtpd_helo_restrictions=
>> -o smtpd_sender_restrictions=
>> -o smtpd_recipient_restrictions=permit_mynetworks,reject
>> -o smtpd_data_restrictions=reject_unauth_pipelining
>> -o smtpd_end_of_data_restrictions=
>> -o mynetworks=127.0.0.0/8
>> -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
>>
>>
>> dspam unix - n n - - pipe
>> flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user
>> global \
>> --deliver=innocent,spam --feature=chained,noise -i -f ${sender} --
>> ${recipient}
>>
>> dspam-spam unix - n n - - pipe
>> flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user
>> global \
>> --class=spam --source=error ${sender} --deliver=spam
>>
>> dspam-notspam unix - n n - - pipe
>> flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user
>> global \
>> --class=innocent --source=error ${sender} --deliver=innocent
>>
>> cleanup unix n - n - 0 cleanup
>> -o header_checks=
>> -o mime_header_checks=
>> -o nested_header_checks=
>> -o body_checks=
>>
>> pre-cleanup unix n - n - 0 cleanup
>> -o canonical_maps=
>> -o sender_canonical_maps=
>> -o recipient_canonical_maps=
>> -o masquerade_domains=
>> -o always_bcc=
>> -o sender_bcc_maps=
>> -o recipient_bcc_maps=
>>
>> local unix - n n - - local
>> -o content_filter=
>> -o myhostname=HOSTNAME
>> -o local_recipient_maps=
>> -o relay_recipient_maps=
>> -o mynetworks=127.0.0.0/8
>> -o mynetworks_style=host
>> -o smtpd_restriction_classes=
>> -o smtpd_client_restrictions=
>> -o smtpd_helo_restrictions=
>> -o smtpd_sender_restrictions=
>> -o smtpd_recipient_restrictions=permit_mynetworks,reject
>>
>>
>>
>>
>
>