> Can be done through a custom hook, e.g.:
>
Not sure, if I can use it (because I don't understand perl :-) )
>
> Indeed, or easier through $forward_method:
>
> $policy_bank{'ORIGINATING'} = {
> ...
> forward_method => 'smtp:[127.0.0.1]:10025',
> ...
> };
>
I tred that one out, but it does not use the correct forward_method:
Dec 20 18:03:12 mx0 postfix/smtpd[11660]: connect from
ip-109-91-218-68.unitymediagroup.de[109.91.218.68]
Dec 20 18:03:12 mx0 postfix/smtpd[11660]: setting up TLS connection from
ip-109-91-218-68.unitymediagroup.de[109.91.218.68]
Dec 20 18:03:13 mx0 postfix/smtpd[11660]: Anonymous TLS connection established
from ip-109-91-218-68.unitymediagroup.de[109.91.218.68]: TLSv1 with cipher
AES128-SHA (128/128 bits)
Dec 20 18:03:13 mx0 postfix/smtpd[11660]: 3E80E520AE:
client=ip-109-91-218-68.unitymediagroup.de[109.91.218.68],
sasl_method=CRAM-MD5,[email protected]
#1 Inserting
Dec 20 18:03:13 mx0 postfix/cleanup[11665]: 3E80E520AE: prepend: header From:
Christian Roessner <[email protected]> from
ip-109-91-218-68.unitymediagroup.de[109.91.218.68];
from=<[email protected]> to=<[email protected]> proto=ESMTP
helo=<[192.168.1.200]>: VBR-Info: md=roessner-network-solutions.com;
mv=dwl.spamhaus.org; mc=all
Dec 20 18:03:13 mx0 postfix/cleanup[11665]: 3E80E520AE:
message-id=<2702af90-afa2-43f5-afe9-ca4ed8f13...@roessner-network-solutions.com>
Dec 20 18:03:13 mx0 postfix/qmgr[11648]: 3E80E520AE:
from=<[email protected]>, size=1883, nrcpt=1 (queue active)
Dec 20 18:03:14 mx0 postfix-10025/smtpd[11669]: connect from ip6-localhost[::1]
Dec 20 18:03:14 mx0 postfix-10025/smtpd[11669]: 09442520B4:
client=ip6-localhost[::1],
orig_client=ip-109-91-218-68.unitymediagroup.de[109.91.218.68]
#2 Inserting. Error
Dec 20 18:03:14 mx0 postfix/cleanup[11665]: 09442520B4: prepend: header From:
Christian Roessner <[email protected]> from
ip-109-91-218-68.unitymediagroup.de[109.91.218.68];
from=<[email protected]> to=<[email protected]> proto=ESMTP
helo=<[192.168.1.200]>: VBR-Info: md=roessner-network-solutions.com;
mv=dwl.spamhaus.org; mc=all
Dec 20 18:03:14 mx0 postfix/cleanup[11665]: 09442520B4:
message-id=<2702af90-afa2-43f5-afe9-ca4ed8f13...@roessner-network-solutions.com>
Dec 20 18:03:14 mx0 postfix/qmgr[11648]: 09442520B4:
from=<[email protected]>, size=2927, nrcpt=1 (queue active)
Dec 20 18:03:14 mx0 amavis[11434]: (11434-01) Passed CLEAN, MYUSERS/MYUSERS
LOCAL [109.91.218.68] [109.91.218.68] <[email protected]> ->
<[email protected]>, Message-ID:
<2702af90-afa2-43f5-afe9-ca4ed8f13...@roessner-network-solutions.com>, mail_id:
wt65Q1ZKpcjt, Hits: -1, size: 1883, queued_as: 09442520B4,
dkim_new=de10000:roessner-network-solutions.com, 762 ms
Dec 20 18:03:14 mx0 postfix/lmtp[11666]: 3E80E520AE: to=<[email protected]>,
relay=::1[::1]:10026, delay=0.98, delays=0.16/0.02/0.04/0.77, dsn=2.0.0,
status=sent (250 2.0.0 from MTA(smtp:[::1]:10025): 250 2.0.0 Ok: queued as
09442520B4)
Dec 20 18:03:14 mx0 postfix/qmgr[11648]: 3E80E520AE: removed
Dec 20 18:03:14 mx0 postfix/smtp[11670]: 09442520B4: to=<[email protected]>,
relay=mx-ha01.web.de[217.72.192.149]:25, delay=0.26, delays=0.1/0.07/0.04/0.04,
dsn=2.0.0, status=sent (250 OK id=1PUj8k-0002ij-00)
Dec 20 18:03:14 mx0 postfix/qmgr[11648]: 09442520B4: removed
Dec 20 18:04:13 mx0 postfix/smtpd[11660]: disconnect from
ip-109-91-218-68.unitymediagroup.de[109.91.218.68]
amavisd.conf part:
$forward_method = 'smtp:[::1]:10025';
$notify_method = $forward_method;
...
$policy_bank{'ORIGINATING'} = {
forward_method => 'smtp:[::1]:10125',
};
$policy_bank{'MYNETS'} = {
originating => 1,
warnbadhsender => 1,
bypass_banned_checks_maps => [1],
terminate_dsn_on_notify_success => 0,
final_virus_destiny => D_DISCARD,
final_spam_destiny => D_DISCARD,
spam_admin_maps => [ $RNSPOSTMASTER ],
os_fingerprint_method => undef,
};
$policy_bank{'MYUSERS'} = {
originating => 1,
allow_disclaimers => 1,
final_virus_destiny => D_BOUNCE,
final_spam_destiny => D_BOUNCE,
spam_admin_maps => [ $RNSPOSTMASTER ],
os_fingerprint_method => undef,
};
$policy_bank{'MAILMAN'} = {
originating => 1,
bypass_virus_checks_maps => [1],
bypass_spam_checks_maps => [1],
bypass_banned_checks_maps => [1],
os_fingerprint_method => undef,
};
$policy_bank{'TRUSTED'} = {
bypass_spam_checks_maps => [1],
bypass_banned_checks_maps => [1],
};
In master.cf:
# Return path for amavisd-new with smtpd_proxy_filter, doing header_checks
[::1]:10025 inet n - - - - smtpd
-o syslog_name=postfix-10025
-o smtpd_authorized_xforward_hosts=[::1]/128
-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 mynetworks=[::1]/128
-o receive_override_options=no_unknown_recipient_checks
-o smtpd_command_filter=
-o local_header_rewrite_clients=
# Return path for amavisd-new with content_filter, skipping header_checks
[::1]:10125 inet n - - - - smtpd
-o syslog_name=postfix-10125
-o smtpd_authorized_xforward_hosts=[::1]/128
-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 mynetworks=[::1]/128
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_command_filter=
-o local_header_rewrite_clients=
So what you can see is that the syslog_name might help here. The wrong return
path is chosen in amavisd. And I don't know why :-)
Christian
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
Please visit http://www.ijs.si/software/amavisd/ regularly
For administrativa requests please send email to rainer at openantivirus dot
org