Wednesday, 24 October 2012

Setting up DNS using Webmin

Creating a Master Zone.
1) Click on "Create master zone"
2) Enter the domain into the "Domain name / network" box.
3) For the master server, type in the domain name as well.
4) You can check the "Create NS record" box if you'd like.
5) You can enter your email address in the appropriate box.
6) Type in the IP address of the server (The external IP address provided by your ISP).
7) Click "Create"

Creating Address Records
1) Click on "Address"
2) type in the name of the machine and type in the IP address.
3) Click Save.

Creating an MX Record (Mail Exchange Record).
1) Click Mail Server (If you want a mail server)
[B](Make sure you put the period at the end;[/B]
2) For the name, type in the domain
3) For the mail server, type in
4) Set the priority to what you like.. 10 is usually default. This is more of a concern if you are hosting a lot of domains.
5) Click "Return to Record Types"

Saturday, 20 October 2012

Alfresco 4 Community Set up Email

Set Global Properties - Ubuntu

Copied from Patrick Bailey 

Alfresco requires some additional installs to work.  Alfresco out of the box uses a few other tools like OpenOffice and ImageMagick.

Edit /etc/apt/sources.list.

 Ø  sudo vi /etc/apt/sources.list

Add the following at the bottom

deb lucid partner

Run this from the command line

 Ø  sudo apt-get update

Install these via apt-get

 Ø sudo apt-get install imagemagick
 Ø sudo apt-get install swftools
 Ø sudo apt-get install libjodconverter-java

Edit the /opt/tomcat/conf/ file

 Ø  sudo vi +74 /opt/tomcat/conf/

Updated shared.loader to the following

 Ø shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

In the /opt/tomcat/shared/classes directory there is an folder. Rename it

 Ø  cd /opt/tomcat/shared/classes
 Ø   sudo cp

Now edit this file

  Ø  sudo vi

Here is the file I made,  Make sure to edit the mail.* portion to an email account you have.

## Common Alfresco Properties #

# Sample custom content and index data location

# Sample database connection properties

#Disabled the guest login

# External locations


# Property to control whether schema updates are performed automatically.
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
# there are also auto-generated update scripts that will need to be executed.  After
# upgrading to a new version, this can be disabled.

# MySQL connection

# Oracle connection

# SQLServer connection
# Requires jTDS driver version 1.2.5 and SNAPSHOT isolation mode
# Enable TCP protocol on fixed port 1433
# Prepare the database with:

# PostgreSQL connection (requires postgresql-8.2-504.jdbc3.jar or equivalent)

# Index Recovery Mode

# Outbound Email Configuration
# New Properties

# Alfresco Email Service and Email Server

# Enable/Disable the inbound email service.  The service could be used by processes other than
# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.

# Email Server properties

# A comma separated list of email REGEX patterns of allowed senders.
# If there are any values in the list then all sender email addresses
# must match. For example:
#   .*\@alfresco\.com, .*\@alfresco\.org
# Allow anyone:

# The default authentication chain
# To configure external authentication subsystems see:

# URL Generation Parameters (The ${localname} token is replaced by the local server name)


# Default value of is which means 'listen on all adapters'.
# This allows connections to JMX both remotely and locally.

# RMI service ports for the individual services.
# These seven services are available remotely.
# Assign individual ports for each service for best performance
# or run several services on the same port. You can even run everything on 50500 if needed.
# Select 0 to use a random unused port.

Reboot the server

  Ø  sudo reboot now

It may take a while for alfresco to come up and set up the database the first time.  What I do is log back into the system them tail the tomcat log to see if alfresco is starting correctly, and for when it is done  (in my case it took 2 ½ minutes)

  Ø  sudo tail -f /opt/tomcat/logs/catalina.out

See the server startup message.

Adding New Users as Admin

Open up

The default login is

User               = admin
Password     = admin

I always first change the admin password from the default just to make sure. To do this…

Click on User Profile

Click on Change password

Enter new password and click Finish

 Click on  Manage System Users

Click Create New User

In my case I created a user called patman

Click next  

enter a password
Click Finish

Now add the user to the admin group.

Click on Administration Console

Click on manage User Groups


Click on Show all then click add user in the Alfresco_Adminstrators

Search for user, select user then click add.

Finally click on OK

Now this user is an admin.

Log out and log back in as the user you just made and gave admin rights to.

Make sure this user can log into the Share site as well. 
Open up

While you are in Alfresco share Create a folder to email into.

First create a site

Click on Sites àCreate Site

Call it Email_test and click OK

Making a folder in Alfresco e-mailable

Now that you have Alfresco 4.0e running, how do you get a folder


Once Alfresco is set up to receive emails directly if an email is received from an address that is associated with a current Alfresco user, it will be treated as if that user uploaded it.

As an example, if an email comes in from and we have a “bob” user in alfresco that has an email set as . Then when an email comes into our alfresco server from it will be treated as if “bob” uploaded it.   (of course this is assuming bob is set up as an email user and emailing into alfresco is turned on)

With that in mind, for this test, I will make a user to handle emails sent from non-alfresco users.  ( I will also make that user an admin user, which is not a good idea for a live system, because it could overwrite any file or folder)

OK so let’s make a new user.

Log into alfresco as an admin user

Click on  Manage System Users

Click Create New User

I gave it a user name of First name of email and last name of Anon.
I also gave it an email on then clicked next

I set its user name to emailAnon gave it a password and set its Home space to emailAnon and clicked next.

Click Finish

Now add the user to the email contributors and admin group.

Click on Administration Console

Click on manage User Groups

Click on Show all then click add user in the EMAIL_CONTRIBUTORS

By default user cannot email into the system.  In order for a user to be allowed to email into the system it must be part of the EMAIL_CONTRIBUTORS group.

Type in email and click search.  This will display the emailAnon user.  select on this user and click add, it will then show up in the bottom part.  Finally click OK in the upper right.

Repeat the same thing for this user but for the ALFRESCO_ADMINISTRATORS group.   I did this so that they could upload to any folder.


Edit the file again.

  Ø  cd /opt/tomcat/shared/classes
   Ø  sudo vi

# Alfresco Email Service and Email Server

# Enable/Disable the inbound email service.  The service could be used by processes other than
# the Email Server (e.g. direct RMI access) so this flag is independent of the Email Service.

# Email Server properties


# A comma separated list of email REGEX patterns of allowed senders.
# If there are any values in the list then all sender email addresses
# must match. For example:
#   .*\@alfresco\.com, .*\@alfresco\.org
# Allow anyone:

Here is a line by line explanation (as best I can give)

            Just enable inbound email

            Turn on the alfresco email server bind it to port 25 and set the
            server domain name 

            Any email from an unkown user will be uploaded as if it was
            uploaded by this alfresco user.
            A word of warning… Since the emailAnon user is an
            admin it means anyone can email into the system and overwrite  
           or add  anything (very dangerous so plan your system out better
           than this)

            For now shut this off it ist for TLS encryption when 
            sending/recieveing emails  In a real system you should
            probably turn this back on and configure it correctly
            A regex field that says what email addresses in are allowed.
            In this case any email would be allowed.

After this has been set up restart alfresco…

(in this case I just restarted tomcat to reboot alfresco)

 Ø  sudo /etc/init.d/tomcat restart

Watch it boot up again by tailing the log

 Ø  sudo tail -f /opt/tomcat/logs/catalina.out

Every file and folder has an email address in Alfresco.   But this email address is usually a number, which can be very hard to remember.  To solve this problem it’s possible to add an email alias to a folder or file.

Log into Alfresco as an admin user.

Click on “Company Home”  Then Sites.  Here you will see the emailtest which is the share site you just created.

Click on emailtest.  

Now you can see the documentLibary folder.  Click on the View Details icon.

The 844 is the email ID.  So to email into this folder you could email to and it would go into this folder.

But that is hard to remember so make an alias to make your life easier.

Click on Run Action on the right hand side.

Set to “add Aspect” and click “Set Values and add.

Select “Email Alias” and click OK

Click Finish.

Now you will see this Email Alias added to your properties.

Click on Modify in the upper right.

Set the Email Alias to “inbox” and click OK

Now its Email Alias is set any email sent to inbox@ will go into this folder.

I opened up my yahoo email and sent this email

There is not attachment to this email.

Now go to share and login

Click on SitesàEmail_test

Click on the Document Library

Now you will see 2 files that were created from this one e-mail.

This is a test and this is a test.html

Now if you had sent it with a document attached say an excel file.

Now you will see the xlsx file as an uploaded document.