OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Catchall setup problem with Virtual domains and cyrus

From: Andrew Koros (akoroske.uu.net)
Date: Mon Jan 14 2008 - 23:25:48 CST


> Andrew Koros wrote:
>>> Andrew Koros wrote:
>>>> Thanks mouss. But it still seems to have the same problem .... may be there
>>>> is
>>>> something else missing...
>>>>
>>>
>>> please say what you did exactly, and show logs.
>>>
>> I removed the lines you asked me to remove from the master.cf i.e. the intire
>> pre-cleanup.
>
> show the resulting master.cf.
>
See the resulting master.cf below.

I also thought I should explain my setup a little. What I want to achieve is the
ability to filter some domains while leaving out others because some customers
may prefer their mail filtered while others may not. I want to achieve this on
one machine. I don't want to setup two separate boxes nor two instances of
postfix. I read that all I need is to use the /etc/postfix/access file with
entries like these:

  domains1.tld FILTER smtp-amavis:[127.0.0.1]:10024
  domain2.tld OK
  domain3.tld FILTER smtp-amavis-mailzu:[127.0.0.1]:10026
  e.t.c.

Is it possible to achieve this without setting the "-o
receive_override_options=no_address_mappings" in the smtp section of the
master.cf?

>
>>
>> Didn't work.
>>
>> I now tried removing -o receive_override_options=no_address_mappings and it
>> worked! but what does -o receive_override_options=no_address_mappings really
>> do?
>
>
> no_address_mappings disables rewrite (in particular: alias expansion).
> use this before the filter but not after the filter.
>
>
>
>
My master.cf
----------------------------------------------------------------
smtp inet n - n - 250 smtpd
smtps inet n - n - - smtpd
        -o smtpd_tls_wrappermode=yes
        -o smtpd_sasl_auth_enable=yes
submission inet n - n - - smtpd
        -o smtpd_enforce_tls=yes
        -o smtpd_sasl_auth_enable=yes
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
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
etrn-only unix - - n - 1 smtp
hold unix - - n - - smtp
slow unix - - n - - smtp
relay unix - - n - - smtp
        -o fallback_relay=
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
maildrop unix - n n - - pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
  user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension}
${user}
uucp unix - n n - - pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail.postfix
($recipient)
ifmail unix - n n - - pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
  flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
smtp-amavis unix - - y - 6 lmtp
    -o lmtp_data_done_timeout=1200
    -o lmtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20
smtp-amavis-mailzu unix - - y - 10 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 - y - - smtpd
    -o content_filter=
    -o smtpd_restriction_classes=
    -o smtpd_client_restrictions=
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o mynetworks=127.0.0.0/8
    -o strict_rfc821_envelopes=yes
    -o
receive_override_options=no_unknown_recipient_checks,no_header_body_checks,no_milters
cleanup unix n - n - 0 cleanup
    -o mime_header_checks=
    -o nested_header_checks=
    -o body_checks=
    -o header_checks=
    -o header_checks=pcre:/etc/postfix/header_checks2
mailman unix - n n - - pipe
      flags=FR user=mailman:mailman
      argv=/etc/postfix/postfix-to-mailman-2.1.py ${nexthop} ${user}