james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Merve Temizer <mervet2...@gmail.com>
Subject Re: Custom Mailet: Getting MimeMessage of Mail
Date Fri, 12 Oct 2012 13:51:13 GMT
Here is a part of mailet conf.

When i put my mailet in place [1] Mail.MimeMessage headers comes as set.

But content is still null.

Should i add some mailet that sets content into MimeMessage?

Because i found out SetMimeHeader sets the headers before place [1].


 <processor state="transport" enableJmx="true">


      <mailet match="SMTPAuthSuccessful" class="SetMimeHeader">
        <name>X-UserIsAuth</name>
        <value>true</value>
      </mailet>

======================[1]=================

      <mailet match="All" class="RecipientRewriteTable">

<recipientrewritetable>DefaultRecipientRewriteTable</recipientrewritetable>
      </mailet>
      <!-- Disable this if you want to have case-sensitive local-parts of
the recipients -->
      <mailet match="RecipientIsLocal" class="RecipientToLowerCase"/>

      <mailet match="RecipientIsLocal" class="LocalDelivery"/>
      <mailet match="HostIsLocal" class="ToProcessor">
        <processor>local-address-error</processor>
        <notice>550 - Requested action not taken: no such user here</notice>
      </mailet>

      <mailet match="All" class="RemoteDelivery">
        <outgoingQueue>outgoing</outgoingQueue>
        <delayTime>5 minutes</delayTime>
        <delayTime>10 minutes</delayTime>
        <delayTime>45 minutes</delayTime>
        <delayTime>2 hours</delayTime>
        <delayTime>3 hours</delayTime>
        <delayTime>6 hours</delayTime>
        <maxRetries>25</maxRetries>
        <maxDnsProblemRetries>0</maxDnsProblemRetries>
        <deliveryThreads>10</deliveryThreads>
        <sendpartial>true</sendpartial>
        <bounceProcessor>bounces</bounceProcessor>
      </mailet>
    </processor>




2012/10/12 Merve Temizer <mervet2009@gmail.com>

> Thanks.
>
> Yes getrecipients() is also null.
>
> This is beginning of mailetcontainer.conf
>
>
> <mailetcontainer enableJmx="true">
>
> <mailet  class="ToRepository">
> <repositoryPath>file://var/mail/infected/</repositoryPath>
> </mailet>
>
>
> ToRepository is in a project: james-server-mailet.
>
> Its init() is called on startup of debugging but its service() method is
> not called.
>
> Am i wrong on expecting ToRepository.service() to run?
>
>
>
> 2012/10/12 Eric Charles <eric.charles@u-mangate.com>
>
>> Not sure what's going on.
>>
>> Is  mail.getRecipients() also null?
>> What if you put your breakpoint in another mailet (one provided in the
>> normal container flow)?
>>
>> Thx, Eric
>>
>>
>>
>> On 12/10/2012 10:13, Merve Temizer wrote:
>>
>>> Also every field in message is null, all the headers are empty.
>>>
>>> 2012/10/12 Merve Temizer <mervet2009@gmail.com>
>>>
>>>  I sent mail through Thunderbird
>>>>
>>>> i saw in debug environment my mailet has run, look at the variable at
>>>> breakpoint in Eclipse, org.apache.mailet.Mail.**getmessage().getcontent
>>>> is
>>>> still null.
>>>>
>>>> Thanks for advice.
>>>>
>>>>
>>>> 2012/10/11 Merve Temizer <mervet2009@gmail.com>
>>>>
>>>>  i am going to try with mail client and send you feed back.
>>>>> thanks for attention
>>>>>
>>>>>
>>>>> 2012/10/11 Merve Temizer <mervet2009@gmail.com>
>>>>>
>>>>>  I am sending mail with
>>>>>>
>>>>>>
>>>>>> $telnet localhost 1025(1025 is port that i set to james)
>>>>>>
>>>>>> mail from:<user2@localhost>
>>>>>> rcpt to:<user2@localhost>
>>>>>>
>>>>>> data
>>>>>> mycontent
>>>>>> .
>>>>>>
>>>>>> i can see mail and its content in folder that i specified for mail
>>>>>> recording.
>>>>>>
>>>>>> 1025 because i changed it, it is not the pr
>>>>>>
>>>>>>
>>>>>> 2012/10/11 Eric Charles <eric.charles@u-mangate.com>
>>>>>>
>>>>>>  Is the content null if you send via regular mail client?
>>>>>>>
>>>>>>> Which telnet commands do you issue?
>>>>>>>
>>>>>>> Thx, Eric
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 10/10/2012 16:58, Merve Temizer wrote:
>>>>>>>
>>>>>>>  Hello,
>>>>>>>>
>>>>>>>> I have a custom mailet, i see it runs on debug environment.
>>>>>>>>
>>>>>>>> in service(org.apache.mailet.Mail mail)
>>>>>>>>
>>>>>>>> mail.getMessage().getContent is null.
>>>>>>>>
>>>>>>>> I am sending a mail using telnet smtp connection.
>>>>>>>>
>>>>>>>> I think i am doing sth wrong, can you advice sth to specify
the
>>>>>>>> problem.
>>>>>>>>
>>>>>>>> Thanks.
>>>>>>>>
>>>>>>>>
>>>>>>>>  --
>>>>>>> @echarles
>>>>>>>
>>>>>>> ------------------------------****----------------------------**--**
>>>>>>> ---------
>>>>>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.****apache.org<
>>>>>>> server-dev-**unsubscribe@james.apache.org<server-dev-unsubscribe@james.apache.org>
>>>>>>> >
>>>>>>> For additional commands, e-mail: server-dev-help@james.apache.***
>>>>>>> *org<server-dev-help@james.**apache.org<server-dev-help@james.apache.org>
>>>>>>> >
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>> --
>> @echarles
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: server-dev-unsubscribe@james.**apache.org<server-dev-unsubscribe@james.apache.org>
>> For additional commands, e-mail: server-dev-help@james.apache.**org<server-dev-help@james.apache.org>
>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message