Modify The Number Of Recipients In Carbonio Community Edition Email Server | Carbonio CE

In this article, we will understand how we can manage and control the number of recipient that an user can use while sending an email.

In normal scenario, you can set up-to 1000 email addresses as recipient of one of your single email. Here, recipient means To, Cc, Bcc or altogether.

Sending email using default smtpd_recipient_limit=1000

Now if you are wondering that how you can check the default value of the smtpd_recipient_limit you can use the below mentioned CLI reference:

zextras@mail:~$ postconf -d | grep smtpd_recipient_limit
smtpd_recipient_limit = 1000
zextras@mail:~$

If you use postconf -d then, the output will show the default postfix configuration. But if you want to check the current/active postfix configuration, then you can use postconf command only.

As a system administrator, you may need to modify the default value of the smtpd_recipient_limit. It can be for various reasons:

  • Restrict users to send emails to limited number of recipients.
  • Protect an account from sending unsolicited emails to huge number of recipients in case of compromising incident.

There can be some exceptional use cases where this modification can be useful for you. I let you to be the judge of that. 😊

Now let’s see how we can modify this parameter.

Let’s check the default settings status.

zextras@mail:~$ postconf -d | grep smtpd_recipient_limit
smtpd_recipient_limit = 1000
zextras@mail:~$

So, we can see that the default smtpd_recipient_limit is 1000. That means any user of this system can set up to 1000 email addresses as a recipient of an email by using To/Cc/Bcc or with altogether.

Now we are going to change the value of this parameter.

zextras@mail:~$ postconf -e smtpd_recipient_limit=2
zextras@mail:~$

After changing the value, we need to restart the service and again check the value of the parameter.

zextras@mail:~$ postfix reload
/postfix-script: refreshing the Postfix mail system
zextras@mail:~$
zextras@mail:~$ postconf | grep smtpd_recipient_limit
smtpd_recipient_limit = 2
zextras@mail:~$

So now we can see the value of smtpd_recipient_limit is set to 2. That means using To/Cc/Bcc or altogether we can not exceed the number (2) of recipient for a single email .

Let’s test the settings.

Sending email using default smtpd_recipient_limit=2

We are going to send a test email which has two recipients (test1@example.com & test2@example.com). As per policy, the mail should successfully delivered to the recipients. Let’s check the log and respective users mailboxes.

Jan  9 14:57:47 mail postfix/cleanup[188239]: 8C2EE20202D: message-id=<1974861946.97.1673276266350.JavaMail.zextras@example.com>
Jan  9 14:57:47 mail postfix/qmgr[176271]: 8C2EE20202D: from=<zextras@example.com>, size=2211, nrcpt=2 (queue active)
Jan  9 14:57:47 mail amavis[5983]: (05983-01) d62th0GBd0Iw FWD from <zextras@example.com> -> <test1@example.com>,<test2@example.com>, BODY=7BIT 250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 8C2EE20202D
Jan  9 14:57:47 mail amavis[5983]: (05983-01) Passed CLEAN {RelayedInternal}, ORIGINATING_POST/MYNETS LOCAL [127.0.0.1]:49150 <zextras@example.com> -> <test1@example.com>,<test2@example.com>, Queue-ID: DB26320202E, Message-ID: <1974861946.97.1673276266350.JavaMail.zextras@example.com>, mail_id: d62th0GBd0Iw, Hits: -0.999, size: 1695, queued_as: 8C2EE20202D, 669 ms

Jan  9 14:57:48 mail postfix/lmtp[188249]: 8C2EE20202D: to=<test1@example.com>, relay=mail.example.com[192.168.1.192]:7025, delay=0.63, delays=0.01/0.01/0.29/0.33, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK)
Jan  9 14:57:48 mail postfix/lmtp[188249]: 8C2EE20202D: to=<test2@example.com>, relay=mail.example.com[192.168.1.192]:7025, delay=0.63, delays=0.01/0.01/0.29/0.33, dsn=2.1.5, status=sent (250 2.1.5 Delivery OK)
Jan  9 14:57:48 mail postfix/qmgr[176271]: 8C2EE20202D: removed

As you can see from the first part of the log an email is sent from zextras@example.com to test1@example.com and test2@example.com and the email is successfully delivered to the respective users mailboxes.

Sending email using default smtpd_recipient_limit=2

Now let’s try to send an email to the number of recipients that is not allowed in the system. Just to remind you, we have set the smtpd_recipient_limit to 2. So we cannot use 3 addresses as recipient.

Sending email using default smtpd_recipient_limit=2

As soon as we hit the SEND button. we notice that nothing occurs in the log file(/var/log/carbonio.log). And the mail we tried to send is saved to the Drafts instead of the Sent folder.

So the email we tried to send is not sent actually.

So that’s it for today.

😊

Comments

spada
09/10/2024

is this persistent thru carbonio restart or reboot ?

Post your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

A Brief Description Of Carbonio CE User Account Settings | Carbonio CE
Mastering The Upgrade Process Of Carbonio Community Edition Email Server | Carbonio CE