Zimbra Exporting all mail addresses Rumi, April 26, 2018April 26, 2018 Exporting all addresses (mailboxes, aliases and distribution lists) is a vital tool if you have a backup MX and only want it to accept email for valid recipients. One reason for that is to stop spammers who simply use a dictionary of common names to generate recipient email addresses which would flood a backup MX with undeliverable email. Some anti-spam providers (e.g. Postini) have automatic provisioning processes for making this possible. A naive process of extracting mailboxes looks like this: /opt/zimbra/bin/zmaccts | grep 'active' | egrep -v '^\W+' | awk '{print $1}' Unfortunately, this doesn’t give distribution lists and aliases, so a more sophisticated approach is necessary, for which there is no specific tool and requires using the ldap tool thus: In ZCS 8.7 and above: /opt/zimbra/common/bin/ldapsearch -LLL -x -D"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_userdn | \ awk '{print $3}'`" -w"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password | \ awk '{print $3}'`" -H `/opt/zimbra/bin/zmlocalconfig ldap_url | \ awk '{print $3}'` $* | \ grep ^mail | \ awk '{print $2}' | \ sort > zimbra_recipients.list In ZCS 8.6 or below: /opt/zimbra/openldap/bin/ldapsearch -LLL -x -D"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_userdn | \ awk '{print $3}'`" -w"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password | \ awk '{print $3}'`" -H `/opt/zimbra/bin/zmlocalconfig ldap_url | \ awk '{print $3}'` $* | \ grep ^mail | \ awk '{print $2}' | \ sort > zimbra_recipients.list If your backup MX is exim, then you need to add the following to the config file: accept local_parts = /etc/exim/zimbra_valid_emails.list domains = +relay_to_domains deny The list of recipients needs to be converted to a form that exim will process, e.g. sed -e 's/^/^/' -e 's/\./\\\./' -e 's/@.*$/$/' > exim_valid_emails.list < zimbra_recipients.list Src: https://wiki.zimbra.com/wiki/Exporting_all_addresses Related Administrations Collected Articles Configurations (Linux) zimbra
Many-To-One Mappings IIS February 13, 2013February 13, 2013 Many-to-one Client certificate mapping is used by the Internet Information Services (IIS) to associate an end user to a windows account when the client certificate is used for the user authentication. The user session is executed under the context of this mapped windows account by IIS. For this to work… Read More
SSH Tunnel on PuTTY January 5, 2019 Most of you have probably used a tunnel with an SSH connection. What you probably weren’t aware of is that you can use a dynamic tunnel to access all remote infrastructure. Furthermore, you can specify a port and a destination IP to have direct access. This process is achieved through… Read More
stress test your web server with httperf November 13, 2017 Httperf is a tool for measuring web server performance. It provides a flexible facility for generating various HTTP workloads and for measuring server performance. NOTE : for accurate results, it’s best to run httperf from a remote machine and not from the localhost to install httperf in red-hat based distributions… Read More