You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Rajender Vallapureddy <ra...@hnexus.com> on 2013/03/21 16:51:26 UTC

reading custom header from smime message

Hi Eric,

I have enabled ssl for my james server.

I am sending a customer header called as Client-Type from my webmail
client to distinguish whether the user is using the webmail client or
something like microsoft outlook.

I have written my custom mailet which is working fine and can get
value for Client-Type header for normal message(IMF). This is failing
when the message comes in as SMIME. How can I read this customer
header from the SMIME message?

Appreciate your help.

Thank you,
Regards,
Rajender

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: reading custom header from smime message

Posted by Eric Charles <er...@apache.org>.
Hi Rajender,

The SMIMEDecrypt is located in the apache-mailet-crypto project.
You can add that specific jar in the conf/lib folder of your running 
instance, at least if you run with latest snapshots, we had a bug with 
previous release. If you want to add the jar to a release, you will have 
to hack the properties files.

Thx, Eric


[1] 
https://svn.apache.org/repos/asf/james/mailet/trunk/crypto/src/main/java/org/apache/james/transport/mailet/SMIMEDecrypt.java

On 24/03/2013 11:37, Rajender Vallapureddy wrote:
> Hi Eric,
> Thank you for your reply. My james is running on ssl ports. I want to check
> whether my clients are sending mails from my web client or using another
> client like outlook or thunderbird. I do have access to private key. It
> seems like SMIMEDecrypt is only in 2.3 version?
>
> Appreciate your help.
>
> Thank you,
>
> Regards,
> Rajender
> On Mar 24, 2013 4:34 PM, "Eric Charles" <er...@apache.org> wrote:
>
>> On 24/03/2013 10:06, Eric Charles wrote:
>>
>>> there is no way for the mailet to read it (unless the mailet has acess
>>> to the recipient certificate, but you don't want this I guess).
>>>
>>>
>> I meant the recipient private key in order to decrypt it.
>> I assume that the s/mime is encrypted...
>>
>> If it is not encrypted, you should have access to the header and body.
>> Maybe some clever part decoding is needed (not sure)...
>>
>> Thx, Eric
>>
>>   Thx, Eric
>>>
>>> On 21/03/2013 15:51, Rajender Vallapureddy wrote:
>>>
>>>> Hi Eric,
>>>>
>>>> I have enabled ssl for my james server.
>>>>
>>>> I am sending a customer header called as Client-Type from my webmail
>>>> client to distinguish whether the user is using the webmail client or
>>>> something like microsoft outlook.
>>>>
>>>> I have written my custom mailet which is working fine and can get
>>>> value for Client-Type header for normal message(IMF). This is failing
>>>> when the message comes in as SMIME. How can I read this customer
>>>> header from the SMIME message?
>>>>
>>>> Appreciate your help.
>>>>
>>>> Thank you,
>>>> Regards,
>>>> Rajender
>>>>
>>>> ------------------------------**------------------------------**
>>>> ---------
>>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<se...@james.apache.org>
>>>> For additional commands, e-mail: server-dev-help@james.apache.**org<se...@james.apache.org>
>>>>
>>>>
>>> ------------------------------**------------------------------**---------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<se...@james.apache.org>
>>> For additional commands, e-mail: server-dev-help@james.apache.**org<se...@james.apache.org>
>>>
>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<se...@james.apache.org>
>> For additional commands, e-mail: server-dev-help@james.apache.**org<se...@james.apache.org>
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: reading custom header from smime message

Posted by Rajender Vallapureddy <ra...@hnexus.com>.
Hi Eric,
Thank you for your reply. My james is running on ssl ports. I want to check
whether my clients are sending mails from my web client or using another
client like outlook or thunderbird. I do have access to private key. It
seems like SMIMEDecrypt is only in 2.3 version?

Appreciate your help.

Thank you,

Regards,
Rajender
On Mar 24, 2013 4:34 PM, "Eric Charles" <er...@apache.org> wrote:

> On 24/03/2013 10:06, Eric Charles wrote:
>
>> there is no way for the mailet to read it (unless the mailet has acess
>> to the recipient certificate, but you don't want this I guess).
>>
>>
> I meant the recipient private key in order to decrypt it.
> I assume that the s/mime is encrypted...
>
> If it is not encrypted, you should have access to the header and body.
> Maybe some clever part decoding is needed (not sure)...
>
> Thx, Eric
>
>  Thx, Eric
>>
>> On 21/03/2013 15:51, Rajender Vallapureddy wrote:
>>
>>> Hi Eric,
>>>
>>> I have enabled ssl for my james server.
>>>
>>> I am sending a customer header called as Client-Type from my webmail
>>> client to distinguish whether the user is using the webmail client or
>>> something like microsoft outlook.
>>>
>>> I have written my custom mailet which is working fine and can get
>>> value for Client-Type header for normal message(IMF). This is failing
>>> when the message comes in as SMIME. How can I read this customer
>>> header from the SMIME message?
>>>
>>> Appreciate your help.
>>>
>>> Thank you,
>>> Regards,
>>> Rajender
>>>
>>> ------------------------------**------------------------------**
>>> ---------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<se...@james.apache.org>
>>> For additional commands, e-mail: server-dev-help@james.apache.**org<se...@james.apache.org>
>>>
>>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<se...@james.apache.org>
>> For additional commands, e-mail: server-dev-help@james.apache.**org<se...@james.apache.org>
>>
>>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<se...@james.apache.org>
> For additional commands, e-mail: server-dev-help@james.apache.**org<se...@james.apache.org>
>
>

Re: reading custom header from smime message

Posted by Eric Charles <er...@apache.org>.
On 24/03/2013 10:06, Eric Charles wrote:
> there is no way for the mailet to read it (unless the mailet has acess
> to the recipient certificate, but you don't want this I guess).
>

I meant the recipient private key in order to decrypt it.
I assume that the s/mime is encrypted...

If it is not encrypted, you should have access to the header and body.
Maybe some clever part decoding is needed (not sure)...

Thx, Eric

> Thx, Eric
>
> On 21/03/2013 15:51, Rajender Vallapureddy wrote:
>> Hi Eric,
>>
>> I have enabled ssl for my james server.
>>
>> I am sending a customer header called as Client-Type from my webmail
>> client to distinguish whether the user is using the webmail client or
>> something like microsoft outlook.
>>
>> I have written my custom mailet which is working fine and can get
>> value for Client-Type header for normal message(IMF). This is failing
>> when the message comes in as SMIME. How can I read this customer
>> header from the SMIME message?
>>
>> Appreciate your help.
>>
>> Thank you,
>> Regards,
>> Rajender
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-dev-help@james.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: reading custom header from smime message

Posted by Eric Charles <er...@apache.org>.
Hi,

If the header is in the smime message (see 
http://www.ietf.org/rfc/rfc3851.txt), and is not a regular mail header, 
there is no way for the mailet to read it (unless the mailet has acess 
to the recipient certificate, but you don't want this I guess).

Thx, Eric

On 21/03/2013 15:51, Rajender Vallapureddy wrote:
> Hi Eric,
>
> I have enabled ssl for my james server.
>
> I am sending a customer header called as Client-Type from my webmail
> client to distinguish whether the user is using the webmail client or
> something like microsoft outlook.
>
> I have written my custom mailet which is working fine and can get
> value for Client-Type header for normal message(IMF). This is failing
> when the message comes in as SMIME. How can I read this customer
> header from the SMIME message?
>
> Appreciate your help.
>
> Thank you,
> Regards,
> Rajender
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org