Recipient limit, need advice

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Recipient limit, need advice

Daniel Chojecki-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

Daniel Chojecki-2
2008/6/30 Wietse Venema <[hidden email]>:

> 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
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

Victor Duchovni
In reply to this post by Daniel Chojecki-2
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:[hidden email]?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.
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

mouss-2
In reply to this post by Daniel Chojecki-2
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




Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

Daniel Chojecki-2
2008/6/30 mouss <[hidden email]>:

> 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
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

mouss-2
Daniel Chojecki wrote:

> 2008/6/30 mouss <[hidden email]>:
>
>  
>> 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?
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

Wietse Venema
In reply to this post by Daniel Chojecki-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

Daniel Chojecki-2
2008/7/1 Wietse Venema <[hidden email]>:

> 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
Reply | Threaded
Open this post in threaded view
|

Re: Recipient limit, need advice

Wietse Venema
Daniel Chojecki:
> 2008/7/1 Wietse Venema <[hidden email]>:
>
> > 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