Can any one help me bypassing smtpd_recipient_limit to 100 or 150 for a single domain in postfix ?
Apart from those domain all other domains smtpd_recipient_limit should be 50.
Can any one help me bypassing smtpd_recipient_limit to 100 or 150 for a single domain in postfix ?
Apart from those domain all other domains smtpd_recipient_limit should be 50.
This is a global setting that affects on how many recipients there can be for a single message.
smtpd_recipient_limit
(default:1000
)The maximal number of recipients that the Postfix SMTP server accepts per message delivery request.
Therefore, there is no way to set this by domain, since it affects the whole SMTPD in use.
You haven't specified what you mean by for a single domain; as it doesn't make any sense that this would be the domain of recipients, because the same message may and most likely have recipients across several domains, I assume you wan't to use different policy per sender domain. However, it's not possible to set this based on the domain in MAIL FROM
SMTP command, alone.
You could have separate submission settings for different clients, if you use more than one port for submission. That's exactly how the submission is arranged in the first place, as you could have SMTPD listening simultaneously on port 25
(for other MTAs), 587
(submission) and 465
(smtps).
Here's an example of master.conf
lines (submission settings unrelated to the question removed):
# Submission on standard port 587
submission inet n - - - - smtpd
-o smtpd_recipient_limit=50
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o smtpd_sender_restrictions=reject_sender_login_mismatch
-o smtpd_sender_login_maps=hash:/etc/postfix/virtual
# Submission for users allowed to add more recipients (port 5870)
5870 inet n - - - - smtpd
-o smtpd_recipient_limit=150
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o smtpd_sender_restrictions=reject_sender_login_mismatch
-o smtpd_sender_login_maps=hash:/etc/postfix/more_recipients
In this example, /etc/postfix/more_recipients
set in smtpd_sender_login_maps
specifies SALS authenticated users & addresses they are allowed to use while using this additional submission on port 5870
, just like the /etc/postfix/virtual
binds addresses with users on the normal submissions, when the reject_sender_login_mismatch
is used.
Likewise, you could use smtpd_sender_restrictions
= check_sender_access type:table
.
However, these are quite advanced settings and it may be hard to get this all together, if you are new to Postfix. I'd recommend simply to raise this setting for all users, instead, as it's already so much lower than the default value of 1000
.