Mailer App for ArcManager

Sending Mails feature implemented today in ArcManager.

Mailer App Features:
– Sender Address (set a custom account to send all mail)
– Sender Identity – build your own sender reputation (do not want mails in spam right ? )
– Templates – build html & text templates with contact variables to use in messages & newsletters
– Newsletters – compose, schedule, send newsletters. Track Open messages, Clicked links,
Tag contacts based on their activity (open, click, unsubscribe, spam complaint)
– Mailing Stats – Mails Sent, Recipient reactions on received mail, Reports

ExtJs HtmlEditor not Saving Source Edit

Using extjs 4.2.1 and it seems that the htmleditor component is not committing changes
made in Source Edit mode.

Quick fix:

   // form configuration
   .....
   trackResetOnLoad: true
   .....
   // on save function
   if (panel.htmlEditor.isDirty()) {
       // toggle the editor to visual edit, alternatively toggle twice
       panel.htmlEditor.toggleSourceEdit(false);
   }

Could probably fire an event instead of this, it’s good for the moment.

Samba copying files results in different permissions

A regular samba share, with force create mode and directory mask

    writable = yes
    force create mode = 0775
    force directory mode = 0775
    create mask = 0775
    directory mask = 0775

Creating folders and files from a Windows machine, everything works as intended. However copying
files (copy/paste or drag) will result in a different permission than the create mask.

A quick solution was to change the UMASK value

    nano /etc/login.defs
    #change UMASK  to 002 from 022

Samba separate audit log instead of syslog in ubuntu

Setting up the audit on the file server started in the previous posts, and trying to get the
audit log in a separate file. I found out that all logs were being sent to /var/log/syslog instead
of the specified file, unless the log file is set into /var/log directory.

> sudo nano /etc/samba/smb.conf
  ########################
  # enable global audit for all shares, or include in specific share
  vfs objects = full_audit
  ###########################################
  full_audit:prefix = %u|%I|%m|%S
  full_audit:success = mkdir rename unlink rmdir pwrite pread
  full_audit:failure = none
  full_audit:facility = local7
  full_audit:priority = notice
>  sudo nano /etc/rsyslog.d/50-default.conf
   #change this line
   *.*;local7,auth,authpriv.none           -/var/log/syslog
   #insert!!!Log file must be in /var/log or else is not gonna work!!!
   local7.*                        /var/log/samba-audit.log

> sudo service smbd restart
> service rsyslog restart
> sudo tail -f /var/log/samba-audit.log

Ubuntu 12.04 server RAID1 with 2Tb disks Legacy/UEFI

It is all about partitioning, you must decide first on the boot type Legacy Bios or EFI/UEFI.

Installing was done from an USB disk containing Ubuntu 12.04 64b server.

a) Install with Legacy Bios

BIOS setup:
- disable EFI boot. You should check that the installer will start in Legacy mode (purple graphic screen with Install Ubuntu options) instead of EFI mode (black screen with text options)
- disable QuickBoot and Intel Smart Response Technology

Start installer and continue to partitioning (network card should be connected to internet)
Partitioning: (Manual Partitioning option) – for over 2Tb disks the partitioning type should be GPT (auto selected, but you can check after partitioning)
1. create 1Mb partition type Bios Boot Partition
2. create (2 x RAM size) swap partition type Physical for Raid
3. create (100-500 MBb) boot partition type Physical for Raid
4. create data (rest of space) partition type Physical for Raid
5. duplicate the partitions on the second drive.
6. create 3 software raid arrays with swap (select use as swap), boot (use as ext4 mount point /boot) and data (use as ext4 mount point /)
7. write the partitions to disk and continue with install procedure.
Read more

Network File Server with audit & user transfer limit

I ordered today 2 x Seagate NAS HDD 2TB to build a simple local file server, RAID 1 to store graphic work files for a team.

Operating system: Ubuntu Server [last version]

File sharing & networking : Samba

Audit: vfs_full_audit Samba module

User statistics & limits: a custom rails app that will parse logs, generate stats
per user & email to managers based on custom read/write/delete triggers. Maybe will also lock user
access to files when a certain number of files/bandwidth has been reached. Will
post more details after setting up the server.

Part 2 – Installing the server
Part 3 – Setting audit log

Mailgun on DigitalOcean DNS settings

Integrating Mailgun with ArcManager on a DigitalOcean VPS.

In order to get the domain verified with MailGun:
CNAME record should end with a dot
TXT records should be wrapped in double quotes
DNS Key names should be without the domain name.

I use ZohoMail for receiving mail, thats why the MX records.

Testing the records, ubuntu console, notice the semicolon was escaped.

 dig arcmanager.co.uk TXT
 dig smtp._domainkey.arcmanager.co.uk TXT

 ;; ANSWER SECTION:
 smtp._domainkey.arcmanager.co.uk. 1800 IN TXT   "k=rsa\; p=MIGfMA0GCSqG..."

Javascript and client side encryption

It took a while to research client side encryption and key sharing, and I ended up designing
an application that runs on the host PC and manages all the encryption, decryption, key
generation, key storage, key rotation to use it for my cloud project.

Personal Crypto Server can be accessed by javascript in order to encrypt/decrypt sensitive data before being sent to cloud.

I have 2 modules that use it, Contacts App with a secure box designed to store sensitive contacts
information and Passwords Management and Sharing App, available in ArcManager

Blocking abusive crawlers

I had to block 80legs and ahrefs, two abusive crawlers that do not respect
robots.txt.

On Apache server with .htaccess

SetEnvIfNoCase ^User-Agent$ .*(80legs|ahrefs) BADBOT
Deny from env=BADBOT

This certificate has an invalid digital signature.

This happened on an Windows XP Home machine, while trying to access a SSL server.
After a few tests it looked like Chrome and IE had a problem due to the operating
system, while FireFox managed to successfully connect.

Why ? Because on the server I installed a SHA2 -SSL certificate which is not supported
by older operating systems.

Solution: Upgrade the operating system or downgrade to a SHA1 – SSL certificate.

Windows XP without SP3 and Windows 2003 failed the tests on ArcManager Control Panel

Latest Posts

Contact

Email: danny@arcmanager.co.uk
Brasov, Romania

Web Server

Cache is Off.
256MB VPS
Ubuntu Linux
Nginx, Php-fpm, Apc
Mysql