All tips
-------
$su - zimbra
/opt/zimbra/common/conf/main.cf
How to check queue status for hold,deferred,active
To check all queue details as follow with root
[root@mail lqs]# /opt/zimbra/libexec/zmqstat
hold=0
corrupt=0
deferred=0
active=0
incoming=0
To Check current mail queue status
[root@mail lqs]# su zimbra
[zimbra@mail lqs]$ /opt/zimbra/common/sbin/postqueue -p
Mail queue is empty
To Flush Postfix Queue
[root@mail lqs]$ /opt/zimbra/common/sbin/postqueue -f
To Requeue Messages In Postfix
[root@mail lqs]$ /opt/zimbra/common/sbin/postsuper -r ALL
To Check current hold messages
[root@mail lqs]# /opt/zimbra/common/sbin/postsuper -h ALL
To Delete Single Message From Queue
[root@mail lqs]# /opt/zimbra/common/sbin/postsuper -d [MSGID From postqueue -p]
To Delete ALL Messages From Queue
[root@mail lqs]# /opt/zimbra/common/sbin/postsuper -d ALL
To Delete ALL Messages From The Deferred Queue
[root@mail lqs]# /opt/zimbra/common/sbin/postsuper -d ALL deferred
To Delete ALL Messages From The Hold Queue
[root@mail lqs]# /opt/zimbra/common/sbin/postsuper -d ALL hold
https://dilliganesh.wordpress.com/category/zimbra/page/4/
https://www.huuphan.com/search/label/Zimbra%20Mail%20Server
How to set zimbra login redirect http to https
How to set zimbra login redirect http to https
Good way to you can enforce https encrpytion by redirecting http to https:
# su – zimbra
# zmtlsctl redirect
# zmcontrol stop
# zmcontrol start
How to Create auto Bcc for recipient mails for Zimbra 8.8
Auto bcc for recipient mails
[root@email ~]# su zimbra
[zimbra@email conf]$ cd /opt/zimbra/common/conf/
[zimbra@email conf]$ pwd
/opt/zimbra/common/conf/
[zimbra@email conf]$ vi recipient_bcc
mailer@lqs.co.in copy_acc@lqs.co.in
[zimbra@email conf]$ cd ../common/conf/
[zimbra@email conf]$ pwd
/opt/zimbra/common/conf
[zimbra@email conf]$ vi main.cf
recipient_bcc_maps = lmdb:/opt/zimbra/common/conf//recipient_bcc
[zimbra@email conf]$ postmap /opt/zimbra/common/conf//recipient_bcc
[zimbra@email conf]$ postfix reload
Integration of Zextras Chat for Zimbra
Integration of Zextras Chat for Zimbra 8.0.2 Server
Download Zextras Suite via the following link and store in /tmp/zextras_suite-latest.tgz
http://www.zextras.com/zextras-chat-for-zimbra.html
zimbra:/tmp # tar xfzv zextras_suite-latest.tgz
zimbra:/tmp # cd zextras_suite-1.8.5/
zimbra:/tmp/zextras_suite-1.8.5 # ./install.sh all
How to set Automatic IMAP/POP retrieval mails on zimbra
How to configure Zimbra to automatically pull mails on schedule from external mails using POP3/IMAP into all users mailboxes.
To run on zimbra user following commands.
[root@mail]$ su zimbra
zimbra@mail:~$ zmprov mc default zimbraDataSourceMinPollingInterval 5m
zimbra@mail:~$ zmprov mc default zimbraDataSourcePollingInterval 15m
zimbra@mail:~$ zmprov gc default | grep zimbraDataSourcePollingInterval zimbraDataSourcePollingInterval: 15m
zimbra@mail:~$ zmprov gc default | grep zimbraFeatureMailPollingIntervalPreferenceEnabled zimbraFeatureMailPollingIntervalPreferenceEnabled: TRUE
To check out all modified Poll..
zimbra@mail:~$ zmprov gc default | grep Poll
----------------------
How to add spam filters on zimbra 8.6
su - zimbra
To check current setting
$ zmprov gacf | grep zimbraMtaRestriction
To add spam filters on zimbra 8.6
$ zmprov mcf zimbraMtaRestriction reject_invalid_hostname \
zimbraMtaRestriction reject_non_fqdn_hostname \
zimbraMtaRestriction reject_non_fqdn_sender \
zimbraMtaRestriction "reject_rbl_client dnsbl.njabl.org" \
zimbraMtaRestriction "reject_rbl_client cbl.abuseat.org" \
zimbraMtaRestriction "reject_rbl_client bl.spamcop.net" \
zimbraMtaRestriction "reject_rbl_client dnsbl.sorbs.net" \
zimbraMtaRestriction "reject_rbl_client sbl.spamhaus.org" \
zimbraMtaRestriction "reject_rbl_client relays.mail-abuse.org" \
zimbraMtaRestriction "reject_rbl_client zen.spamhaus.org" \
zimbraMtaRestriction "reject_rbl_client psbl.surriel.com" \
zimbraMtaRestriction "reject_rbl_client b.barracudacentral.org" \
zimbraMtaRestriction "reject_rhsbl_client dbl.spamhaus.org" \
zimbraMtaRestriction "reject_rhsbl_client multi.uribl.com" \
zimbraMtaRestriction "reject_rhsbl_client multi.surbl.org" \
zimbraMtaRestriction "reject_rhsbl_sender rhsbl.sorbs.net"
How to remove value zimbraMtaRestriction
zmprov mcf -zimbraMtaRestriction "reject_rhsbl_sender multi.uribl.com"
--------------
How to remove zimbra duplicate emails in inbox. some trouble message with double message-id. The resolution enable zimbraMessageIdDedupeCacheSize attribute. The default, zimbra disable zimbraMessageIdDedupeCacheSize attribute. I'm running commands with account zimbra (su - zimbra)
To find current value
zmprov gcf zimbraMessageIdDedupeCacheSize
The looks like as below
zimbraMessageIdDedupeCacheSize: 3000
The modified value and zimbra mailbox service restart
zmprov mcf zimbraMessageIdDedupeCacheSize 0
zmmailboxdctl restart
The conclusion
The solve problem, "zimbra duplicate message id", "zimbra duplicate emails". The commands use my post, support zimbra mail server version 8.6 8.5 8.0
-----------------------
How to Check Mailbox size of all accounts in Zimbra
How to Check Mailbox size of all accounts in zimbra mail server
Zimbra command to check Mailbox Size :
Use This command to get User mailbox size information.
#su – zimbra
# zmprov gmi testuser@example.com -> To check User mailbox Size information in detail. This command show every Directory size and count of message like inbox, trash, Junk, draft and
1. $zmmailbox -z -m testuser@example.com gms # show only mailbox size
2. $zmmailbox -z -m testuser@example.com gaf #show specific directory size in detail
Here : Zmmailbox is zimbra command, -z -m is switch, testuser is your user account name, example.com is your Domain Name
gms – get mailbox size
gaf – get all file.
Check Mailbox size of all accounts in zimbra mail server by Script
# su zimbra
# vim mailboxsize.sh
#!/bin/bash
all_account=`zmprov -l gaa`;
for account in ${all_account}
do
mb_size=`zmmailbox -z -m ${account} gms`;
echo .Mailbox size of ${account} = ${mb_size}.;
done
:wq -> save it
# chmod 755 mailboxsize.sh
# ./mailboxsize.sh
------------------------------
How to find spam generating email account in zimbra
Run the below command
tail -n 100000 /var/log/mail.log | grep “sasl_username=”
or
tail -n 100000 /var/log/maillog | grep “sasl_username=”
If you want save the output in a file, run the below command
tail -n 100000 /var/log/mail.log | grep “sasl_username=” > smtpauthlogins.txt
-------------------
How to fix permission errors on Zimbra
Permission Denied errors seen in /var/log/zimbra.log
To fix the error without reboot.
[root@mail] service zimbra stop
[root@mail] /opt/zimbra/libexec/zmfixperms –extended –verbose
su zimbra
cd ~zimbra
[zimbra@mail] zmcontrol start
------------------
How to allow encrypted file on Zimbra
How to allow encrypted file on Zimbra
[root@mail conf]# vi /opt/zimbra/conf/clamd.conf.in
change line —> %%uncomment VAR:zimbraVirusBlockEncryptedArchive%%ArchiveBlockEncrypted yes
with —> %%comment VAR:zimbraVirusBlockEncryptedArchive%%ArchiveBlockEncrypted no
[root@mail conf]# chmod 440 clamd.conf.in
[root@mail conf]# su – zimbra
[zimbra@mail ~]$ zmclamdctl restart
Stopping freshclam…done.
Stopping clamd…done.
Starting freshclam…done.
Starting clamd…done.
[zimbra@mail ~]$ exit
logout
[root@mail conf]#
Update (on Zimbra 8.6.0) :
[root@mail ~]# su – zimbra
[zimbra@mail ~]$ zmprov mcf zimbraVirusBlockEncryptedArchive FALSE
[zimbra@mail ~]$ zmamavisdctl reload
Stopping amavisd… done.
Stopping amavisd-mc… done.
Starting amavisd-mc…done.
Starting amavisd…done.
[zimbra@mail ~]$ exit
logout
[root@mail conf]#
------------------
-----------------
How to change IP Address of Zimbra Mail Server
1. Check out the current value of postconf:
[root@mail /]# su zimbra
[zimbra@mail /]$ postconf mynetworks
mynetworks = 127.0.0.0/8 192.168.1.0/24 [::1]/128 [fe80::]/64
[zimbra@mail /]$
In this case our postfix will reply for all machines with 192.168.1.X serious all IP address
2. If you don’t want to allow relaying for the network, but only for the zimbra server itself, configure the server like this:
[zimbra@mail /]$ hostname
mail.server.lan
[zimbra@mail /]$ zmprov ms mail.server.lan zimbraMtaMyNetworks ‘127.0.0.1/8 192.168.1.200/24’
[zimbra@mail /]$ postfix reload
[zimbra@mail /]$ postconf mynetworks
mynetworks = 127.0.0.1/8 192.168.1.200/24
-----------------------
How to enable / disable Instant Messaging(IM) for Zimbra 8.6
IM – Instant Messaging for Zimbra 8.6.
1. To Check the status for enabled or disabled:
# zmprov gacf zimbraXMPPEnabled
# zmprov gc default zimbraFeatureIMEnabled
# zmprov gc default zimbraFeatureInstantNotify
If it returns FALSE IM was disabled, else TRUE means enabled.
2. To enable for Instant Messaging:
# zmprov -l -v mcf zimbraXMPPEnabled TRUE
# zmprov -v mc default zimbraFeatureIMEnabled TRUE
# zmprov -v mc default zimbraFeatureInstantNotify TRUE
3. To disable for Instant Messaging:
# zmprov -l -v mcf zimbraXMPPEnabled FALSE
# zmprov -v mc default zimbraFeatureIMEnabled FALSE
# zmprov -v mc default zimbraFeatureInstantNotify FALSE
4. Need to restart the zimbra:
# zmcontrol stop
# zmcontrol start
----------------
How to set Automatic IMAP/POP retrieval mails on zimbra
How to configure Zimbra to automatically pull mails on schedule from external mails using POP3/IMAP into all users mailboxes.
To run on zimbra user following commands.
[root@mail]$ su zimbra
zimbra@mail:~$ zmprov mc default zimbraDataSourceMinPollingInterval 5m
zimbra@mail:~$ zmprov mc default zimbraDataSourcePollingInterval 15m
zimbra@mail:~$ zmprov gc default | grep zimbraDataSourcePollingInterval zimbraDataSourcePollingInterval: 15m
zimbra@mail:~$ zmprov gc default | grep zimbraFeatureMailPollingIntervalPreferenceEnabled zimbraFeatureMailPollingIntervalPreferenceEnabled: TRUE
To check out all modified Poll..
zimbra@mail:~$ zmprov gc default | grep Poll
--------------------
How to Check Mailbox size of all accounts in Zimbra
How to Check Mailbox size of all accounts in zimbra mail server
Zimbra command to check Mailbox Size :
Use This command to get User mailbox size information.
#su – zimbra
# zmprov gmi testuser@example.com -> To check User mailbox Size information in detail. This command show every Directory size and count of message like inbox, trash, Junk, draft and
1. $zmmailbox -z -m testuser@example.com gms # show only mailbox size
2. $zmmailbox -z -m testuser@example.com gaf #show specific directory size in detail
Here : Zmmailbox is zimbra command, -z -m is switch, testuser is your user account name, example.com is your Domain Name
gms – get mailbox size
gaf – get all file.
Check Mailbox size of all accounts in zimbra mail server by Script
# su zimbra
# vim mailboxsize.sh
#!/bin/bash
all_account=`zmprov -l gaa`;
for account in ${all_account}
do
mb_size=`zmmailbox -z -m ${account} gms`;
echo .Mailbox size of ${account} = ${mb_size}.;
done
:wq -> save it
# chmod 755 mailboxsize.sh
# ./mailboxsize.sh
------------------------------
How to add Whitelists and Blacklists on Zimbra
To add blackist or whitelist entries to your salocal.cf.in file.
[root@mail ~]# vi /opt/zimbra/conf/salocal.cf.in
blacklist_from *fenpropertyservices.co.uk
blacklist_from *marshallsestateagents.co.uk
whitelist_from m.rajesh@yahoo.com
whitelist_from ganesh@gmail.com
To set domain or IP level spam score in zimbra
[root@mail ~]# vi /opt/zimbra/conf/amavisd.conf.in
# To set white listed domain or IP (score -1 to -10 : default -5)
# read_hash(“/var/amavis/sender_scores_sitewide”),
{ # a hash-type lookup table (associative array)
‘nobody@cert.org’ => -3.0,
‘cert-advisory@us-cert.gov’ => -3.0,
# To set block listed domain or IP (score 1 to 10)
# soft-blacklisting (positive score)
‘sender@example.net’ => 3.0,
‘.example.net’ => 1.0,
‘.domain.com’ => 8.0,
The simplest filtering methods for spamassasin are the blacklist and whitelist. Blacklist entries block all email from an address or domain, and whitelist entries bypass all filtering for an address or domain.
Restart Zimbra spamassassin by using following command.
[zimbra@mail root]$ zmmtactl restart && zmamavisdctl restart
-------------------------------------------------------------
How to find spam generating email account in zimbra
Run the below command
tail -n 100000 /var/log/mail.log | grep “sasl_username=”
or
tail -n 100000 /var/log/maillog | grep “sasl_username=”
If you want save the output in a file, run the below command
tail -n 100000 /var/log/mail.log | grep “sasl_username=” > smtpauthlogins.txt
------------
How to check or change Notifications mail account on Zimbra
How to check or change Notifications mail account
MTA notifications:
For any general SMTP-related notification, check:
# zmlocalconfig smtp_destination
and if wrong, please change it via:
# zmlocalconfig -e smtp_destination=admin@domain.com
For the AV notifications, check:
# zmlocalconfig av_notify_user
and if wrong, please change it via:
# zmlocalconfig -e av_notify_user=admin@domain.com
How to filter Banned cotents or Notification to users on Zimbra
How to filter Banned cotents or Notification to users
I’m got little bit solution and it’s works fine.
As follows:
# vi /opt/zimbra/conf/amavisd.conf.in
– modified row: $final_banned_destiny
It was “D_BOUNCE” and now it’s changed “D_DISCARD”
– zmamavisdctl restart
References : https://blog.bravi.org/?p=683
Zimbra Mail Queues Issue – system failure: exception during auth RemoteManager
If not loading zimbra admin console mail queues like deferred,incoming,avtive etc.
Common Errors:
Message: system failure: exception during auth {RemoteManager: MAIL.DOMAIN.COM->zimbra@MAIL.DOMAIN.COM:22}
com.zimbra.cs.service.ServiceException: system failure: exception during auth {RemoteManager:
MAIL.DOMAIN.COM->zimbra@MAIL.DOMAIN.COM:22}
It’s possible you only need to fix your ownership and permissions.
su – zimbra
zmcontrol stop
exit
Now login as root — this command must be run as root, run zmfixperms, and start zimbra back up:
/opt/zimbra/libexec/zmfixperms
su – zimbra
zmcontrol start
If this doesn’t fix any errors you’ll probably need to allow users list zimbra account on sshd_config files
[root@mail /]# vi /etc/ssh/sshd_config
AllowUsers dilli lqs zimbra
[root@mail /]# /etc/init.d/sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
[root@mail /]#
Error: Queue report unavailable – mail system is down
Zimbra reports “ Error: Queue report unavailable – mail system is down ”
We can find that it does not starts correctly the service postfix MTA. But the system shows that everything is working properly:
[zimbra@mail]$ zmcontrol status
Host mail.ttdconline.com
amavis Running
antispam Running
antivirus Running
ldap Running
logger Running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running
We reviewed logs and services and we see that the MTA is down:
[zimbra@mail]$ tail -f /var/log/mail.log
Jan 22 11:08:00 zcs postfix/postqueue[19195]: fatal: Queue report unavailable – mail system is down
[zimbra@mail]$ netstat -nlpt | grep 25
tcp 0 0 0.0.0.0:7025 0.0.0.0:* LISTEN 19017/java
[zimbra@mail]$locate master.pid
/opt/zimbra/data/postfix/spool/pid/master.pid
[zimbra@mail]$ zmmtactl stop
[zimbra@mail]$ mv /opt/zimbra/data/postfix/spool/pid/master.pid /opt/zimbra/data/postfix/spool/pid/master.pid_ori
[zimbra@mail]$ zmmtactl start
Rewriting configuration files…done.
Starting saslauthd…already running.
/postfix-script: starting the Postfix mail system
[zimbra@mail]$ postfix reload
/postfix-script: refreshing the Postfix mail system
----------