GeoIP2 is a powerful module for Nginx that allows you to determine a visitor’s geographic location based on their IP address. This can be useful for access control, logging, and performance optimization. Since AlmaLinux 9/RHEL 9 doesn’t include this module by default, you’ll need to compile and install it manually.
Continue reading[cPanel][Maildir] Duplicate emails between different mail boxes using Symbolic links
When some users switch to a new email naming policy, they may need to duplicate email content. This process can be very demanding in terms of inodes and memory space.
In my experience, one client had over a hundred addresses. They needed to retain the old email addresses while maintaining a complete history of previous emails and setting up forwarding.
The transitions were as follows:
- ceo@example.com => firstname1.lastname1@example.com
- hr@example.com => firstname2.lastname2@example.com
- it@example.com => firstname3.lastname3@example.com, firstname4.lastname4@example.com
We use Maildir, and to avoid content redundancy. I wrote a basic script with the understanding that mail operations won’t alter the original emails. As the user can only:
- Remove the email message, which will result in the removal of the symlink.
- Or move the email message from one directory to another (e.g., Inbox => Archive, or Trash); which will be interpreted as moving the symbolic link to the directories .archives/cur or .trash/. Since we use full paths to describe the links, this won’t cause any issues and won’t alter the original files.
I have also excluded some maildir system files from being linked, starting usually with dovecot* or maildir*.
The script usage is straightforward:
./mailinker.sh mycpuser oldbox@example.com newbox@example.comContinue reading [cPanel][Webmail] Add fonts to Roundcube
Many companies primarily use webmails and adhere to specific standards for email format, footer, and font. And while custom fonts can be utilized in local email clients (such as Outlook or ThunderBird), open webmail services predominantly support web-safe fonts. These are fonts that are available across the different web platforms and remain consistent with the original font. Besides this, there might be some variations in their support for other common fonts, such as Times New Roman.
Continue readingArabicthon #2
In November 2023, we participated in the Arabicthon, a 3-day challenge to develop an AI solution for the Riyadh Dictionary.
Read-Only Failover
After experiencing an international peering issue that affected some websites for a few hours, we deployed a new experimental service for web hosting named AlwaysUp. This free and optional service can be activated by the customers to ensure their websites will always be accessible. It’s particularly useful for websites that require high read-only availability, such as blogs, magazines, and newspapers. These sites may not be ready to invest in an expensive infrastructure/architecture or in an full-cache CDN, but they can tolerate not being able to edit their content in the event of a failure.
When the service is up, the requests are handled with RR DNS to either the master or the failover, which are geographically distant from each other. The failover proxies the requests to the master and caches them if they don’t include cookies. In case of a failure in reaching the service, the DNS will direct the requests to the failover, which has already cached most of the active pages.
تحدي التطبيقات القرآنية #2
شاركنا قبل أسبوعين في برمجان التطبيقات القرآنية، كوننا نعمل على مشاريع في هذا المجال، وهو تحدٍ استمر لنحو يومين وكان يجب فيها العمل على فكرة محددة تخدم مساقات معينة هي التلعيب والذكاء الاصطناعي وإنترنت الأشياء والواقع الممتد. وينبغي تطوير نموذج تجريبي لها.
[Odoo] A script to autobackup Postgres Databases
If you don’t want to explore the Odoo modules in the market and you are rather looking to customize your own script. You may use this, as one of our client devs asked for a fast way to do it.
Continue reading[cPanel/WHM] Script to enable terminals for users
Within some shared-hosting policies, cPanel terminals may be disabled by default for all users. However there are different solutions to explicitly activate it for specific users based, for example, on their e-mails.
Continue readingMashriqi Warsh Font
King Fahd’s Complex (KFGQPC) has made significant contributions to Quranic fonts. One such example is Warsh’s font, which adheres to the traditional Maghrebi style. This style incorporates:
– Maghrebi calligraphy (الخط) and dotting systems (الإعجام)
– As well as Warsh’s orthography, and diacritics (الضبط).
https://qurancomplex.gov.sa/en/warsh/
Continue reading
[SPIP] 429 error message with crawlers like Google
One of our clients uses a SPIP website and began to lose pages from Google’s index. The Google Search Console reported 500 errors on many of the pages, but the pages were visible to users. When investigating the logs or simulating a Googlebot browser-agent, I found that SPIP was sending HTTP error 429 (too many requests) to Googlebot and other search engine crawlers. This was because SPIP uses the server load average function to determine if it should allow bots’ crawling, however shared hosting providers have usually ultra performant CPUs with a high load value.
Continue reading

