How to Delete,Create,Modify and Restrict Distribution list in zimbra

How to Delete,Create,Modify and Restrict Distribution list in zimbra

by -
1 1980

How to Get, Add, Delete, Distribution List using zmprov and How to restrict DistributionList.

:- How to create DistributionList

[zimbra@kvit ~]$ zmprov cdl allkvit@kvit.in
6e239039-06f1-4b44-a519-bd1fb4f8fccb

:- How to add DistributionListMember.

[zimbra@kvit ~]$ zmprov adlm allkvit@kvit.in prabhat@kvit.in

 

:- How to list all DistributionList.

[zimbra@kvit ~]$ zmprov gadl
allkvit@kvit.in

:- How to check DistributionListMember in our exsiting DL

[zimbra@kvit ~]$ zmprov gdl allkvit@kvit.in | grep zimbraMailForwardingAddress: | awk {‘print $2’}
test2@kvit.in
test@kvit.in


Note:- Here is only one member which add earlier.
:- Now i am going to add more member.

[zimbra@kvit ~]$ zmprov adlm allkvit@kvit.in test2@kvit.in
[zimbra@kvit ~]$ zmprov adlm allkvit@kvit.in test@kvit.in

:- How to remove DistributionListMember.

[zimbra@kvit ~]$ zmprov rdlm allkvit@kvit.in prabhat@kvit.in

:- How to rename DistributionList.

[zimbra@kvit ~]$ zmprov rdl allkvit@kvit.in kvit@kvit.in

:- How to Delete DistributionList

[zimbra@kvit ~]$ zmprov ddl kvit@kvit.in

How to restrict DistributionList

By default, Zimbra distribution list or group list can receive email from anywhere. This can be dangerous because it could be a target of spam attackers.

We do that through recipent restraction.

 

 

:- Login as zimbra user Put your domain or user who can send email to your protected DL or users

[root@kvit ~]# su – zimbra
[zimbra@kvit ~]$ vi /opt/zimbra/postfix/conf/permitted_senders
prabhat@kvit.in Ok
nishant@gmail.com Ok
abc.com Ok

Note:- We can can allowed user or domain as per requirement

:- This is your list of email addresses that may only receive email from permitted senders which we have created above

[zimbra@kvit ~]$ vim /opt/zimbra/postfix/conf/protected_
allkvit@kvit.in permitted_
gaurav@kvit.in permitted_senders

Note:- In above file we can put DL,Email,Domain as per requirement.

:- Now we have to do postmap

[zimbra@kvit ~]$ postmap /opt/zimbra/postfix/conf/permitted_senders
[zimbra@kvit ~]$ postmap /opt/zimbra/postfix/conf/protected_recipients
[zimbra@kvit ]$ vim /opt/zimbra/conf/zmconfigd/smtpd_recipient_restrictions.cf
check_recipient_access hash:/opt/zimbra/postfix/conf/protected_recipients <——-Put this line—>
%%contains VAR:zimbraServiceEnabled cbpolicyd, check_policy_service inet:localhost:@@cbpolicyd_bind_port@@%%
reject_non_fqdn_recipient
reject_unlisted_recipient
%%contains VAR:zimbraMtaRestriction reject_invalid_helo_hostname%%
%%contains VAR:zimbraMtaRestriction reject_non_fqdn_helo_hostname%%
%%contains VAR:zimbraMtaRestriction reject_non_fqdn_sender%%
%%contains VAR:zimbraMtaRestriction reject_unknown_client_hostname%%
%%contains VAR:zimbraMtaRestriction reject_unknown_helo_hostname%%
%%contains VAR:zimbraMtaRestriction reject_unknown_sender_domain%%
%%explode reject_rbl_client VAR:zimbraMtaRestrictionRBLs%%
%%contains VAR:zimbraMtaRestriction check_policy_service unix:private/policy%%
permit

:- Put these lines at botam in main.cf

[zimbra@kvit ]$ vim /opt/zimbra/postfix/conf/main.cf
permitted_senders = check_sender_access hash:/opt/zimbra/postfix/conf/permitted_senders, reject
smtpd_restriction_classes = permitted_senders

[zimbra@kvit]$ postfix reload
/postfix-script: refreshing the Postfix mail system

 

Note:- Please check mail through sending mail.Only prabhat(prabhat@kvit.in) can send mail.

 

How to restrict DL in zimbra

DL Restriction in zimbra

:- Send mail from other account (abc@kvit.in)

Note:- This user (abc@kvit.in)   can not sendmail on allkvit@kvit.in DL

Screenshot from 2015-06-24 19:54:52

:- You can also check in zimbra.log that abc@kvit.in is not able to sendmail on DL

DL

Enjoy  🙂

Senior Linux Administrator at KV IT-Solutions Pvt Ltd || A Linux Lover || having 4 years of experience || Handling various Linux projects || Email ID : prabhat@kvit.in || cell: 9818001497

“We are born free, No gates and Windows can snatch our freedom “

Download PDF

1 COMMENT

Leave a Reply

Required Captcha *