Quantcast
Channel: Zimbra :: Forums - Developers
Viewing all 286 articles
Browse latest View live

Reply to an appointment invitation

$
0
0
I am using ZCS 8.0, use soap api for our application. Need to get the reply from an invitee for an appointment - I am calling GetAppointment SOAP Command and able to get the accept/reject/tentative kind of response back but I am unable to retrieve the reply message as sent by the invitee. Please let me know which command or soap message I need to use to get that information.
Thanks for the help.

Strange git repo

$
0
0
Hi folks,


while pulling the source via git, I've noticed the history (branch: ironmaiden-foss)
completely changed, compared to last pull from Feb. 6th - the branches diverged
on 3098 (!!!) commits.

And when picking the corresponding commit from new branch which matches
timestamp and message of the old head from my last pull, the trees also differ.

What are you folks doing ?!

By the way: why aren't there any tags for the existing releases ?

I hope you are aware that such things aren't actually helpful for getting any
contributions ... ;-o


cu

Java program to connect mysql using socket=/opt/zimbra/db/mysql.sock

$
0
0
Hello All,

I have fetched my mail from gmail account to local zimbra machine and which is stored in mysql database, which run mysql on 7306 port and /opt/zimbra/db/mysql.sock.

Now, I would like to access all those record via java program.

I have used Spring with Java program using zimbra java version 1.7.0_07-b10

Here is configuration in xml file ..
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://172.18.100.117:7306/mboxgroup8?socket=/opt/zimbra/db/mysql.sock"/>
<property name="username" value="zimbra"/>
<property name="password" value="Zy"/>
<property name="maxActive" value="10"/>
<property name="maxIdle" value="5"/>
<property name="maxWait" value="60000"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="60"/>
<property name="logAbandoned" value="true"/>
<property name="validationQuery" value="Select 1"/>
<property name="testOnBorrow" value="true"/>
<property name="testWhileIdle" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="10000"/>
<property name="minEvictableIdleTimeMillis" value="60000"/>
</bean>

When I tried to connect via program, it gives me below error...

getMails- 59- Exception in getMails at Manager:org.springframework.jdbc.CannotGetJdbcConn ectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
at org.springframework.jdbc.datasource.DataSourceUtil s.getConnection(DataSourceUtils.java:82)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapClientTemplate.java:182)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.executeWithListResult(SqlMapClientTemplate.java: 219)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.queryForList(SqlMapClientTemplate.java:266)
at com.cashEmail.core.dao.MailItemDAOImpl.selectByExa mpleWithBLOBs(MailItemDAOImpl.java:86)
at com.cashEmail.manager.CashManager.getMails(CashMan ager.java:48)
at com.cashEmail.core.service.CashService.getCashEmai l(CashService.java:77)
at com.cashEmail.resource.CashResource.getEmails(Cash Resource.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
---

Please help me out, how can I connect my java program to zimbra MySQL database to retrieve data from mail_item table.

--
Chandrakant Solanki

Modifyng tinymce to enable html code editing in signature

$
0
0
Hi,

I'm using zimbra 8.0.6 OSS

I needed to enable html code editing in signature (tinymce)

I changed the following file :
/opt/zimbra/jetty-distribution-7.6.12.v20130726/webapps/zimbra/WEB-INF/tags/options/optSignatures.tag

added code here :
theme_advanced_buttons2 : "formatselect,undo,redo,|,removeformat,|,pastetext ,|,tablecontrols,|,blockquote,hr,charmap,code",

It worked, but not immediatly. I wanted to add an other button. But now i'm stuck. Flushing cache both in zimbra and browser didn't help.
Neither did restarting zimbra.

I can see optSignatures_tag.class et optSignatures_tag.java have been generated with the good settings, but my modification don't appear.

There must be some cache, but tried everything and nothing worked. At least, i have my html code editor working, but i wanted to share my trick, but it doesn't seem to work always.

Any idea how zimbra is working under the hood (none of the doc i saw about jetty and zimbra helped) ?

Cheers,
Eric

Custom authentication, for freeRADIUS

$
0
0
Hello,

I am a newbie with Zimbra. I am doing an internship in a company X. I have my Zimbra server running and everything works.

But now the company asked me to authenticate my users with their freeRADIUS2. So I started searching before posting of course and found that I have to create a custom authentication. Which I found here. So I started following what I was reading on that page. I have read the ZimbraServer/docs/extensions.txt too. But even by reading all this and searching on this forum for more information I couldn't find any that could help me in what I have to do.

I don't how to proceed to make the connection to our freeRADIUS2 server which has a MySQL database with all the users. My job is that Zimbra uses freeRADIUS2 for authenticating the users.
I started already by creating the handler for the custom authentication. But I have no clue now what I should program to make the connection with the freeRADIUS2.

I will show what I already have:

Code:

package lu.restena.zimbra;

import com.zimbra.common.util.ZimbraLog;
import com.zimbra.cs.account.Account;
import com.zimbra.cs.extension.ZimbraExtension;
import com.zimbra.cs.account.auth.ZimbraCustomAuth;
import com.zimbra.cs.extension.ExtensionException;
import com.zimbra.cs.extension.ExtensionDispatcherServlet;
import java.util.List;
import java.util.Map;

/**
 *
 * @author David Intern
 */
public class RestenaAuthenticator extends ZimbraCustomAuth implements ZimbraExtension {
 
    /**
    * @param acnt
    * @param string
    * @param map
    * @param list
    * @throws Exception
    */
    @Override
    public void authenticate(Account acnt, String string, Map<String, Object> map, List<String> list) throws Exception {
        //ZimbraLog.account.info("user = "+acnt.getName()+", pass = "+string);
         
        // returning indicating the auth has succeeded
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
   
   
    /**
    *
    * @return
    */
    @Override
    public String getName() {
        return "RestenaAuthExtension";
    }

    /**
    * Initializes the extension. Called when the extension is loaded.
    * @throws ExtensionException
    * @throws com.zimbra.common.service.ServiceException
    */
    @Override
    public void init() throws ExtensionException, com.zimbra.common.service.ServiceException {   
        ZimbraCustomAuth.register("freeRadius", new RestenaAuthenticator());
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    /**
    * Terminates the extension.
    *
    */
    @Override
    public void destroy() {
        ExtensionDispatcherServlet.unregister(this);
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}

If understand correct I have to write in:
Code:

public void init() throws ExtensionException, com.zimbra.common.service.ServiceException
The configuration of the freeRADIUS2?

Maybe someone here could help me out a bit, so that I know where I should start. Or give an example, that would be very kind. Or if this is even possible to do.
I am not familiar with all this at the moment as I am learning. If you need more information, I am gladly to give more information if needed.

Thanks in advance.

Rescheduling via REST -- what METHOD?

$
0
0
I am trying to get my zimbra server to reschedule an appointment via REST.
Code:

curl -v -u us@er.pro:123456 --upload-file file.ics http://er.pro/service/home/us@er.pro/Cal1?fmt=ics
It is relatively straight forward, file.ics is updated with new date of the VEVENT maintaining the UID, incrementing the SEQUENCE and updating the DTSTAMP. I post the ics with curl and the appointment is updated. Easy-peasy.

Now if I had attendees (required participants) to this event then they need to be notified of this change. I.e. new invites need to be sent out to them. On the smartclient the ModifyAppointmentRequest SOAP call does that, but with my REST call this notification is not happening. The event is only updated in the organiser's calendar but not in the attendees' calendars.

I have read RFC 2446 - iCalendar Transport-Independent Interoperability Protocol (iTIP) Scheduling Events, BusyTime, To-dos and Journal Entries but it is still not clear what method should be used in my ics. A REQUEST is the obvious choice as per 3.2.2.1 but my understanding is that it is for the communication between the servers. What method would the organizer's client use when talking to the server?

Reply to an appointment invitation

$
0
0
I am using ZCS 8.0, use soap api for our application. Need to get the reply from an invitee for an appointment - I am calling GetAppointment SOAP Command and able to get the accept/reject/tentative kind of response back but I am unable to retrieve the reply message as sent by the invitee. Please let me know which command or soap message I need to use to get that information.
Thanks for the help.

Strange git repo

$
0
0
Hi folks,


while pulling the source via git, I've noticed the history (branch: ironmaiden-foss)
completely changed, compared to last pull from Feb. 6th - the branches diverged
on 3098 (!!!) commits.

And when picking the corresponding commit from new branch which matches
timestamp and message of the old head from my last pull, the trees also differ.

What are you folks doing ?!

By the way: why aren't there any tags for the existing releases ?

I hope you are aware that such things aren't actually helpful for getting any
contributions ... ;-o


cu

Java program to connect mysql using socket=/opt/zimbra/db/mysql.sock

$
0
0
Hello All,

I have fetched my mail from gmail account to local zimbra machine and which is stored in mysql database, which run mysql on 7306 port and /opt/zimbra/db/mysql.sock.

Now, I would like to access all those record via java program.

I have used Spring with Java program using zimbra java version 1.7.0_07-b10

Here is configuration in xml file ..
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://172.18.100.117:7306/mboxgroup8?socket=/opt/zimbra/db/mysql.sock"/>
<property name="username" value="zimbra"/>
<property name="password" value="Zy"/>
<property name="maxActive" value="10"/>
<property name="maxIdle" value="5"/>
<property name="maxWait" value="60000"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="60"/>
<property name="logAbandoned" value="true"/>
<property name="validationQuery" value="Select 1"/>
<property name="testOnBorrow" value="true"/>
<property name="testWhileIdle" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="10000"/>
<property name="minEvictableIdleTimeMillis" value="60000"/>
</bean>

When I tried to connect via program, it gives me below error...

getMails- 59- Exception in getMails at Manager:org.springframework.jdbc.CannotGetJdbcConn ectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
at org.springframework.jdbc.datasource.DataSourceUtil s.getConnection(DataSourceUtils.java:82)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapClientTemplate.java:182)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.executeWithListResult(SqlMapClientTemplate.java: 219)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.queryForList(SqlMapClientTemplate.java:266)
at com.cashEmail.core.dao.MailItemDAOImpl.selectByExa mpleWithBLOBs(MailItemDAOImpl.java:86)
at com.cashEmail.manager.CashManager.getMails(CashMan ager.java:48)
at com.cashEmail.core.service.CashService.getCashEmai l(CashService.java:77)
at com.cashEmail.resource.CashResource.getEmails(Cash Resource.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
---

Please help me out, how can I connect my java program to zimbra MySQL database to retrieve data from mail_item table.

--
Chandrakant Solanki

Modifyng tinymce to enable html code editing in signature

$
0
0
Hi,

I'm using zimbra 8.0.6 OSS

I needed to enable html code editing in signature (tinymce)

I changed the following file :
/opt/zimbra/jetty-distribution-7.6.12.v20130726/webapps/zimbra/WEB-INF/tags/options/optSignatures.tag

added code here :
theme_advanced_buttons2 : "formatselect,undo,redo,|,removeformat,|,pastetext ,|,tablecontrols,|,blockquote,hr,charmap,code",

It worked, but not immediatly. I wanted to add an other button. But now i'm stuck. Flushing cache both in zimbra and browser didn't help.
Neither did restarting zimbra.

I can see optSignatures_tag.class et optSignatures_tag.java have been generated with the good settings, but my modification don't appear.

There must be some cache, but tried everything and nothing worked. At least, i have my html code editor working, but i wanted to share my trick, but it doesn't seem to work always.

Any idea how zimbra is working under the hood (none of the doc i saw about jetty and zimbra helped) ?

Cheers,
Eric

Custom authentication, for freeRADIUS

$
0
0
Hello,

I am a newbie with Zimbra. I am doing an internship in a company X. I have my Zimbra server running and everything works.

But now the company asked me to authenticate my users with their freeRADIUS2. So I started searching before posting of course and found that I have to create a custom authentication. Which I found here. So I started following what I was reading on that page. I have read the ZimbraServer/docs/extensions.txt too. But even by reading all this and searching on this forum for more information I couldn't find any that could help me in what I have to do.

I don't how to proceed to make the connection to our freeRADIUS2 server which has a MySQL database with all the users. My job is that Zimbra uses freeRADIUS2 for authenticating the users.
I started already by creating the handler for the custom authentication. But I have no clue now what I should program to make the connection with the freeRADIUS2.

I will show what I already have:

Code:

package lu.restena.zimbra;

import com.zimbra.common.util.ZimbraLog;
import com.zimbra.cs.account.Account;
import com.zimbra.cs.extension.ZimbraExtension;
import com.zimbra.cs.account.auth.ZimbraCustomAuth;
import com.zimbra.cs.extension.ExtensionException;
import com.zimbra.cs.extension.ExtensionDispatcherServlet;
import java.util.List;
import java.util.Map;

/**
 *
 * @author David Intern
 */
public class RestenaAuthenticator extends ZimbraCustomAuth implements ZimbraExtension {
 
    /**
    * @param acnt
    * @param string
    * @param map
    * @param list
    * @throws Exception
    */
    @Override
    public void authenticate(Account acnt, String string, Map<String, Object> map, List<String> list) throws Exception {
        //ZimbraLog.account.info("user = "+acnt.getName()+", pass = "+string);
         
        // returning indicating the auth has succeeded
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
   
   
    /**
    *
    * @return
    */
    @Override
    public String getName() {
        return "RestenaAuthExtension";
    }

    /**
    * Initializes the extension. Called when the extension is loaded.
    * @throws ExtensionException
    * @throws com.zimbra.common.service.ServiceException
    */
    @Override
    public void init() throws ExtensionException, com.zimbra.common.service.ServiceException {   
        ZimbraCustomAuth.register("freeRadius", new RestenaAuthenticator());
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    /**
    * Terminates the extension.
    *
    */
    @Override
    public void destroy() {
        ExtensionDispatcherServlet.unregister(this);
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}

If understand correct I have to write in:
Code:

public void init() throws ExtensionException, com.zimbra.common.service.ServiceException
The configuration of the freeRADIUS2?

Maybe someone here could help me out a bit, so that I know where I should start. Or give an example, that would be very kind. Or if this is even possible to do.
I am not familiar with all this at the moment as I am learning. If you need more information, I am gladly to give more information if needed.

Thanks in advance.

Rescheduling via REST -- what METHOD?

$
0
0
I am trying to get my zimbra server to reschedule an appointment via REST.
Code:

curl -v -u us@er.pro:123456 --upload-file file.ics http://er.pro/service/home/us@er.pro/Cal1?fmt=ics
It is relatively straight forward, file.ics is updated with new date of the VEVENT maintaining the UID, incrementing the SEQUENCE and updating the DTSTAMP. I post the ics with curl and the appointment is updated. Easy-peasy.

Now if I had attendees (required participants) to this event then they need to be notified of this change. I.e. new invites need to be sent out to them. On the smartclient the ModifyAppointmentRequest SOAP call does that, but with my REST call this notification is not happening. The event is only updated in the organiser's calendar but not in the attendees' calendars.

I have read RFC 2446 - iCalendar Transport-Independent Interoperability Protocol (iTIP) Scheduling Events, BusyTime, To-dos and Journal Entries but it is still not clear what method should be used in my ics. A REQUEST is the obvious choice as per 3.2.2.1 but my understanding is that it is for the communication between the servers. What method would the organizer's client use when talking to the server?

Reply to an appointment invitation

$
0
0
I am using ZCS 8.0, use soap api for our application. Need to get the reply from an invitee for an appointment - I am calling GetAppointment SOAP Command and able to get the accept/reject/tentative kind of response back but I am unable to retrieve the reply message as sent by the invitee. Please let me know which command or soap message I need to use to get that information.
Thanks for the help.

Strange git repo

$
0
0
Hi folks,


while pulling the source via git, I've noticed the history (branch: ironmaiden-foss)
completely changed, compared to last pull from Feb. 6th - the branches diverged
on 3098 (!!!) commits.

And when picking the corresponding commit from new branch which matches
timestamp and message of the old head from my last pull, the trees also differ.

What are you folks doing ?!

By the way: why aren't there any tags for the existing releases ?

I hope you are aware that such things aren't actually helpful for getting any
contributions ... ;-o


cu

Java program to connect mysql using socket=/opt/zimbra/db/mysql.sock

$
0
0
Hello All,

I have fetched my mail from gmail account to local zimbra machine and which is stored in mysql database, which run mysql on 7306 port and /opt/zimbra/db/mysql.sock.

Now, I would like to access all those record via java program.

I have used Spring with Java program using zimbra java version 1.7.0_07-b10

Here is configuration in xml file ..
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://172.18.100.117:7306/mboxgroup8?socket=/opt/zimbra/db/mysql.sock"/>
<property name="username" value="zimbra"/>
<property name="password" value="Zy"/>
<property name="maxActive" value="10"/>
<property name="maxIdle" value="5"/>
<property name="maxWait" value="60000"/>
<property name="removeAbandoned" value="true"/>
<property name="removeAbandonedTimeout" value="60"/>
<property name="logAbandoned" value="true"/>
<property name="validationQuery" value="Select 1"/>
<property name="testOnBorrow" value="true"/>
<property name="testWhileIdle" value="true"/>
<property name="timeBetweenEvictionRunsMillis" value="10000"/>
<property name="minEvictableIdleTimeMillis" value="60000"/>
</bean>

When I tried to connect via program, it gives me below error...

getMails- 59- Exception in getMails at Manager:org.springframework.jdbc.CannotGetJdbcConn ectionException: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
org.springframework.jdbc.CannotGetJdbcConnectionEx ception: Could not get JDBC Connection; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
at org.springframework.jdbc.datasource.DataSourceUtil s.getConnection(DataSourceUtils.java:82)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.execute(SqlMapClientTemplate.java:182)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.executeWithListResult(SqlMapClientTemplate.java: 219)
at org.springframework.orm.ibatis.SqlMapClientTemplat e.queryForList(SqlMapClientTemplate.java:266)
at com.cashEmail.core.dao.MailItemDAOImpl.selectByExa mpleWithBLOBs(MailItemDAOImpl.java:86)
at com.cashEmail.manager.CashManager.getMails(CashMan ager.java:48)
at com.cashEmail.core.service.CashService.getCashEmai l(CashService.java:77)
at com.cashEmail.resource.CashResource.getEmails(Cash Resource.java:55)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:43)
---

Please help me out, how can I connect my java program to zimbra MySQL database to retrieve data from mail_item table.

--
Chandrakant Solanki

Modifyng tinymce to enable html code editing in signature

$
0
0
Hi,

I'm using zimbra 8.0.6 OSS

I needed to enable html code editing in signature (tinymce)

I changed the following file :
/opt/zimbra/jetty-distribution-7.6.12.v20130726/webapps/zimbra/WEB-INF/tags/options/optSignatures.tag

added code here :
theme_advanced_buttons2 : "formatselect,undo,redo,|,removeformat,|,pastetext ,|,tablecontrols,|,blockquote,hr,charmap,code",

It worked, but not immediatly. I wanted to add an other button. But now i'm stuck. Flushing cache both in zimbra and browser didn't help.
Neither did restarting zimbra.

I can see optSignatures_tag.class et optSignatures_tag.java have been generated with the good settings, but my modification don't appear.

There must be some cache, but tried everything and nothing worked. At least, i have my html code editor working, but i wanted to share my trick, but it doesn't seem to work always.

Any idea how zimbra is working under the hood (none of the doc i saw about jetty and zimbra helped) ?

Cheers,
Eric

Custom authentication, for freeRADIUS

$
0
0
Hello,

I am a newbie with Zimbra. I am doing an internship in a company X. I have my Zimbra server running and everything works.

But now the company asked me to authenticate my users with their freeRADIUS2. So I started searching before posting of course and found that I have to create a custom authentication. Which I found here. So I started following what I was reading on that page. I have read the ZimbraServer/docs/extensions.txt too. But even by reading all this and searching on this forum for more information I couldn't find any that could help me in what I have to do.

I don't how to proceed to make the connection to our freeRADIUS2 server which has a MySQL database with all the users. My job is that Zimbra uses freeRADIUS2 for authenticating the users.
I started already by creating the handler for the custom authentication. But I have no clue now what I should program to make the connection with the freeRADIUS2.

I will show what I already have:

Code:

package lu.restena.zimbra;

import com.zimbra.common.util.ZimbraLog;
import com.zimbra.cs.account.Account;
import com.zimbra.cs.extension.ZimbraExtension;
import com.zimbra.cs.account.auth.ZimbraCustomAuth;
import com.zimbra.cs.extension.ExtensionException;
import com.zimbra.cs.extension.ExtensionDispatcherServlet;
import java.util.List;
import java.util.Map;

/**
 *
 * @author David Intern
 */
public class RestenaAuthenticator extends ZimbraCustomAuth implements ZimbraExtension {
 
    /**
    * @param acnt
    * @param string
    * @param map
    * @param list
    * @throws Exception
    */
    @Override
    public void authenticate(Account acnt, String string, Map<String, Object> map, List<String> list) throws Exception {
        //ZimbraLog.account.info("user = "+acnt.getName()+", pass = "+string);
         
        // returning indicating the auth has succeeded
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
   
   
    /**
    *
    * @return
    */
    @Override
    public String getName() {
        return "RestenaAuthExtension";
    }

    /**
    * Initializes the extension. Called when the extension is loaded.
    * @throws ExtensionException
    * @throws com.zimbra.common.service.ServiceException
    */
    @Override
    public void init() throws ExtensionException, com.zimbra.common.service.ServiceException {   
        ZimbraCustomAuth.register("freeRadius", new RestenaAuthenticator());
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }

    /**
    * Terminates the extension.
    *
    */
    @Override
    public void destroy() {
        ExtensionDispatcherServlet.unregister(this);
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
}

If understand correct I have to write in:
Code:

public void init() throws ExtensionException, com.zimbra.common.service.ServiceException
The configuration of the freeRADIUS2?

Maybe someone here could help me out a bit, so that I know where I should start. Or give an example, that would be very kind. Or if this is even possible to do.
I am not familiar with all this at the moment as I am learning. If you need more information, I am gladly to give more information if needed.

Thanks in advance.

Build Zimbra: ldap_bind: Invalid credentials (49)

$
0
0
Hi there!

I'm trying to build the Zimbra source code from the open source edition on Windows using Eclipse. I'm following this tutorial:

Zimbra Development with Eclipse

But I had some troubles with the SVN code, so I used code from:

https://github.com/Grynn/zimbra-mirror

When I run reset-the-world, I got the following error:

Code:

[exec] ldap_bind: Invalid credentials (49)
And the output looks like this:

Code:

..........
stop-jetty-java:
    [java] java.net.ConnectException: Connection refused: connect
    [java]        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    [java]        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
    [java]        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
    [java]        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
    [java]        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
    [java]        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
    [java]        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
    [java]        at java.net.Socket.connect(Socket.java:579)
    [java]        at java.net.Socket.connect(Socket.java:528)
    [java]        at java.net.Socket.<init>(Socket.java:425)
    [java]        at java.net.Socket.<init>(Socket.java:241)
    [java]        at org.eclipse.jetty.start.Main.stop(Main.java:758)
    [java]        at org.eclipse.jetty.start.Main.stop(Main.java:737)
    [java]        at org.eclipse.jetty.start.Main.start(Main.java:648)
    [java]        at org.eclipse.jetty.start.Main.main(Main.java:103)
    [java] Usage: java -jar start.jar [options] [properties] [configs]
    [java]        java -jar start.jar --help  # for more information
    [java] Java Result: -4
stop-jetty-unix:
stop-jetty:
    [echo] Waiting for jetty to stop
stop-ldap-windows:
    [exec] The service name is invalid.
    [exec] More help is available by typing NET HELPMSG 2185.
    [exec] Result: 2
stop-ldap-unix:
stop-ldap:
stop-servers:
dir-init:
    [echo] If the following deletes fail, wait for your web server
    [echo] to stop (or stop jetty manually)
    [echo] and try again later.
.......
  [delete] Deleting directory C:\opt\zimbra\data
dir-init-jetty:
  [delete] Deleting: C:\opt\zimbra\jetty\webapps\service.war
    ...........
    [mkdir] Created dir: C:\opt\zimbra\zimlets-deployed
make-dirs:
    [echo] Creating dirs under C:\opt\zimbra
    ..............
    [mkdir] Created dir: C:\opt\zimbra\lib\jars
build-init:
  ......
make-dirs:
    [echo] Creating dirs under C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\dist
  ........
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\dist\libexec
generate-buildinfo:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\buildinfo\com\zimbra\cs\util
    [javac] Compiling 1 source file to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\classes
compile:
compile-dependencies:
compile:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraCommon\build\classes
    [javac] Compiling 256 source files to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraCommon\build\classes
    [javac] C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraCommon\src\java\com\zimbra\common\net\CustomHostnameVerifier.java:19: warning: HostnameChecker is internal proprietary API and may be removed in a future release
  ........
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 4 warnings
jar:
generate-jar-version:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraCommon\build\buildinfo\com\zimbra\buildinfo
    [javac] Compiling 1 source file to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraCommon\build\classes
zimbra-jar:
      [jar] Building jar: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraCommon\build\zimbracommon.jar
build-init:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraSoap\build\classes
compile:
compile:
jar:
generate-jar-version:
zimbra-jar:
    [javac] Compiling 1787 source files to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraSoap\build\classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
check-schema-done:
generate-schema:
..............
........
[schemagen] Note: Recompile with -Xlint:deprecation for details.
wsdl-file:
jar:
generate-jar-version:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraSoap\build\buildinfo\com\zimbra\buildinfo
    [javac] Compiling 1 source file to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraSoap\build\classes
zimbra-jar:
      [jar] Building jar: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraSoap\build\zimbrasoap.jar
compile:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraClient\build\classes
    [javac] Compiling 101 source files to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraClient\build\classes
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraClient\src\java\com\zimbra\client\ZMailbox.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
jar:
generate-jar-version:
  ........
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 12 warnings
mysql-versions-init:
sqlite-versions-init:
db-versions-init:
jar:
generate-jar-version:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\buildinfo\com\zimbra\buildinfo
    [javac] Compiling 1 source file to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\classes
zimbra-jar:
      [jar] Building jar: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\zimbrastore.jar
war:
      [war] Building war: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\service.war
dev-dist-unix:
dev-dist-jetty:
    .....
choose-db-schema:
    [echo] Using database schema in src/db/mysql
generate-ldap-config:
    [mkdir] Created dir: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\attrs
..........
    [java] [] ERROR: fillTemplate(): could not find key 'ACCOUNT_DISPLAY_NAME'
    [java] [] ERROR: fillTemplate(): could not find key 'ACCOUNT_ADDRESS'
    [java] [] ERROR: fillTemplate(): could not find key 'ACCOUNT_DISPLAY_NAME'
    [java] [] ERROR: fillTemplate(): could not find key 'ACCOUNT_ADDRESS'
    [java] [] ERROR: fillTemplate(): could not find key 'zimbra.server.hostname'
    [copy] Copying 1 file to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\ldap-config
    ............
dev-dist:
    [echo] Version: 9.0.0_BETA1_1111 Date: 20140422-1133
    .........
mysql-versions-init:
sqlite-versions-init:
db-versions-init:
    [copy] Copying 5 files to C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\dist\db
localhost-ssl-cert:
  [genkey] Generating Key for jetty
  [genkey] Generating Key for jetty-dsa
init-opt-zimbra:
    [copy] Copying 450 files to C:\opt\zimbra
mysql-init:
      [sql] Executing resource: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\src\db\mysql\dropdb.sql
      [sql] 201 of 201 SQL statements executed successfully
      [sql] Executing resource: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\src\db\mysql\db.sql
      [sql] 29 of 29 SQL statements executed successfully
      [sql] Executing resource: C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\versions-init.sql
      [sql] 3 of 3 SQL statements executed successfully
sqlite-init:
db-init:
start-ldap-windows:
    [exec] The service name is invalid.
    [exec] More help is available by typing NET HELPMSG 2185.
    [exec] Result: 2
start-ldap-unix:
start-ldap:
ldap-load:
ldap-add:
    [echo] Loading C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build\dist/openldap/etc/zimbra.ldif
    [exec] ldap_bind: Invalid credentials (49)

BUILD FAILED
C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build.xml:1183: The following error occurred while executing this line:
C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build.xml:1505: The following error occurred while executing this line:
C:\Users\______\workspaceEclipse\ZimbraSRC\zimbra-mirror-master\ZimbraServer\build.xml:1484: exec returned: 49

Total time: 8 minutes 6 seconds

As I see, it's a configuration problem with the openDLAP on Windows.
I'm using windows 7, 64 bits, Java 1.7

Any suggestions to solve this problem?

Thanks in advance!

problem: adding my own taglib

$
0
0
hello,
I am trying to change the calendar to jalali in Standard(HTML) version of zimbra 8.
what I have done til now is as follows:
1. I have added a java class to /WEB_INF/classes/com/zimbra/kabuki/tools/jalali
jalali is a subdirectory which i have created under tools dir
here is the source code of JalaliCalendar.java :

https://github.com/amirmehdizadeh/JalaliCalendar

then compiled this code to .class :javac JalaliCalendar.java and the result was 2 files:
JalaliCalendar.class & JalaliCalendar$YearMonthDate.class

2.add a new .tld file named jTld.tld to /opt/zimbra/jetty/webapps/zimbra/WEB-INF/tlds :

<?xml version="1.0" encoding="UTF-8" ?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
version="2.0">

<description>A tag library exercising SimpleTag handlers.</description>
<tlib-version>1.0</tlib-version>

<short-name>jtld</short-name>
<uri>https://192.168.0.89/jTld</uri>
<function>
<name>gregorianToJalali</name>
<function-class>com.samanpr.jalalicalendar.JalaliCalendar</function-class>
<function-signature>YearMonthDate gregorianToJalali(YearMonthDate gregorian)</function-signature>
</function>
</taglib>


note: the web address of my zimbra is https://192.168.0.89/

3. add a line to /opt/zimbra/jetty/webapps/zimbra/h/calendar as follows;
<%@taglib uri="https://192.168.0.89/jTld" prefix="mt" %>

i thought that this way it would be possible to call gregorianToJalali function inside /h/calender like:
${mt:gregorianToJalali('20140428')} but I can not call gregorianToJalali function.


can anybody help me as soon as possible please??????????

wsdl files change between version 8.0.6 - 8.0.7

$
0
0
hi

we did some soap programming and noticed during the upgrade from 8.0.6 to 8.0.7 a change in the wsdl files,
but I did not see any announcement of this change.

name="params" -> name="parameters"

is there any information on the updates of the sope interface? are there code breaking changes in minor "+0.0.1" releases?
Viewing all 286 articles
Browse latest View live