Hi All Postfix Users,

I've one question with one advanced Postfix configuration.

My architecture:
2 Frontal Server MX01 (Prio 10) and MX02 (Prio 20) with Postfix and Dovecot.
1 Backend Server FILTERGW with Postfix and SpamAssassin and Amavis.

When one mail come to MX01, I check with MySQL if the recipient would scan spam 
& virus, juste scan virus or no scan.
If the recipient would just virus, the mail it's relayed to FILTERGW on a 
specific port with a content_filter to Amavis.
Same if the recipient would no virus and no spam scan, the mail it's relayed to 
FILTERGW on a specific port for Amavis who I disable the scann.

For this 2 version that work really good, my problem it's just if the customer 
would the SPAM scan.
If the recipient would spam I force virus scan.

MX01 relay the mail to the port 10027 (FILTERGW), on this port I've (in the 
master.cf):
10027   inet            n               -               n               -       
        -               smtpd
                -o content_filter=spamassassin
                -o disable_dns_lookups=yes
                -o smtp_send_xforward_command=yes
                -o smtp_bind_address=10.8.1.6
                -o smtpd_recipient_restrictions=permit_mynetworks,reject
                -o mynetworks=10.8.1.3,10.8.1.4,10.8.1.6,127.0.0.1
                -o 
receive_override_options=no_unknown_recipient_checks,no_header_body_checks
                -o local_recipient_maps=
                -o relay_recipient_maps=
                -o smtpd_sender_restrictions=
                -o smtpd_helo_restrictions=
                -o smtpd_client_restrictions=
                -o smtpd_restriction_classes=

spamassassin    unix            -               n               n               
-               -               pipe
                flags=Rq user=vmail argv=/usr/bin/spamc -u ${user}@${nexthop} 
-e /usr/sbin/sendmail -oi -f ${sender} ${recipient}

The mail enter on the 10027 and it's scanned by SpamAssassin, but after I've my 
problem ...
SpamAssassin give again the mail to FILTERGW after the scan, but FILTERGW send 
the mail to MX01 (prio 10 in the MX record) and ... One Loop start ...

My wish it's, after the "spamassassin" process, I would that the mail it's 
relayed to "antivirusseul:[127.0.0.1]:10032".

At the moment, I've add this line in the main.cf
transport_maps = hash:/etc/postfix/spamassast

In the spamassast I've
* smtp:[127.0.0.1]:10032

This process work, when SpamAssassin have finish the scan, they give again the 
mail to postfix, and posfix force the transport to Amavis Port.
Amavis make the scan for virus, and after they send the mail to MX02 who 
Dovecot save the mail.

I would make that more clean, and since 2 weeks I search a issue for not using 
"transport_maps" because all locale mail that I would send from FILTERGW (ex 
with the "mail" command) are send to the transport_maps ...
I would not use SpamAssassin into Amavis ;) I would it's possible use only the 
master.cf

Sorry for this long mail, but I've think it's better if I explain the request 
correctly.

Thank a lot all for you suggestion and your help.

Thierry Fougera


-- My main.cf config --
root@filtergw:/etc/postfix# cat main.cf
########################################
# CONFIGURATION DES CHEMINS DE POSTFIX #
########################################
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq

###########################
# CONFIGURATION DU RESEAU #
###########################
myhostname = filtergw.adv.local
mydomain = adv.local
myorigin = filtergw.adv.local
mynetworks_style = host
mynetworks = 127.0.0.1, 10.8.1.3, 10.8.1.4, 10.8.1.6
transport_maps = hash:/etc/postfix/spamassast

#################################
# CONFIGURATION AVANCEE POSTFIX #
#################################
smtpd_banner = $myhostname ESMTP $mail_name
mail_owner = postfix
unknown_local_recipient_reject_code = 550
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
setgid_group = postdrop
message_size_limit = 2048000000
mailbox_size_limit = 2048000000
soft_bounce = yes
dspam_destination_recipient_limit = 1
smtpd_helo_restrictions = permit_mynetworks,reject
readme_directory = /usr/share/doc/postfix
html_directory = /usr/share/doc/postfix/html

Reply via email to