Scalix Administration – Useful Commands

Scalix LogoScalix is now a mature email server, reliable and powerful, that can accommodate environments with thousands of users.
Most of the tasks can be accomplished using the web interface, which is a nice and intuitive interface. However, not all the tasks needed for a day to day administration are available from the web interface.

Here are some command line Scalix administration commands for the daily use as an email administrator.

Check Scalix services from CLI

omstat –a
omstat –s

lsof –i:25
lsof –I:143
lsof -i :5733
ps -ef | grep postmaster

Users unable to VIEW the inbox content

Try the following steps.

Run:

 
omshowu -n username -f
This should give you the location of the user folder similar to this "~/user/g000038".
Go to /var/opt/scalix/ll/s/user/g000035 (in our case) and remove the "imap-cache" directory then restart the imap server (users will get logged off).
rm -r imap-cache

STOP and START IMAP
Restart IMAP service: omoff -d 0 -a IMAP & omon IMAP

Users unable to VIEW some of the inbox content

Ask the user to log off!!! AND to stay logged off until you finish!!!!
View which users are loged on: omstat -u all
View the process associated with that user: ps -ef | grep 55003 Where 55003 is the user id.
Kill the processes associated with that user: kill -9 “process id”
Fix the mailbox: omscan -Avfx -U “User Name”
Restart the scalix service: omshut -t3 && sleep 3 && omrc
(sxfixdref –f)

sxaa problems
Delete the user’s 3d files in the above folder (/var/opt/scalix/ll/s/user/g000035)

Issues with the web interface

Restart Tomcat and Apache2
/etc/init.d/scalix-tomcat stop
rcapache2 stop
rcapache2 start
/etc/init.d/scalix-tomcat start

CDA server not starting

omoff -d 0 -w cda 
omreset -o off cda

delete the lockfile, (if it exists):

rm /var/opt/scalix/ll/s/sys/omcda.lock  
 omon cda

SPAMASSASSIN problems

Location: /etc/mail/spamassassin
Important files:
Init.pre
Local.cf
V310.pre
V312.pre
Update-channels

Automated update via crontab

cat /etc/cron.daily/spamassassin-updates

(this will update the filesd and restart spamassassin)
Update rules are located at:
/etc/mail/spamassassin

Edit Spamassassin Whitelist and Blacklist

vi /etc/mail/spamasassin/whitelist.cf
Entries should be of the form: whitelist_from queen_213@hanmail.net

vi /etc/mail/spamassassin/vi whitelist.cf
Entries should be of form: blacklist_from user@domainname

when whitelist and/or blacklist are modified…

  1. check for error: spamassassin –lint
  2. restart spamd /etc/init.d/spamd stop and then /etc/init.d/spamd start

Check bounces email on Postfix
tail -f /var/log/mail | grep NOQUEUE

Troubleshoot sending or receiving

  1. Check the ldapmapper and make sure it’s working.
    /etc/init.d/ldapmapper status
    /etc/init.d/ldapmapper stop
    /etc/init.d/ldapmapper restart
  2. Check the sendmail daemon – make sure it’s working.
    ps aux |grep sendmail
    You should see two things: Accept connection and Queue control
    If you don’t see them, restart the service. Sometimes you need to create your own script for starting sendmail, instead of using the one that comes with the distribution.

Clean Scalix Queues

Service router queue, Internet Mail Gateway queue, Local Delivery queue.

CLEAN INTERNET MAIL GATEWAY QUEUE

 echo -e "A$(( $(date +%d) + 10 ))E\nl\nunix\n\n" |
  omqdump -p |
  ./clearq.pl |
  tee output

CLEAN LOCAL QUEUE
echo -e “A$(( $(date +%d) + 10 ))E\nl\nlocal\n\n” |
omqdump -p |
./clearq.pl |
tee output

CLEAN ROUTER QUEUE
echo -e “A$(( $(date +%d) + 10 ))E\nl\nrouter\n\n” |
omqdump -p |
./clearq.pl |
tee output

Always use a new file, output is a sample file name

Once done, de-activate scalix services , except omstmon, omsessd, queue.manager and RUN OMSCAN (this will synchronize the database)
omscan –Aqvfx
stop scalix normally, start scalix normally.

Maintenance in Scalix

Delete user

/opt/scalix/bin/omdelu -n CN=FirstName LastName/G=FirstName/S=LastName/OU1=lcbmail

Regular maintenance

omscan –Aaf (Select all areas for checking/scanning and fix)
omscan -Avuo3 -f (-A active – refreshes the omscan; -u each user; -o 0 output normal)
omscan -Avfx -U “User Name” (scans only one mailbox)
omscan -AavfxS

Refresh omscan to the latest results
omoff -d 0 scan (shutdown omscan)
omscan -Z (capital z) (reset omscan counters)
omon omscan (restart omscan)
omshowlog -f 10.05.07 -F 09:09:00 (-f date –F time) from “Date”, from “Time” (-t date –T Time) to “date” “time”
omscan -avfx – remove the orphans
omscan -AavfxS – active mode to check and fix any issues it can find – it doesn’t clear orphans
sxdu -hs (show actual mailbox space usage)

Clean up Users’ Mailboxes:

omtidyallu -Twr -a 100 –d -c -k (purges everyone’s trash and recovery directory) do not attempt unless you have to, (for example you are out of space on server) – this will delete all users’ email

omtidyu
-T folder[s] Defines which folders the following criteria is to be applied to:
i refers to the intray;
o refers to the outtray;
f refers to the filing cabinet;
w refers to the wastebasket (Deleted Items folder).
p refers to the pending tray; and (Sent Items – ?)
l refers to the List Area.
r refers to the Scalix Recovered Items folder.

Examples of Mainenance Cleaning in Scalix

omtidyu -B -u “user name” -k -T i -t “[SPAM]*” returns emails with the subject [SPAM] in the inbox
omtidyu -B -u “User Name” -d -k -T i -t “I Love You” removes all message with the subject.
omtidyu -B -u “User Name” -d -k -T i -a 365 deletes all the email older than 365 days
omtidyu -B -u “User Name” -d -T i -a 4 – moves the email messages in the Wastebasket
omtidyu -B -u “LCB Mailer” -d -k -T i deletes permanently all the messages in Inbox
omtidyu -B -u “User Name” -d -k -T iofwlrp -a 365

Import/Export mailboxes, backup, restore in Scalix

sxmboxexp –user “User Name” -a /mnt/temp/uname.mbox
sxmboximp -a /mnt/temp/uname.mbox –user ” Test User”

Scan mailbox for last login time

/root/sxlastlog.pl >lastlogin.txt
more /root/ lastlogin.txt
This could be tricky if you want to get the inactive mailboxes, since you won’t know the status of the redirected mailboxes.

Scan users’ mailbox for usage

Sxdu -sh

Show all mailboxes

omshowu –m all

Pull details of a specific mailbox

omshowu –m all | grep –i nameofindividual

View details of mailbox

omshow nameofindividual or authentication ID

Delete a duplicate account

omdelent -e local-unique-id=’ID’
omdelent -e g=given_name/s=surname

List, search users, mailboxes and email addresses

List number of users per country
omsearch -e S=* -m CNTRY >Email_list.txt
add additional attributes like name (/CN) or email address ( :
omsearch -e S=* -m CNTRY/CN/IA-FORMAL
omsearch -e S=* -m CNTRY/CN/IA-FORMAL
omsearch -e S=* -m CNTRY/CN/INTERNET-ADDR
omsearch -e S=* -m CNTRY/CN
or add all attributes:
omsearch -e S=* -m @all-attr@

per country list export to text file:
omsearch -s -e CNTRY=JP -m S/CN/IA-FORMAL >Japan_Users.txt

omshowatt for a list of attributes

omsearch -s -m CNTRY/G/I/S/CN/IA-FORMAL >list-of-users.txt

Search Accounts ibn Scalix

omsearch -e “G=<firstname>/S=<lastname>” -m @all-attr@

Search an Account If You Have the Email Address
omsearch -m @all-attr@ -e IA-FORMAL=email@cordonbleu.edu (you can use * )

Read and Edit the Mailbox Rules in Scalix

sxaa –user username (get the active and inactive rules)
sxaa –user username –remove 501 (remove the rule with the reference 501)
sxaa –user username –off 600 (disable, without removing the rule with the ref 600)
sxaa –user username –on 600 (enable the rule with the ref 600)

Other Useful Commands in Scalix

ps –ax ( list of processes)
Top –p pidID (stats about specific process)

More info on the error from omshowlog
omsolve -n OM 16094

Search for content ZIP compressed logs on the fly
bzcat /var/log/mail-20070610.bz2 | grep -i webmaster | less –S

Find the abbreviated names for a Scalix service
omshowlvl –a –l

 

Not Related To Scalix But Useful

tcpdump -ni eth0 port 5729 -s 0 –A
watch -n1 cat /dev/vcs10 (see the logs on the tty10 console)

rdiff-backup a great utility to backup your system

Scalix Migration

Move users to other mail-nodes.
Note that you don’t need to specify your node if the user is in the default node. –o is old –n is new.
ommodu -o username -n “Firstname Lastname”/Parisnode

PROTECT IP / SOPA Breaks The Internet

Update to the probably most infamous attempt of civilized world to bring the darkness of communism and censorship into the Internet world.
Lamar Smith, creator of the bill, pulled the bill “until there is wider agreement on a solution.

Yay!!!

Strike against censorship. Join the largest online protest in history: tell Congress to stop this bill now!
Don’t let this bill pass, it is our duty to fight against it.

More info in this movie:

Start a Blog – Dedicated WordPress Hosting

You’ve finally decided that you want to start a blog. Whether the blog is for a business for a nonprofit association or as a personal blog has little importance, the important thing is to have a plan an the know-how.

Define Your Blog’s Strategy

First of all you need a strategy for your blog. What do you want to write about? Does your blog have a theme a niche or is a bit of all. Most successful blogs have a certain theme. Once you’ve decided on your blog’s topics you need to define the goals of your writing. If it’s a personal blog most likely you don’t need any goals. But on the other hand if it’s a business’ blog your main goals could be promotion of your business main website, drive traffic to specific areas of this website, or simply a PR campaign. How often and who will write content and who will publish/approve your posts?

Once you have determined the initial steps you can go forward and think about the technical details of your blog.
You want to start blogging today, is that possible? Yes it is, if you don’t have any special requests that can delay your initiative.
Starting a blog is not as hard as it might seem.
If you want to make it simple go with the same provider for both your domain name and your website hosting. It’s easier, and you get support for all of your services in one place.
If you need more control over your domain name and hosting account then you definitely want to host with one company and register domains with another company.
I always use for my blogging needs a combination. I use Godaddy for domain names and hosting with one of the Hostgator or Hostmonster.

The Simple Free Alternative of Blogging

Choose a Free Blogging Platform

Although many blogging platform exist, the best for professional blogging is WordPress. One can argue about the competition: Typepad, Blogger, etc… But in the end WordPress is great for its flexibility, features and community. It is the most spread blogging platform. Create a free account with any of these blogging communities and start blogging. Is that simple. The addresses are typepad.com, wordpress.com and blogger.com.

Pick A Domain Name for Your WordPress Blog.

Choosing a domain name is one of the most important decisions you will take for your blog.
The ideal domain name will be short enough to remember and write down and will contain the most important keyword of your business, the one you want high ranking on search engines. Don’t avoid the dashes they are totally fine. Great gTLDs are .com, .net, .org, .info, etc…

Choose A WordPress Hosting Provider.

As I said before my personal favorites are hostgator, hostmonster, but if you have reliable information about another good hosting company go with that, I don’t know them all… (And by the way I am not hiding that this is an affiliate link.)

Install WordPress Using Control Panel

Installing WordPress is really trivial. If you are totally nontechnical then you can watch this video that shows you how to do that. After the initial installation, however things are a little more complicated.

Choose a WordPress Theme

There are hundreds of free themes and commercial themes. The differences between free and commercial themes are design flexibility and SEO features. Premium themes will give you way more design options and will be optimized for SEO. A premium theme will also be better optimized for speed.
Take the time to tweak the chosen theme. If you are non technical you definitely need a premium theme to allow you to set up features like font type, background colors, layout and site dimensions. You need a nice looking blog because that retains visitors.

SEO Aspects to Be Fixed in WordPress

Optimize Your Website’s Address

Go to the General tab from the Settings panel inside your WordPress Dashboard.
Modify the name of your WordPress blog address to include the www portion as shown here.
Edit the website's address in WordPress

More Sites to Ping to

Add some more sites to ping to. This way every time you post or update an article these services will be announced of your changed content. Search engines will pick up the this information from your site and from the pinged sites, improving your chances to get your content indexed. You will do this into your Update Services section.
SEO - Add Sited to Ping to

Home Page Optimization for SEO

If you want to optimize your blog’s first page you need to set up your blog as in the image. You can do this from your reading tab in the Settings control panel of your dashboard. This will allow a full optimization of the page for both speed and keywords, etc…
SEO Optimization Home Page

Set your Blog’s Permalink Structure

The default permalink structure for WordPress is not optimized for SEO.
The best for SEO is the following A good SEO permalink structure has to be keyword rich, using the categories and post names. You can use either /%postname%/ or /%category%/%postname%/. If the latter is used careful attention is needed when the category is chosen. You will do this from your permalink tab.
SEO WordPress Permalink Structure

Install Essential Plugins to Your WordPress Blog.

Plugins are an excellent way to improve your WordPress website. You can install whatever works for your site, but be cautious because bad plugins can do harm to the performance of your site or to your traffic. Choose wisely and install only what you need. The basic minimum is: Akismet, WordPress Mobile Edition, WP-Optimize, WP Super Cache, All in One SEO Pack, Google XML Sitemaps.

Internet Marketing and Technology