OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
running two postfix instances and amavisd

From: Alexey Koptsevich (kopts+asg654haboob.atmosp.physics.utoronto.ca)
Date: Thu Jan 05 2006 - 01:22:06 CST


Hello,

I am trying to run two postfix instances and amavisd on one host.
The second postfix instance is needed because I want to pass some
mail through amavisd, whereas some mail, relayed elsewhere
(to host whirlwind.atmosp.physics.utoronto.ca), should not
be scanned. The problem is that I cannot make it work. I read that
each instance should be running on a separate hostname or IP. I
tried both, no difference: bounce with "loops back to myself".

Here are excerpts from configs for the case of 2 separate IPs,
  128.100.80.90 for haboob.atmosp.physics.utoronto.ca,
  128.100.80.98 for webmail.atmosp.physics.utoronto.ca.

What is wrong here? Your advice is greatly appreciated.

Alex

  /etc/postfix.front/master.cf:

smtp inet n - n - 64 smtpd
        -o smtpd_client_connection_count_limit=32
smtp-amavis unix - - n - 64 smtp
        -o smtp_data_done_timeout=1200
        -o disable_dns_lookups=yes
        -o smtp_send_xforward_command=yes

  /etc/postfix.front/main.cf:

myhostname = haboob.atmosp.physics.utoronto.ca
mydomain = atmosp.physics.utoronto.ca
mail_spool_directory = /var/spool/maildir.front/
queue_directory = /var/spool/postfix.front
inet_interfaces = $myhostname
myorigin = atmosp.physics.utoronto.ca
mydestination =
relay_domains = $myhostname, localhost, $mydomain,
haboob.atmosp.physics.utoronto.ca
mailbox_command = /usr/bin/procmail -t
smtpd_helo_required = yes
disable_vrfy_command = yes
smtpd_recipient_restrictions =
        permit_mynetworks,
        reject_invalid_hostname,
        reject_non_fqdn_hostname,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unknown_sender_domain,
        reject_unknown_recipient_domain,
        reject_unauth_destination,
        reject_rbl_client rbl-plus.utoronto.ca,
        reject_rbl_client relays.ordb.org,
        reject_rbl_client opm.blitzed.org,
        reject_rbl_client cbl.abuseat.org,
        permit
smtpd_data_restrictions =
        reject_unauth_pipelining,
        permit
transport_maps = hash:/etc/postfix.front/transport

  /etc/postfix.front/transport:

testuseratmosp.physics.utoronto.ca
smtp-amavis:[haboob.atmosp.physics.utoronto.ca]:10024
rootatmosp.physics.utoronto.ca
smtp-amavis:[haboob.atmosp.physics.utoronto.ca]:10024
atmosp.physics.utoronto.ca smtp:[whirlwind.atmosp.physics.utoronto.ca]:25

  /etc/amavisd.conf:

$inet_socket_port = 10024;
$myhostname = "haboob.atmosp.physics.utoronto.ca";
$forward_method = 'smtp:[128.100.80.98]:10025';

  /etc/postfix/master.cf:

127.0.0.1:10025 inet n - n - - smtpd
        -o content_filter=
        -o smtpd_authorized_xforward_hosts=127.0.0.0/8
        -o smtpd_recipient_restrictions=permit_mynetworks,reject

  /etc/postfix/main.cf:

myhostname = webmail.atmosp.physics.utoronto.ca
mydomain = atmosp.physics.utoronto.ca
mynetworks = 127.0.0.0/8 128.100.80.90 128.100.80.98
mail_spool_directory = /var/spool/maildir/
queue_directory = /var/spool/postfix
mail_owner = postfix
inet_interfaces = $myhostname
myorigin = atmosp.physics.utoronto.ca
mydestination = $myhostname, localhost, $mydomain,
haboob.atmosp.physics.utoronto.ca
relay_domains = $myhostname, localhost, $mydomain,
haboob.atmosp.physics.utoronto.ca
mailbox_command = /usr/bin/procmail -t
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases