Loading ...
Sorry, an error occurred while loading the content.

Recipient limit, need advice

Expand Messages
  • Daniel Chojecki
    Hello, we use the latest versions of postfix and spamassasin on slackware machines. Our postfix acts as smtp gateway - no local users. We want to set up
    Message 1 of 9 , Jun 30, 2008
    • 0 Attachment
      Hello,

      we use the latest versions of postfix and spamassasin on slackware machines.
      Our postfix acts as smtp gateway - no local users. We want to set up
      white/blacklists per username. Spammassasin keeps white/black lists in sql.
      $GLOBAL definitions are working OK.

      Testing scenario:
      user1@domain1 is on blacklist for user2@domain2

      When i send email from user1@domain1 to user2@domain2 - email is blacklisted
      When i send email from user1@domain1 to user2@domain2 and to user3@domain3
      (both are in "To:" field), email is delivered to user2@domain2 and
      user3@domain3.

      I got response from spamassassin list that i should change
      <transport>_destination_recipient_limit to 1, because
      mta sends more then one recipient to spamassassin, and spamassassin scores
      with one in mind

      In master.cf i have:
      smtp inet n - n - - smtpd
      -o content_filter=spamfilter:dummy

      and

      spamfilter unix - n n - - pipe
      user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} --
      ${recipient}


      in main.cf:

      default_destination_recipient_limit = 1
      default_extra_recipient_limit = 1000
      default_recipient_limit = 20000
      lmtp_destination_recipient_limit = $default_destination_recipient_limit
      local_destination_recipient_limit = 1
      qmgr_message_recipient_limit = 20000
      relay_destination_recipient_limit = $default_destination_recipient_limit
      smtp_destination_recipient_limit = 1
      smtpd_recipient_limit = 1000
      virtual_destination_recipient_limit = $default_destination_recipient_limit

      Any idea why my configuration is not working ?

      --
      Best Regards,
      Daniel Chojecki
    • Daniel Chojecki
      ... body_checks = regexp:/etc/postfix/body_checks command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix
      Message 2 of 9 , Jun 30, 2008
      • 0 Attachment
        2008/6/30 Wietse Venema <wietse@...>:

        > Supply the information as requested in the welcome message:
        > "postconf -n" output instead of main.cf fragments, logging.

        body_checks = regexp:/etc/postfix/body_checks
        command_directory = /usr/sbin
        config_directory = /etc/postfix
        daemon_directory = /usr/libexec/postfix
        data_directory = /var/lib/postfix
        default_destination_recipient_limit = 1
        default_process_limit = 200
        disable_vrfy_command = yes
        header_checks = regexp:/etc/postfix/header_checks
        html_directory = no
        inet_interfaces = 10.10.51.20
        mail_owner = postfix
        mailq_path = /usr/bin/mailq
        manpage_directory = /usr/share/man
        max_use = 200
        message_size_limit = 11240000
        mydomain = domain2.com
        myhostname = mail.domain2.com
        mynetworks = 10.10.51.0/24
        mynetworks_style = subnet
        myorigin = $mydomain
        newaliases_path = /usr/bin/newaliases
        notify_classes = 2bounce, resource, software
        queue_directory = /var/spool/postfix
        readme_directory = no
        relay_domains = domain.com
        sample_directory = /etc/postfix
        sender_bcc_maps = hash:/etc/postfix/sender_bcc
        sendmail_path = /usr/sbin/sendmail
        setgid_group = postdrop
        smtp_destination_recipient_limit = 1
        smtpd_banner = $myhostname NO UCE ESMTP
        smtpd_error_sleep_time = 0
        smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
        smtpd_sender_restrictions = check_recipient_access
        hash:/etc/postfix/relay_recipients,reject_unauth_pipelining,
        reject_unknown_sender_domain,reject_invalid_hostname
        strict_rfc821_envelopes = yes
        transport_maps = hash:/etc/postfix/transport.table
        unknown_local_recipient_reject_code = 450

        --
        Best Regards,
        Daniel Chojecki
      • Victor Duchovni
        ... A really bad idea, don t do this. Instead set to 1 for JUST the transports that need it. ... Don t change these (or other parameters you don t understand).
        Message 3 of 9 , Jun 30, 2008
        • 0 Attachment
          On Mon, Jun 30, 2008 at 02:04:14PM +0200, Daniel Chojecki wrote:

          > in main.cf:
          >
          > default_destination_recipient_limit = 1
          > smtp_destination_recipient_limit = 1

          A really bad idea, don't do this. Instead set to 1 for JUST the transports
          that need it.

          > default_extra_recipient_limit = 1000
          > default_recipient_limit = 20000
          > qmgr_message_recipient_limit = 20000

          Don't change these (or other parameters you don't understand).

          --
          Viktor.

          Disclaimer: off-list followups get on-list replies or get ignored.
          Please do not ignore the "Reply-To" header.

          To unsubscribe from the postfix-users list, visit
          http://www.postfix.org/lists.html or click the link below:
          <mailto:majordomo@...?body=unsubscribe%20postfix-users>

          If my response solves your problem, the best way to thank me is to not
          send an "it worked, thanks" follow-up. If you must respond, please put
          "It worked, thanks" in the "Subject" so I can delete these quickly.
        • mouss
          ... as you have already been told on the SA list, do not change the settings above. you are taking the wrong path. Instead, use
          Message 4 of 9 , Jun 30, 2008
          • 0 Attachment
            Daniel Chojecki wrote:
            > Hello,
            >
            > we use the latest versions of postfix and spamassasin on slackware machines.
            > Our postfix acts as smtp gateway - no local users. We want to set up
            > white/blacklists per username. Spammassasin keeps white/black lists in sql.
            > $GLOBAL definitions are working OK.
            >
            > Testing scenario:
            > user1@domain1 is on blacklist for user2@domain2
            >
            > When i send email from user1@domain1 to user2@domain2 - email is blacklisted
            > When i send email from user1@domain1 to user2@domain2 and to user3@domain3
            > (both are in "To:" field), email is delivered to user2@domain2 and
            > user3@domain3.
            >
            > I got response from spamassassin list that i should change
            > <transport>_destination_recipient_limit to 1, because
            > mta sends more then one recipient to spamassassin, and spamassassin scores
            > with one in mind
            >
            > In master.cf i have:
            > smtp inet n - n - - smtpd
            > -o content_filter=spamfilter:dummy
            >
            > and
            >
            > spamfilter unix - n n - - pipe
            > user=spamfilter argv=/usr/local/bin/spamfilter -f ${sender} --
            > ${recipient}
            >
            >
            > in main.cf:
            >
            > default_destination_recipient_limit = 1
            > default_extra_recipient_limit = 1000
            > default_recipient_limit = 20000
            > lmtp_destination_recipient_limit = $default_destination_recipient_limit
            > local_destination_recipient_limit = 1
            > qmgr_message_recipient_limit = 20000
            > relay_destination_recipient_limit = $default_destination_recipient_limit
            > smtp_destination_recipient_limit = 1
            > smtpd_recipient_limit = 1000
            > virtual_destination_recipient_limit = $default_destination_recipient_limit
            >
            > Any idea why my configuration is not working ?
            >
            >

            as you have already been told on the SA list, do not change the settings
            above. you are taking the wrong path.

            Instead, use

            spamfilter_destination_recipient_limit = 1

            once you do this, you reload/restart your postfix and you still have a
            problem, report it here, but do not randomly change parameters. this
            will not help you and will not help us to help you. if you go too far,
            we won't run after you. so please stay with us ;-p
          • Daniel Chojecki
            ... i have set above parameter and still not working as expected. I have checked spamassasin logs and i can see that To: field still contains two addresses.
            Message 5 of 9 , Jul 1, 2008
            • 0 Attachment
              2008/6/30 mouss <mouss@...>:

              > spamfilter_destination_recipient_limit = 1

              i have set above parameter and still not working
              as expected.

              I have checked spamassasin logs and i can see that
              "To:" field still contains two addresses.

              Any idea ?

              --
              Best Regards,
              Daniel Chojecki
            • mouss
              ... then change your spamfilter (it is a script I guess) to print its command lines args ($@) to a file so that you can look at them. any reason why you don t
              Message 6 of 9 , Jul 1, 2008
              • 0 Attachment
                Daniel Chojecki wrote:
                > 2008/6/30 mouss <mouss@...>:
                >
                >
                >> spamfilter_destination_recipient_limit = 1
                >>
                >
                > i have set above parameter and still not working
                > as expected.
                >
                > I have checked spamassasin logs and i can see that
                > "To:" field still contains two addresses.
                >
                > Any idea ?
                >
                >

                then change your spamfilter (it is a script I guess) to print its
                command lines args ($@) to a file so that you can look at them.

                any reason why you don't use amavisd-new?
              • Wietse Venema
                ... yes. Postfix does not use the To: field for email delivery. Wietse
                Message 7 of 9 , Jul 1, 2008
                • 0 Attachment
                  Daniel Chojecki:
                  > I have checked spamassasin logs and i can see that
                  > "To:" field still contains two addresses.
                  >
                  > Any idea ?

                  yes.

                  Postfix does not use the To: field for email delivery.

                  Wietse
                • Daniel Chojecki
                  ... ok, so tell me what this change: default_destination_recipient_limit = 1 From documentation: default_destination_recipient_limit (default: 50) The default
                  Message 8 of 9 , Jul 1, 2008
                  • 0 Attachment
                    2008/7/1 Wietse Venema <wietse@...>:

                    > Postfix does not use the To: field for email delivery.

                    ok, so tell me what this change:
                    default_destination_recipient_limit = 1

                    From documentation:

                    default_destination_recipient_limit (default: 50)

                    The default maximal number of recipients per message delivery.
                    This is the default limit for delivery via the lmtp(8), pipe(8),
                    smtp(8) and virtual(8) delivery agents.

                    Setting this parameter to a value of 1 changes the meaning of the
                    corresponding per-destination concurrency limit from concurrency per
                    domain into concurrency per recipient.

                    Use transport_destination_recipient_limit to specify a
                    transport-specific override, where transport is the master.cf name of
                    the message delivery transport.

                    I understand that postfix will "copy" email and send the same message
                    as many times
                    as number of recipients to any delivery agent, am i right ?

                    Second thing:
                    in my configuration i have:
                    spamfilter_destination_recipient_limit = 1
                    when i do
                    postconf|grep spamfilter
                    i found nothing. Good or bad ?

                    --
                    Best Regards,
                    Daniel Chojecki
                  • Wietse Venema
                    ... This parameter controls the number of recipients per mail delivery transaction. With multi-recipient email, it also affects the number of mail delivery
                    Message 9 of 9 , Jul 1, 2008
                    • 0 Attachment
                      Daniel Chojecki:
                      > 2008/7/1 Wietse Venema <wietse@...>:
                      >
                      > > Postfix does not use the To: field for email delivery.
                      >
                      > ok, so tell me what this change:
                      > default_destination_recipient_limit = 1

                      This parameter controls the number of recipients per mail delivery
                      transaction. With multi-recipient email, it also affects the number
                      of mail delivery transactions that Postfix makes. To see how many
                      transactions Postfix makes, LOOK AT THE LOGFILE NOT THE TO: FIELD.

                      I recommend that you read a book on email principles, before making
                      random tweaks to an email system and claiming that it does not
                      work.

                      Wietse
                    Your message has been successfully submitted and would be delivered to recipients shortly.