You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Ahsan <ah...@gmail.com> on 2006/11/01 02:47:25 UTC

Re: prob with writing a simple mailet

i have created the following mailet and matcher files and the edited config
file lines are given below.
my JAMES is no longer running, it crashes :(
******************************************************************************************************************
  <mailetpackages>
         <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
   <mailetpackage>serveravailability.mailet</mailetpackage>
      </mailetpackages>
      <matcherpackages>
         <matcherpackage>org.apache.james.transport.matchers
</matcherpackage>
   <matcherpackage> serveravailability.matcher</matcherpackage>
      </matcherpackages>

----

<mailet match="SAMatcher2=all" class="SAMailet2">
  <from>root@localhost.com</from>
  <subject>mail delivery error !</subject>
  <content>Sorry, the email address u sent the mail to, is not valid. Please
have a look again. Thanks.</content>
  </mailet>

******************************************************************************************************************

i have got a deadline, can you please have a look and let me know what i did
wrong ??

Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
Dear Vicenzo and every1 else,

Thanx, it helps a lot, BUT BUT BUT please, can you help me out with my
mailet ??

you see, i need a mailt of my own to show..............

BY THE WAY-- IMP FOR ANY1 NEW--
 the JAMES server will crash for improperly zipped jar files :(( --->> this
was a big mistake of mine :)

thanks a lot and looking forward to hearing from you :)

-
ahsan


On 11/1/06, Ahsan <ah...@gmail.com> wrote:
>
> Dear Vicenzo,
>
> can i know, from where you learnt all about the mailets and matchers and
> their requirements ?? i mean, i would love to know more. currently what i
> know is almost nothing :(
>
> my matcher only returns addresses if their server is unavailable :)
>
> does this add up ?? (you may like to read a few of my previosu mails for
> added info  :)  )
>
> -
> ahsan
>
>
> On 11/1/06, Vincenzo Gianferrari Pini <vi...@praxis.it>
> wrote:
> >
> > If you don't need to pass any parameter to the matcher, simply writing
> > match="SAMatcher2" is ok.
> >
> > If it doesn't work the problem is inside your matcher code. Without
> > seeing it nobody can help you.
> >
> > Moreover, you don't need to write a specific mailet (SAMailet2) to just
> > bounce back a message to the sender. Use instead the supplied Bounce
> > mailet and write:
> >
> >         <mailet match="SAMatcher2" class="Bounce">
> >            <sender>root@localhost.com</sender>
> >            <message> Sorry, the email address you sent the mail to, is
> > not valid. Please have a look again. Thanks. </message>
> >            <passThrough> false</passThrough>
> >         </mailet>
> >
> > Hope it helps.
> >
> > Vincenzo
> >
> >
> > Ahsan wrote:
> > > these config.xml lines also do not work
> > >
> > > <mailet match="SAMatcher2" class="SAMailet2">
> > >  <from>root@localhost.com</from>
> > >  <subject>mail delivery error !</subject>
> > >  <content>Sorry, the email address u sent the mail to, is not valid.
> > > Please
> > > have a look again. Thanks.</content>
> > >  </mailet>
> > >
> > >
> > > On 11/1/06, Ahsan < ahsan.jnl@gmail.com> wrote:
> > >>
> > >> about the mailet and matcher, what i have done is-->>
> > >>
> > >> 1) if the host is not available ( suppose@server-unavailable.com)
> > then
> > >> the
> > >> matcher will return the address
> > >> the mailet will set the mail state to ghost and send a mail to the
> > >> sender.
> > >>
> > >> 2) if the host is available, then the matcher will return null, the
> > >> mailet
> > >> will do nothing and the next mailet/matcher will do their job
> > >>
> > >> thanks
> > >>
> > >> -
> > >> ahsan
> > >>
> > >>
> > >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com> wrote:
> > >> >
> > >> > i have created the following mailet and matcher files and the
> > edited
> > >> > config file lines are given below.
> > >> > my JAMES is no longer running, it crashes :(
> > >> >
> > >> >
> > >>
> > ******************************************************************************************************************
> >
> > >>
> > >> >   <mailetpackages>
> > >> >          <mailetpackage>org.apache.james.transport.mailets
> > >> > </mailetpackage>
> > >> >    <mailetpackage>serveravailability.mailet </mailetpackage>
> > >> >       </mailetpackages>
> > >> >       <matcherpackages>
> > >> >          <matcherpackage>org.apache.james.transport.matchers
> > >> > </matcherpackage>
> > >> >    <matcherpackage> serveravailability.matcher</matcherpackage>
> > >> >       </matcherpackages>
> > >> >
> > >> > ----
> > >> >
> > >> > <mailet match="SAMatcher2=all" class="SAMailet2">
> > >> >   <from>root@localhost.com </from>
> > >> >   <subject>mail delivery error !</subject>
> > >> >   <content>Sorry, the email address u sent the mail to, is not
> > valid.
> > >> > Please have a look again. Thanks.</content>
> > >> >   </mailet>
> > >> >
> > >> >
> > >>
> > ******************************************************************************************************************
> >
> > >>
> > >> >
> > >> > i have got a deadline, can you please have a look and let me know
> > >> what i
> > >> > did wrong ??
> > >> >
> > >> >
> > >>
> > >>
> > >> --
> > >> Md. Ahsanur Rashid,
> > >>
> > >> Level-2, Term-1,
> > >> Department of Computer Science and Engineering (CSE),
> > >> Bangladesh University of Engineering & Technology (BUET),
> > >> Dhaka-1000, Bangladesh.
> > >> Tel - (+88)  01715621323, 01717769404
> > >>
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
> >
> >
>
>
> --
> Md. Ahsanur Rashid,
>
> Level-2, Term-1,
> Department of Computer Science and Engineering (CSE),
> Bangladesh University of Engineering & Technology (BUET),
> Dhaka-1000, Bangladesh.
> Tel - (+88)  01715621323, 01717769404
>



-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
hi, thnx for your kind help

btw, i did see a way to find if a certain host had any mail server or not.
tha would have been better i guess.

i already know ab8 the problems with sending and ICMP package :-s


On 11/2/06, Vincenzo Gianferrari Pini <vi...@praxis.it>
wrote:
>
> Ahsan,
>
> just for didactical purposes, the following should (?) be the minimum
> code needed for your matcher (you need jdk 1.5):
>
> --------------
> package serveravailability.matcher;
>
> import java.io.IOException;
> import org.apache.mailet.GenericRecipientMatcher;
> import org.apache.mailet.MailAddress;
>
> import java.net.InetAddress;
>
> public class SAMatcher2 extends GenericRecipientMatcher {
>
>    public boolean matchRecipient(MailAddress recipient) {
>        try {
>            InetAddress address =
> InetAddress.getByName(recipient.getHost());
>            if (address.isReachable(30000)) {
>            return false;
>            } else {
>                return true;
>            }
>        } catch (IOException ex) {
>            return true;
>        }
>    }
> }
> --------------------
>
> As you see, it extends GenericRecipientMatcher, not GenericMatcher, so
> it will work independently for multiple recipients.
>
> I haven't tested it (and won't test it). Just compiled.
>
> You don't need the mailet. use Bounce as I told you.
>
> Anyway, it does not make sense to ping the domain name of a recipient's
> address, as it would work only if it resolves to the ip of the mail
> server specified in an MX record of the domain itself, and this
> situation may be common only for small domains. Moreover, it is not sure
> that an existing and running mail server does answer to a ping.
> Read what Stefano wrote you some days ago.
>
> Good luck with your assignment.
>
> Vincenzo
>
> Ahsan wrote:
> >
> > Dear Vicenzo,
> > sure I can, thnaks for your help :)
> >
> > -
> > ahsan
> >
> > On 11/2/06, *Vincenzo Gianferrari Pini*
> > <vincenzo.gianferraripini@praxis.it
> > <ma...@praxis.it>> wrote:
> >
> >     Your attached files didn't go through (at least to me). Can you
> >     resend them?
> >
> >     Vincenzo
> >
> >     Ahsan wrote:
> >     > pls find attached my matcher and mailet files, thnaks for your
> help.
> >     >
> >     > i am trying out your suggestion now and will let you know the
> >     results :)
> >     >
> >     > thanks again
> >     >
> >     > -
> >     > ahsan
> >     >
> >     >
> >     > On 11/1/06, *Vincenzo Gianferrari Pini*
> >     > <vincenzo.gianferraripini@praxis.it
> >     <ma...@praxis.it>
> >     > <mailto: vincenzo.gianferraripini@praxis.it
> >     <ma...@praxis.it>>> wrote:
> >     >
> >     >     If you don't need to pass any parameter to the matcher,
> >     simply writing
> >     >     match="SAMatcher2" is ok.
> >     >
> >     >     If it doesn't work the problem is inside your matcher code.
> >     Without
> >     >     seeing it nobody can help you.
> >     >
> >     >     Moreover, you don't need to write a specific mailet
> >     (SAMailet2) to
> >     >     just
> >     >     bounce back a message to the sender. Use instead the
> >     supplied Bounce
> >     >     mailet and write:
> >     >
> >     >             <mailet match="SAMatcher2" class="Bounce">
> >     >                <sender>root@localhost.com
> >     <ma...@localhost.com>
> >     >     <mailto:root@localhost.com <mailto:root@localhost.com
> >></sender>
> >     >                <message> Sorry, the email address you sent the
> mail
> >     >     to, is
> >     >     not valid. Please have a look again. Thanks. </message>
> >     >                <passThrough> false</passThrough>
> >     >             </mailet>
> >     >
> >     >     Hope it helps.
> >     >
> >     >     Vincenzo
> >     >
> >     >
> >     >     Ahsan wrote:
> >     >     > these config.xml lines also do not work
> >     >     >
> >     >     > <mailet match="SAMatcher2" class="SAMailet2">
> >     >     >  <from>root@localhost.com <ma...@localhost.com>
> >     <mailto:root@localhost.com <ma...@localhost.com>></from>
> >     >     >  <subject>mail delivery error !</subject>
> >     >     >  <content>Sorry, the email address u sent the mail to, is
> >     not valid.
> >     >     > Please
> >     >     > have a look again. Thanks.</content>
> >     >     >  </mailet>
> >     >     >
> >     >     >
> >     >     > On 11/1/06, Ahsan < ahsan.jnl@gmail.com
> >     <ma...@gmail.com>
> >     >     <mailto:ahsan.jnl@gmail.com <ma...@gmail.com>>>
> >     wrote:
> >     >     >>
> >     >     >> about the mailet and matcher, what i have done is-->>
> >     >     >>
> >     >     >> 1) if the host is not available (
> >     >     suppose@server-unavailable.com
> >     <ma...@server-unavailable.com>
> >     >     <mailto: suppose@server-unavailable.com
> >     <ma...@server-unavailable.com>>) then
> >     >     >> the
> >     >     >> matcher will return the address
> >     >     >> the mailet will set the mail state to ghost and send a
> >     mail to the
> >     >     >> sender.
> >     >     >>
> >     >     >> 2) if the host is available, then the matcher will return
> >     null,
> >     >     the
> >     >     >> mailet
> >     >     >> will do nothing and the next mailet/matcher will do their
> >     job
> >     >     >>
> >     >     >> thanks
> >     >     >>
> >     >     >> -
> >     >     >> ahsan
> >     >     >>
> >     >     >>
> >     >     >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com
> >     <ma...@gmail.com>
> >     >     <mailto:ahsan.jnl@gmail.com <ma...@gmail.com>>>
> >     wrote:
> >     >     >> >
> >     >     >> > i have created the following mailet and matcher files
> >     and the
> >     >     edited
> >     >     >> > config file lines are given below.
> >     >     >> > my JAMES is no longer running, it crashes :(
> >     >     >> >
> >     >     >> >
> >     >     >>
> >     >
> >
> ******************************************************************************************************************
> >     >
> >     >     >>
> >     >     >> >   <mailetpackages>
> >     >     >> >          <mailetpackage>
> org.apache.james.transport.mailets
> >     >     >> > </mailetpackage>
> >     >     >> >    <mailetpackage>serveravailability.mailet
> >     </mailetpackage>
> >     >     >> >       </mailetpackages>
> >     >     >> >       <matcherpackages>
> >     >     >>
> >     >          <matcherpackage>org.apache.james.transport.matchers
> >     >     >> > </matcherpackage>
> >     >     >> >    <matcherpackage>
> >     serveravailability.matcher</matcherpackage>
> >     >     >> >       </matcherpackages>
> >     >     >> >
> >     >     >> > ----
> >     >     >> >
> >     >     >> > <mailet match="SAMatcher2=all" class="SAMailet2">
> >     >     >> >   <from>root@localhost.com <ma...@localhost.com>
> >     <mailto:root@localhost.com <ma...@localhost.com>> </from>
> >     >     >> >   <subject>mail delivery error !</subject>
> >     >     >> >   <content>Sorry, the email address u sent the mail to,
> is
> >     >     not valid.
> >     >     >> > Please have a look again. Thanks.</content>
> >     >     >> >   </mailet>
> >     >     >> >
> >     >     >> >
> >     >     >>
> >     >
> >
> ******************************************************************************************************************
> >     >
> >     >     >>
> >     >     >> >
> >     >     >> > i have got a deadline, can you please have a look and
> >     let me know
> >     >     >> what i
> >     >     >> > did wrong ??
> >     >     >> >
> >     >     >> >
> >     >     >>
> >     >     >>
> >     >     >> --
> >     >     >> Md. Ahsanur Rashid,
> >     >     >>
> >     >     >> Level-2, Term-1,
> >     >     >> Department of Computer Science and Engineering (CSE),
> >     >     >> Bangladesh University of Engineering & Technology (BUET),
> >     >     >> Dhaka-1000, Bangladesh.
> >     >     >> Tel - (+88)  01715621323, 01717769404
> >     >     >>
> >     >     >
> >     >     >
> >     >     >
> >     >
> >     >
> >     >
> >
> ---------------------------------------------------------------------
> >     >     To unsubscribe, e-mail:
> >     server-user-unsubscribe@james.apache.org
> >     <ma...@james.apache.org>
> >     >     <mailto:server-user-unsubscribe@james.apache.org
> >     <ma...@james.apache.org>>
> >     >     For additional commands, e-mail:
> >     server-user-help@james.apache.org
> >     <ma...@james.apache.org>
> >     >     <mailto:server-user-help@james.apache.org
> >     <ma...@james.apache.org>>
> >     >
> >     >
> >     >
> >     >
> >     > --
> >     > Md. Ahsanur Rashid,
> >     >
> >     > Level-2, Term-1,
> >     > Department of Computer Science and Engineering (CSE),
> >     > Bangladesh University of Engineering & Technology (BUET),
> >     > Dhaka-1000, Bangladesh.
> >     > Tel - (+88)  01715621323, 01717769404
> >     >
> >
> ------------------------------------------------------------------------
> >     >
> >     >
> >
> ---------------------------------------------------------------------
> >     > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >     <ma...@james.apache.org>
> >     > For additional commands, e-mail:
> >     server-user-help@james.apache.org
> >     <ma...@james.apache.org>
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >     <ma...@james.apache.org>
> >     For additional commands, e-mail: server-user-help@james.apache.org
> >     <ma...@james.apache.org>
> >
> >
> >
> >
> > --
> > Md. Ahsanur Rashid,
> >
> > Level-2, Term-1,
> > Department of Computer Science and Engineering (CSE),
> > Bangladesh University of Engineering & Technology (BUET),
> > Dhaka-1000, Bangladesh.
> > Tel - (+88)  01715621323, 01717769404
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
Ahsan,

just for didactical purposes, the following should (?) be the minimum 
code needed for your matcher (you need jdk 1.5):

--------------
package serveravailability.matcher;

import java.io.IOException;
import org.apache.mailet.GenericRecipientMatcher;
import org.apache.mailet.MailAddress;

import java.net.InetAddress;

public class SAMatcher2 extends GenericRecipientMatcher {

    public boolean matchRecipient(MailAddress recipient) {
        try {
            InetAddress address = 
InetAddress.getByName(recipient.getHost());
            if (address.isReachable(30000)) {
            return false;
            } else {
                return true;
            }
        } catch (IOException ex) {
            return true;
        }
    }
}
--------------------

As you see, it extends GenericRecipientMatcher, not GenericMatcher, so 
it will work independently for multiple recipients.

I haven't tested it (and won't test it). Just compiled.

You don't need the mailet. use Bounce as I told you.

Anyway, it does not make sense to ping the domain name of a recipient's 
address, as it would work only if it resolves to the ip of the mail 
server specified in an MX record of the domain itself, and this 
situation may be common only for small domains. Moreover, it is not sure 
that an existing and running mail server does answer to a ping.
Read what Stefano wrote you some days ago.

Good luck with your assignment.

Vincenzo

Ahsan wrote:
>
> Dear Vicenzo,
> sure I can, thnaks for your help :)
>  
> -
> ahsan
>  
> On 11/2/06, *Vincenzo Gianferrari Pini* 
> <vincenzo.gianferraripini@praxis.it 
> <ma...@praxis.it>> wrote:
>
>     Your attached files didn't go through (at least to me). Can you
>     resend them?
>
>     Vincenzo
>
>     Ahsan wrote:
>     > pls find attached my matcher and mailet files, thnaks for your help.
>     >
>     > i am trying out your suggestion now and will let you know the
>     results :)
>     >
>     > thanks again
>     >
>     > -
>     > ahsan
>     >
>     >
>     > On 11/1/06, *Vincenzo Gianferrari Pini*
>     > <vincenzo.gianferraripini@praxis.it
>     <ma...@praxis.it>
>     > <mailto: vincenzo.gianferraripini@praxis.it
>     <ma...@praxis.it>>> wrote:
>     >
>     >     If you don't need to pass any parameter to the matcher,
>     simply writing
>     >     match="SAMatcher2" is ok.
>     >
>     >     If it doesn't work the problem is inside your matcher code.
>     Without
>     >     seeing it nobody can help you.
>     >
>     >     Moreover, you don't need to write a specific mailet
>     (SAMailet2) to
>     >     just
>     >     bounce back a message to the sender. Use instead the
>     supplied Bounce
>     >     mailet and write:
>     >
>     >             <mailet match="SAMatcher2" class="Bounce">
>     >                <sender>root@localhost.com
>     <ma...@localhost.com>
>     >     <mailto:root@localhost.com <ma...@localhost.com>></sender>
>     >                <message> Sorry, the email address you sent the mail
>     >     to, is
>     >     not valid. Please have a look again. Thanks. </message>
>     >                <passThrough> false</passThrough>
>     >             </mailet>
>     >
>     >     Hope it helps.
>     >
>     >     Vincenzo
>     >
>     >
>     >     Ahsan wrote:
>     >     > these config.xml lines also do not work
>     >     >
>     >     > <mailet match="SAMatcher2" class="SAMailet2">
>     >     >  <from>root@localhost.com <ma...@localhost.com>
>     <mailto:root@localhost.com <ma...@localhost.com>></from>
>     >     >  <subject>mail delivery error !</subject>
>     >     >  <content>Sorry, the email address u sent the mail to, is
>     not valid.
>     >     > Please
>     >     > have a look again. Thanks.</content>
>     >     >  </mailet>
>     >     >
>     >     >
>     >     > On 11/1/06, Ahsan < ahsan.jnl@gmail.com
>     <ma...@gmail.com>
>     >     <mailto:ahsan.jnl@gmail.com <ma...@gmail.com>>>
>     wrote:
>     >     >>
>     >     >> about the mailet and matcher, what i have done is-->>
>     >     >>
>     >     >> 1) if the host is not available (
>     >     suppose@server-unavailable.com
>     <ma...@server-unavailable.com>
>     >     <mailto: suppose@server-unavailable.com
>     <ma...@server-unavailable.com>>) then
>     >     >> the
>     >     >> matcher will return the address
>     >     >> the mailet will set the mail state to ghost and send a
>     mail to the
>     >     >> sender.
>     >     >>
>     >     >> 2) if the host is available, then the matcher will return
>     null,
>     >     the
>     >     >> mailet
>     >     >> will do nothing and the next mailet/matcher will do their
>     job
>     >     >>
>     >     >> thanks
>     >     >>
>     >     >> -
>     >     >> ahsan
>     >     >>
>     >     >>
>     >     >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com
>     <ma...@gmail.com>
>     >     <mailto:ahsan.jnl@gmail.com <ma...@gmail.com>>>
>     wrote:
>     >     >> >
>     >     >> > i have created the following mailet and matcher files
>     and the
>     >     edited
>     >     >> > config file lines are given below.
>     >     >> > my JAMES is no longer running, it crashes :(
>     >     >> >
>     >     >> >
>     >     >>
>     >    
>     ******************************************************************************************************************
>     >
>     >     >>
>     >     >> >   <mailetpackages>
>     >     >> >          <mailetpackage> org.apache.james.transport.mailets
>     >     >> > </mailetpackage>
>     >     >> >    <mailetpackage>serveravailability.mailet
>     </mailetpackage>
>     >     >> >       </mailetpackages>
>     >     >> >       <matcherpackages>
>     >     >>
>     >          <matcherpackage>org.apache.james.transport.matchers
>     >     >> > </matcherpackage>
>     >     >> >    <matcherpackage>
>     serveravailability.matcher</matcherpackage>
>     >     >> >       </matcherpackages>
>     >     >> >
>     >     >> > ----
>     >     >> >
>     >     >> > <mailet match="SAMatcher2=all" class="SAMailet2">
>     >     >> >   <from>root@localhost.com <ma...@localhost.com>
>     <mailto:root@localhost.com <ma...@localhost.com>> </from>
>     >     >> >   <subject>mail delivery error !</subject>
>     >     >> >   <content>Sorry, the email address u sent the mail to, is
>     >     not valid.
>     >     >> > Please have a look again. Thanks.</content>
>     >     >> >   </mailet>
>     >     >> >
>     >     >> >
>     >     >>
>     >    
>     ******************************************************************************************************************
>     >
>     >     >>
>     >     >> >
>     >     >> > i have got a deadline, can you please have a look and
>     let me know
>     >     >> what i
>     >     >> > did wrong ??
>     >     >> >
>     >     >> >
>     >     >>
>     >     >>
>     >     >> --
>     >     >> Md. Ahsanur Rashid,
>     >     >>
>     >     >> Level-2, Term-1,
>     >     >> Department of Computer Science and Engineering (CSE),
>     >     >> Bangladesh University of Engineering & Technology (BUET),
>     >     >> Dhaka-1000, Bangladesh.
>     >     >> Tel - (+88)  01715621323, 01717769404
>     >     >>
>     >     >
>     >     >
>     >     >
>     >
>     >
>     >    
>     ---------------------------------------------------------------------
>     >     To unsubscribe, e-mail:
>     server-user-unsubscribe@james.apache.org
>     <ma...@james.apache.org>
>     >     <mailto:server-user-unsubscribe@james.apache.org
>     <ma...@james.apache.org>>
>     >     For additional commands, e-mail:
>     server-user-help@james.apache.org
>     <ma...@james.apache.org>
>     >     <mailto:server-user-help@james.apache.org
>     <ma...@james.apache.org>>
>     >
>     >
>     >
>     >
>     > --
>     > Md. Ahsanur Rashid,
>     >
>     > Level-2, Term-1,
>     > Department of Computer Science and Engineering (CSE),
>     > Bangladesh University of Engineering & Technology (BUET),
>     > Dhaka-1000, Bangladesh.
>     > Tel - (+88)  01715621323, 01717769404
>     >
>     ------------------------------------------------------------------------
>     >
>     >
>     ---------------------------------------------------------------------
>     > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>     <ma...@james.apache.org>
>     > For additional commands, e-mail:
>     server-user-help@james.apache.org
>     <ma...@james.apache.org>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>     <ma...@james.apache.org>
>     For additional commands, e-mail: server-user-help@james.apache.org
>     <ma...@james.apache.org>
>
>
>
>
> -- 
> Md. Ahsanur Rashid,
>
> Level-2, Term-1,
> Department of Computer Science and Engineering (CSE),
> Bangladesh University of Engineering & Technology (BUET),
> Dhaka-1000, Bangladesh.
> Tel - (+88)  01715621323, 01717769404 


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


Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
Dear Vicenzo,
sure I can, thnaks for your help :)

-
ahsan

On 11/2/06, Vincenzo Gianferrari Pini <vi...@praxis.it>
wrote:
>
> Your attached files didn't go through (at least to me). Can you resend
> them?
>
> Vincenzo
>
> Ahsan wrote:
> > pls find attached my matcher and mailet files, thnaks for your help.
> >
> > i am trying out your suggestion now and will let you know the results :)
> >
> > thanks again
> >
> > -
> > ahsan
> >
> >
> > On 11/1/06, *Vincenzo Gianferrari Pini*
> > <vincenzo.gianferraripini@praxis.it
> > <ma...@praxis.it>> wrote:
> >
> >     If you don't need to pass any parameter to the matcher, simply
> writing
> >     match="SAMatcher2" is ok.
> >
> >     If it doesn't work the problem is inside your matcher code. Without
> >     seeing it nobody can help you.
> >
> >     Moreover, you don't need to write a specific mailet (SAMailet2) to
> >     just
> >     bounce back a message to the sender. Use instead the supplied Bounce
> >     mailet and write:
> >
> >             <mailet match="SAMatcher2" class="Bounce">
> >                <sender>root@localhost.com
> >     <ma...@localhost.com></sender>
> >                <message> Sorry, the email address you sent the mail
> >     to, is
> >     not valid. Please have a look again. Thanks. </message>
> >                <passThrough> false</passThrough>
> >             </mailet>
> >
> >     Hope it helps.
> >
> >     Vincenzo
> >
> >
> >     Ahsan wrote:
> >     > these config.xml lines also do not work
> >     >
> >     > <mailet match="SAMatcher2" class="SAMailet2">
> >     >  <from>root@localhost.com <ma...@localhost.com></from>
> >     >  <subject>mail delivery error !</subject>
> >     >  <content>Sorry, the email address u sent the mail to, is not
> valid.
> >     > Please
> >     > have a look again. Thanks.</content>
> >     >  </mailet>
> >     >
> >     >
> >     > On 11/1/06, Ahsan < ahsan.jnl@gmail.com
> >     <ma...@gmail.com>> wrote:
> >     >>
> >     >> about the mailet and matcher, what i have done is-->>
> >     >>
> >     >> 1) if the host is not available (
> >     suppose@server-unavailable.com
> >     <ma...@server-unavailable.com>) then
> >     >> the
> >     >> matcher will return the address
> >     >> the mailet will set the mail state to ghost and send a mail to
> the
> >     >> sender.
> >     >>
> >     >> 2) if the host is available, then the matcher will return null,
> >     the
> >     >> mailet
> >     >> will do nothing and the next mailet/matcher will do their job
> >     >>
> >     >> thanks
> >     >>
> >     >> -
> >     >> ahsan
> >     >>
> >     >>
> >     >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com
> >     <ma...@gmail.com>> wrote:
> >     >> >
> >     >> > i have created the following mailet and matcher files and the
> >     edited
> >     >> > config file lines are given below.
> >     >> > my JAMES is no longer running, it crashes :(
> >     >> >
> >     >> >
> >     >>
> >
> ******************************************************************************************************************
> >
> >     >>
> >     >> >   <mailetpackages>
> >     >> >          <mailetpackage>org.apache.james.transport.mailets
> >     >> > </mailetpackage>
> >     >> >    <mailetpackage>serveravailability.mailet </mailetpackage>
> >     >> >       </mailetpackages>
> >     >> >       <matcherpackages>
> >     >> >          <matcherpackage>org.apache.james.transport.matchers
> >     >> > </matcherpackage>
> >     >> >    <matcherpackage> serveravailability.matcher</matcherpackage>
> >     >> >       </matcherpackages>
> >     >> >
> >     >> > ----
> >     >> >
> >     >> > <mailet match="SAMatcher2=all" class="SAMailet2">
> >     >> >   <from>root@localhost.com <ma...@localhost.com> </from>
> >     >> >   <subject>mail delivery error !</subject>
> >     >> >   <content>Sorry, the email address u sent the mail to, is
> >     not valid.
> >     >> > Please have a look again. Thanks.</content>
> >     >> >   </mailet>
> >     >> >
> >     >> >
> >     >>
> >
> ******************************************************************************************************************
> >
> >     >>
> >     >> >
> >     >> > i have got a deadline, can you please have a look and let me
> know
> >     >> what i
> >     >> > did wrong ??
> >     >> >
> >     >> >
> >     >>
> >     >>
> >     >> --
> >     >> Md. Ahsanur Rashid,
> >     >>
> >     >> Level-2, Term-1,
> >     >> Department of Computer Science and Engineering (CSE),
> >     >> Bangladesh University of Engineering & Technology (BUET),
> >     >> Dhaka-1000, Bangladesh.
> >     >> Tel - (+88)  01715621323, 01717769404
> >     >>
> >     >
> >     >
> >     >
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >     <ma...@james.apache.org>
> >     For additional commands, e-mail: server-user-help@james.apache.org
> >     <ma...@james.apache.org>
> >
> >
> >
> >
> > --
> > Md. Ahsanur Rashid,
> >
> > Level-2, Term-1,
> > Department of Computer Science and Engineering (CSE),
> > Bangladesh University of Engineering & Technology (BUET),
> > Dhaka-1000, Bangladesh.
> > Tel - (+88)  01715621323, 01717769404
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
i did have some suspicion that this might happen and did BCC my mail with
the attachments to Vicenzo :)

thanks for your information

-
ahsan


On 11/2/06, Norman Maurer <nm...@byteaction.de> wrote:
>
> Please remember it's not possible to send attachments to apache
> mailinglists. The Attachments get removed..
>
> bye
> Norman
>
> Ahsan schrieb:
> > Dear Vicenzo,
> > sure I can, thnaks for your help :)
> >
> > -
> > ahsan
> >
> > On 11/2/06, Vincenzo Gianferrari Pini
> > <vi...@praxis.it>
> > wrote:
> >>
> >> Your attached files didn't go through (at least to me). Can you resend
> >> them?
> >>
> >> Vincenzo
> >>
> >> Ahsan wrote:
> >> > pls find attached my matcher and mailet files, thnaks for your help.
> >> >
> >> > i am trying out your suggestion now and will let you know the
> >> results :)
> >> >
> >> > thanks again
> >> >
> >> > -
> >> > ahsan
> >> >
> >> >
> >> > On 11/1/06, *Vincenzo Gianferrari Pini*
> >> > <vincenzo.gianferraripini@praxis.it
> >> > <ma...@praxis.it>> wrote:
> >> >
> >> >     If you don't need to pass any parameter to the matcher, simply
> >> writing
> >> >     match="SAMatcher2" is ok.
> >> >
> >> >     If it doesn't work the problem is inside your matcher code.
> >> Without
> >> >     seeing it nobody can help you.
> >> >
> >> >     Moreover, you don't need to write a specific mailet (SAMailet2)
> to
> >> >     just
> >> >     bounce back a message to the sender. Use instead the supplied
> >> Bounce
> >> >     mailet and write:
> >> >
> >> >             <mailet match="SAMatcher2" class="Bounce">
> >> >                <sender>root@localhost.com
> >> >     <ma...@localhost.com></sender>
> >> >                <message> Sorry, the email address you sent the mail
> >> >     to, is
> >> >     not valid. Please have a look again. Thanks. </message>
> >> >                <passThrough> false</passThrough>
> >> >             </mailet>
> >> >
> >> >     Hope it helps.
> >> >
> >> >     Vincenzo
> >> >
> >> >
> >> >     Ahsan wrote:
> >> >     > these config.xml lines also do not work
> >> >     >
> >> >     > <mailet match="SAMatcher2" class="SAMailet2">
> >> >     >  <from>root@localhost.com <ma...@localhost.com></from>
> >> >     >  <subject>mail delivery error !</subject>
> >> >     >  <content>Sorry, the email address u sent the mail to, is not
> >> valid.
> >> >     > Please
> >> >     > have a look again. Thanks.</content>
> >> >     >  </mailet>
> >> >     >
> >> >     >
> >> >     > On 11/1/06, Ahsan < ahsan.jnl@gmail.com
> >> >     <ma...@gmail.com>> wrote:
> >> >     >>
> >> >     >> about the mailet and matcher, what i have done is-->>
> >> >     >>
> >> >     >> 1) if the host is not available (
> >> >     suppose@server-unavailable.com
> >> >     <ma...@server-unavailable.com>) then
> >> >     >> the
> >> >     >> matcher will return the address
> >> >     >> the mailet will set the mail state to ghost and send a mail to
> >> the
> >> >     >> sender.
> >> >     >>
> >> >     >> 2) if the host is available, then the matcher will return
> null,
> >> >     the
> >> >     >> mailet
> >> >     >> will do nothing and the next mailet/matcher will do their job
> >> >     >>
> >> >     >> thanks
> >> >     >>
> >> >     >> -
> >> >     >> ahsan
> >> >     >>
> >> >     >>
> >> >     >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com
> >> >     <ma...@gmail.com>> wrote:
> >> >     >> >
> >> >     >> > i have created the following mailet and matcher files and
> the
> >> >     edited
> >> >     >> > config file lines are given below.
> >> >     >> > my JAMES is no longer running, it crashes :(
> >> >     >> >
> >> >     >> >
> >> >     >>
> >> >
> >>
> ******************************************************************************************************************
> >>
> >> >
> >> >     >>
> >> >     >> >   <mailetpackages>
> >> >     >> >          <mailetpackage>org.apache.james.transport.mailets
> >> >     >> > </mailetpackage>
> >> >     >> >    <mailetpackage>serveravailability.mailet </mailetpackage>
> >> >     >> >       </mailetpackages>
> >> >     >> >       <matcherpackages>
> >> >     >> >          <matcherpackage>org.apache.james.transport.matchers
> >> >     >> > </matcherpackage>
> >> >     >> >    <matcherpackage>
> >> serveravailability.matcher</matcherpackage>
> >> >     >> >       </matcherpackages>
> >> >     >> >
> >> >     >> > ----
> >> >     >> >
> >> >     >> > <mailet match="SAMatcher2=all" class="SAMailet2">
> >> >     >> >   <from>root@localhost.com <ma...@localhost.com>
> >> </from>
> >> >     >> >   <subject>mail delivery error !</subject>
> >> >     >> >   <content>Sorry, the email address u sent the mail to, is
> >> >     not valid.
> >> >     >> > Please have a look again. Thanks.</content>
> >> >     >> >   </mailet>
> >> >     >> >
> >> >     >> >
> >> >     >>
> >> >
> >>
> ******************************************************************************************************************
> >>
> >> >
> >> >     >>
> >> >     >> >
> >> >     >> > i have got a deadline, can you please have a look and let me
> >> know
> >> >     >> what i
> >> >     >> > did wrong ??
> >> >     >> >
> >> >     >> >
> >> >     >>
> >> >     >>
> >> >     >> --
> >> >     >> Md. Ahsanur Rashid,
> >> >     >>
> >> >     >> Level-2, Term-1,
> >> >     >> Department of Computer Science and Engineering (CSE),
> >> >     >> Bangladesh University of Engineering & Technology (BUET),
> >> >     >> Dhaka-1000, Bangladesh.
> >> >     >> Tel - (+88)  01715621323, 01717769404
> >> >     >>
> >> >     >
> >> >     >
> >> >     >
> >> >
> >> >
> >> >
> >> ---------------------------------------------------------------------
> >> >     To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> >     <ma...@james.apache.org>
> >> >     For additional commands, e-mail:
> server-user-help@james.apache.org
> >> >     <ma...@james.apache.org>
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Md. Ahsanur Rashid,
> >> >
> >> > Level-2, Term-1,
> >> > Department of Computer Science and Engineering (CSE),
> >> > Bangladesh University of Engineering & Technology (BUET),
> >> > Dhaka-1000, Bangladesh.
> >> > Tel - (+88)  01715621323, 01717769404
> >> >
> >>
> ------------------------------------------------------------------------
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> > For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >> For additional commands, e-mail: server-user-help@james.apache.org
> >>
> >>
> >
> >
> > ------------------------------------------------------------------------
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-user-help@james.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Norman Maurer <nm...@byteaction.de>.
Please remember it's not possible to send attachments to apache
mailinglists. The Attachments get removed..

bye
Norman

Ahsan schrieb:
> Dear Vicenzo,
> sure I can, thnaks for your help :)
>
> -
> ahsan
>
> On 11/2/06, Vincenzo Gianferrari Pini
> <vi...@praxis.it>
> wrote:
>>
>> Your attached files didn't go through (at least to me). Can you resend
>> them?
>>
>> Vincenzo
>>
>> Ahsan wrote:
>> > pls find attached my matcher and mailet files, thnaks for your help.
>> >
>> > i am trying out your suggestion now and will let you know the
>> results :)
>> >
>> > thanks again
>> >
>> > -
>> > ahsan
>> >
>> >
>> > On 11/1/06, *Vincenzo Gianferrari Pini*
>> > <vincenzo.gianferraripini@praxis.it
>> > <ma...@praxis.it>> wrote:
>> >
>> >     If you don't need to pass any parameter to the matcher, simply
>> writing
>> >     match="SAMatcher2" is ok.
>> >
>> >     If it doesn't work the problem is inside your matcher code.
>> Without
>> >     seeing it nobody can help you.
>> >
>> >     Moreover, you don't need to write a specific mailet (SAMailet2) to
>> >     just
>> >     bounce back a message to the sender. Use instead the supplied
>> Bounce
>> >     mailet and write:
>> >
>> >             <mailet match="SAMatcher2" class="Bounce">
>> >                <sender>root@localhost.com
>> >     <ma...@localhost.com></sender>
>> >                <message> Sorry, the email address you sent the mail
>> >     to, is
>> >     not valid. Please have a look again. Thanks. </message>
>> >                <passThrough> false</passThrough>
>> >             </mailet>
>> >
>> >     Hope it helps.
>> >
>> >     Vincenzo
>> >
>> >
>> >     Ahsan wrote:
>> >     > these config.xml lines also do not work
>> >     >
>> >     > <mailet match="SAMatcher2" class="SAMailet2">
>> >     >  <from>root@localhost.com <ma...@localhost.com></from>
>> >     >  <subject>mail delivery error !</subject>
>> >     >  <content>Sorry, the email address u sent the mail to, is not
>> valid.
>> >     > Please
>> >     > have a look again. Thanks.</content>
>> >     >  </mailet>
>> >     >
>> >     >
>> >     > On 11/1/06, Ahsan < ahsan.jnl@gmail.com
>> >     <ma...@gmail.com>> wrote:
>> >     >>
>> >     >> about the mailet and matcher, what i have done is-->>
>> >     >>
>> >     >> 1) if the host is not available (
>> >     suppose@server-unavailable.com
>> >     <ma...@server-unavailable.com>) then
>> >     >> the
>> >     >> matcher will return the address
>> >     >> the mailet will set the mail state to ghost and send a mail to
>> the
>> >     >> sender.
>> >     >>
>> >     >> 2) if the host is available, then the matcher will return null,
>> >     the
>> >     >> mailet
>> >     >> will do nothing and the next mailet/matcher will do their job
>> >     >>
>> >     >> thanks
>> >     >>
>> >     >> -
>> >     >> ahsan
>> >     >>
>> >     >>
>> >     >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com
>> >     <ma...@gmail.com>> wrote:
>> >     >> >
>> >     >> > i have created the following mailet and matcher files and the
>> >     edited
>> >     >> > config file lines are given below.
>> >     >> > my JAMES is no longer running, it crashes :(
>> >     >> >
>> >     >> >
>> >     >>
>> >
>> ******************************************************************************************************************
>>
>> >
>> >     >>
>> >     >> >   <mailetpackages>
>> >     >> >          <mailetpackage>org.apache.james.transport.mailets
>> >     >> > </mailetpackage>
>> >     >> >    <mailetpackage>serveravailability.mailet </mailetpackage>
>> >     >> >       </mailetpackages>
>> >     >> >       <matcherpackages>
>> >     >> >          <matcherpackage>org.apache.james.transport.matchers
>> >     >> > </matcherpackage>
>> >     >> >    <matcherpackage>
>> serveravailability.matcher</matcherpackage>
>> >     >> >       </matcherpackages>
>> >     >> >
>> >     >> > ----
>> >     >> >
>> >     >> > <mailet match="SAMatcher2=all" class="SAMailet2">
>> >     >> >   <from>root@localhost.com <ma...@localhost.com>
>> </from>
>> >     >> >   <subject>mail delivery error !</subject>
>> >     >> >   <content>Sorry, the email address u sent the mail to, is
>> >     not valid.
>> >     >> > Please have a look again. Thanks.</content>
>> >     >> >   </mailet>
>> >     >> >
>> >     >> >
>> >     >>
>> >
>> ******************************************************************************************************************
>>
>> >
>> >     >>
>> >     >> >
>> >     >> > i have got a deadline, can you please have a look and let me
>> know
>> >     >> what i
>> >     >> > did wrong ??
>> >     >> >
>> >     >> >
>> >     >>
>> >     >>
>> >     >> --
>> >     >> Md. Ahsanur Rashid,
>> >     >>
>> >     >> Level-2, Term-1,
>> >     >> Department of Computer Science and Engineering (CSE),
>> >     >> Bangladesh University of Engineering & Technology (BUET),
>> >     >> Dhaka-1000, Bangladesh.
>> >     >> Tel - (+88)  01715621323, 01717769404
>> >     >>
>> >     >
>> >     >
>> >     >
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> >     To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> >     <ma...@james.apache.org>
>> >     For additional commands, e-mail: server-user-help@james.apache.org
>> >     <ma...@james.apache.org>
>> >
>> >
>> >
>> >
>> > --
>> > Md. Ahsanur Rashid,
>> >
>> > Level-2, Term-1,
>> > Department of Computer Science and Engineering (CSE),
>> > Bangladesh University of Engineering & Technology (BUET),
>> > Dhaka-1000, Bangladesh.
>> > Tel - (+88)  01715621323, 01717769404
>> >
>> ------------------------------------------------------------------------
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> > For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>> For additional commands, e-mail: server-user-help@james.apache.org
>>
>>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org



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


Re: prob with writing a simple mailet

Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
Your attached files didn't go through (at least to me). Can you resend them?

Vincenzo

Ahsan wrote:
> pls find attached my matcher and mailet files, thnaks for your help.
>  
> i am trying out your suggestion now and will let you know the results :)
>  
> thanks again
>  
> -
> ahsan
>
>  
> On 11/1/06, *Vincenzo Gianferrari Pini* 
> <vincenzo.gianferraripini@praxis.it 
> <ma...@praxis.it>> wrote:
>
>     If you don't need to pass any parameter to the matcher, simply writing
>     match="SAMatcher2" is ok.
>
>     If it doesn't work the problem is inside your matcher code. Without
>     seeing it nobody can help you.
>
>     Moreover, you don't need to write a specific mailet (SAMailet2) to
>     just
>     bounce back a message to the sender. Use instead the supplied Bounce
>     mailet and write:
>
>             <mailet match="SAMatcher2" class="Bounce">
>                <sender>root@localhost.com
>     <ma...@localhost.com></sender>
>                <message> Sorry, the email address you sent the mail
>     to, is
>     not valid. Please have a look again. Thanks. </message>
>                <passThrough> false</passThrough>
>             </mailet>
>
>     Hope it helps.
>
>     Vincenzo
>
>
>     Ahsan wrote:
>     > these config.xml lines also do not work
>     >
>     > <mailet match="SAMatcher2" class="SAMailet2">
>     >  <from>root@localhost.com <ma...@localhost.com></from>
>     >  <subject>mail delivery error !</subject>
>     >  <content>Sorry, the email address u sent the mail to, is not valid.
>     > Please
>     > have a look again. Thanks.</content>
>     >  </mailet>
>     >
>     >
>     > On 11/1/06, Ahsan < ahsan.jnl@gmail.com
>     <ma...@gmail.com>> wrote:
>     >>
>     >> about the mailet and matcher, what i have done is-->>
>     >>
>     >> 1) if the host is not available (
>     suppose@server-unavailable.com
>     <ma...@server-unavailable.com>) then
>     >> the
>     >> matcher will return the address
>     >> the mailet will set the mail state to ghost and send a mail to the
>     >> sender.
>     >>
>     >> 2) if the host is available, then the matcher will return null,
>     the
>     >> mailet
>     >> will do nothing and the next mailet/matcher will do their job
>     >>
>     >> thanks
>     >>
>     >> -
>     >> ahsan
>     >>
>     >>
>     >>  On 11/1/06, Ahsan < ahsan.jnl@gmail.com
>     <ma...@gmail.com>> wrote:
>     >> >
>     >> > i have created the following mailet and matcher files and the
>     edited
>     >> > config file lines are given below.
>     >> > my JAMES is no longer running, it crashes :(
>     >> >
>     >> >
>     >>
>     ******************************************************************************************************************
>
>     >>
>     >> >   <mailetpackages>
>     >> >          <mailetpackage>org.apache.james.transport.mailets
>     >> > </mailetpackage>
>     >> >    <mailetpackage>serveravailability.mailet </mailetpackage>
>     >> >       </mailetpackages>
>     >> >       <matcherpackages>
>     >> >          <matcherpackage>org.apache.james.transport.matchers
>     >> > </matcherpackage>
>     >> >    <matcherpackage> serveravailability.matcher</matcherpackage>
>     >> >       </matcherpackages>
>     >> >
>     >> > ----
>     >> >
>     >> > <mailet match="SAMatcher2=all" class="SAMailet2">
>     >> >   <from>root@localhost.com <ma...@localhost.com> </from>
>     >> >   <subject>mail delivery error !</subject>
>     >> >   <content>Sorry, the email address u sent the mail to, is
>     not valid.
>     >> > Please have a look again. Thanks.</content>
>     >> >   </mailet>
>     >> >
>     >> >
>     >>
>     ******************************************************************************************************************
>
>     >>
>     >> >
>     >> > i have got a deadline, can you please have a look and let me know
>     >> what i
>     >> > did wrong ??
>     >> >
>     >> >
>     >>
>     >>
>     >> --
>     >> Md. Ahsanur Rashid,
>     >>
>     >> Level-2, Term-1,
>     >> Department of Computer Science and Engineering (CSE),
>     >> Bangladesh University of Engineering & Technology (BUET),
>     >> Dhaka-1000, Bangladesh.
>     >> Tel - (+88)  01715621323, 01717769404
>     >>
>     >
>     >
>     >
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>     <ma...@james.apache.org>
>     For additional commands, e-mail: server-user-help@james.apache.org
>     <ma...@james.apache.org>
>
>
>
>
> -- 
> Md. Ahsanur Rashid,
>
> Level-2, Term-1,
> Department of Computer Science and Engineering (CSE),
> Bangladesh University of Engineering & Technology (BUET),
> Dhaka-1000, Bangladesh.
> Tel - (+88)  01715621323, 01717769404
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org


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


Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
pls find attached my matcher and mailet files, thnaks for your help.

i am trying out your suggestion now and will let you know the results :)

thanks again

-
ahsan


On 11/1/06, Vincenzo Gianferrari Pini <vi...@praxis.it>
wrote:
>
> If you don't need to pass any parameter to the matcher, simply writing
> match="SAMatcher2" is ok.
>
> If it doesn't work the problem is inside your matcher code. Without
> seeing it nobody can help you.
>
> Moreover, you don't need to write a specific mailet (SAMailet2) to just
> bounce back a message to the sender. Use instead the supplied Bounce
> mailet and write:
>
>         <mailet match="SAMatcher2" class="Bounce">
>            <sender>root@localhost.com</sender>
>            <message> Sorry, the email address you sent the mail to, is
> not valid. Please have a look again. Thanks. </message>
>            <passThrough> false</passThrough>
>         </mailet>
>
> Hope it helps.
>
> Vincenzo
>
>
> Ahsan wrote:
> > these config.xml lines also do not work
> >
> > <mailet match="SAMatcher2" class="SAMailet2">
> >  <from>root@localhost.com</from>
> >  <subject>mail delivery error !</subject>
> >  <content>Sorry, the email address u sent the mail to, is not valid.
> > Please
> > have a look again. Thanks.</content>
> >  </mailet>
> >
> >
> > On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> >>
> >> about the mailet and matcher, what i have done is-->>
> >>
> >> 1) if the host is not available (suppose@server-unavailable.com) then
> >> the
> >> matcher will return the address
> >> the mailet will set the mail state to ghost and send a mail to the
> >> sender.
> >>
> >> 2) if the host is available, then the matcher will return null, the
> >> mailet
> >> will do nothing and the next mailet/matcher will do their job
> >>
> >> thanks
> >>
> >> -
> >> ahsan
> >>
> >>
> >>  On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> >> >
> >> > i have created the following mailet and matcher files and the edited
> >> > config file lines are given below.
> >> > my JAMES is no longer running, it crashes :(
> >> >
> >> >
> >>
> ******************************************************************************************************************
> >>
> >> >   <mailetpackages>
> >> >          <mailetpackage>org.apache.james.transport.mailets
> >> > </mailetpackage>
> >> >    <mailetpackage>serveravailability.mailet</mailetpackage>
> >> >       </mailetpackages>
> >> >       <matcherpackages>
> >> >          <matcherpackage>org.apache.james.transport.matchers
> >> > </matcherpackage>
> >> >    <matcherpackage> serveravailability.matcher</matcherpackage>
> >> >       </matcherpackages>
> >> >
> >> > ----
> >> >
> >> > <mailet match="SAMatcher2=all" class="SAMailet2">
> >> >   <from>root@localhost.com </from>
> >> >   <subject>mail delivery error !</subject>
> >> >   <content>Sorry, the email address u sent the mail to, is not valid.
> >> > Please have a look again. Thanks.</content>
> >> >   </mailet>
> >> >
> >> >
> >>
> ******************************************************************************************************************
> >>
> >> >
> >> > i have got a deadline, can you please have a look and let me know
> >> what i
> >> > did wrong ??
> >> >
> >> >
> >>
> >>
> >> --
> >> Md. Ahsanur Rashid,
> >>
> >> Level-2, Term-1,
> >> Department of Computer Science and Engineering (CSE),
> >> Bangladesh University of Engineering & Technology (BUET),
> >> Dhaka-1000, Bangladesh.
> >> Tel - (+88)  01715621323, 01717769404
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
Dear Vicenzo,

can i know, from where you learnt all about the mailets and matchers and
their requirements ?? i mean, i would love to know more. currently what i
know is almost nothing :(

my matcher only returns addresses if their server is unavailable :)

does this add up ?? (you may like to read a few of my previosu mails for
added info  :)  )

-
ahsan


On 11/1/06, Vincenzo Gianferrari Pini <vi...@praxis.it>
wrote:
>
> If you don't need to pass any parameter to the matcher, simply writing
> match="SAMatcher2" is ok.
>
> If it doesn't work the problem is inside your matcher code. Without
> seeing it nobody can help you.
>
> Moreover, you don't need to write a specific mailet (SAMailet2) to just
> bounce back a message to the sender. Use instead the supplied Bounce
> mailet and write:
>
>         <mailet match="SAMatcher2" class="Bounce">
>            <sender>root@localhost.com</sender>
>            <message> Sorry, the email address you sent the mail to, is
> not valid. Please have a look again. Thanks. </message>
>            <passThrough> false</passThrough>
>         </mailet>
>
> Hope it helps.
>
> Vincenzo
>
>
> Ahsan wrote:
> > these config.xml lines also do not work
> >
> > <mailet match="SAMatcher2" class="SAMailet2">
> >  <from>root@localhost.com</from>
> >  <subject>mail delivery error !</subject>
> >  <content>Sorry, the email address u sent the mail to, is not valid.
> > Please
> > have a look again. Thanks.</content>
> >  </mailet>
> >
> >
> > On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> >>
> >> about the mailet and matcher, what i have done is-->>
> >>
> >> 1) if the host is not available (suppose@server-unavailable.com) then
> >> the
> >> matcher will return the address
> >> the mailet will set the mail state to ghost and send a mail to the
> >> sender.
> >>
> >> 2) if the host is available, then the matcher will return null, the
> >> mailet
> >> will do nothing and the next mailet/matcher will do their job
> >>
> >> thanks
> >>
> >> -
> >> ahsan
> >>
> >>
> >>  On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> >> >
> >> > i have created the following mailet and matcher files and the edited
> >> > config file lines are given below.
> >> > my JAMES is no longer running, it crashes :(
> >> >
> >> >
> >>
> ******************************************************************************************************************
> >>
> >> >   <mailetpackages>
> >> >          <mailetpackage>org.apache.james.transport.mailets
> >> > </mailetpackage>
> >> >    <mailetpackage>serveravailability.mailet</mailetpackage>
> >> >       </mailetpackages>
> >> >       <matcherpackages>
> >> >          <matcherpackage>org.apache.james.transport.matchers
> >> > </matcherpackage>
> >> >    <matcherpackage> serveravailability.matcher</matcherpackage>
> >> >       </matcherpackages>
> >> >
> >> > ----
> >> >
> >> > <mailet match="SAMatcher2=all" class="SAMailet2">
> >> >   <from>root@localhost.com </from>
> >> >   <subject>mail delivery error !</subject>
> >> >   <content>Sorry, the email address u sent the mail to, is not valid.
> >> > Please have a look again. Thanks.</content>
> >> >   </mailet>
> >> >
> >> >
> >>
> ******************************************************************************************************************
> >>
> >> >
> >> > i have got a deadline, can you please have a look and let me know
> >> what i
> >> > did wrong ??
> >> >
> >> >
> >>
> >>
> >> --
> >> Md. Ahsanur Rashid,
> >>
> >> Level-2, Term-1,
> >> Department of Computer Science and Engineering (CSE),
> >> Bangladesh University of Engineering & Technology (BUET),
> >> Dhaka-1000, Bangladesh.
> >> Tel - (+88)  01715621323, 01717769404
> >>
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Vincenzo Gianferrari Pini <vi...@praxis.it>.
If you don't need to pass any parameter to the matcher, simply writing 
match="SAMatcher2" is ok.

If it doesn't work the problem is inside your matcher code. Without 
seeing it nobody can help you.

Moreover, you don't need to write a specific mailet (SAMailet2) to just 
bounce back a message to the sender. Use instead the supplied Bounce 
mailet and write:

         <mailet match="SAMatcher2" class="Bounce">
            <sender>root@localhost.com</sender>
            <message> Sorry, the email address you sent the mail to, is 
not valid. Please have a look again. Thanks. </message>
            <passThrough> false</passThrough>
         </mailet>

Hope it helps.

Vincenzo


Ahsan wrote:
> these config.xml lines also do not work
>
> <mailet match="SAMatcher2" class="SAMailet2">
>  <from>root@localhost.com</from>
>  <subject>mail delivery error !</subject>
>  <content>Sorry, the email address u sent the mail to, is not valid. 
> Please
> have a look again. Thanks.</content>
>  </mailet>
>
>
> On 11/1/06, Ahsan <ah...@gmail.com> wrote:
>>
>> about the mailet and matcher, what i have done is-->>
>>
>> 1) if the host is not available (suppose@server-unavailable.com) then 
>> the
>> matcher will return the address
>> the mailet will set the mail state to ghost and send a mail to the 
>> sender.
>>
>> 2) if the host is available, then the matcher will return null, the 
>> mailet
>> will do nothing and the next mailet/matcher will do their job
>>
>> thanks
>>
>> -
>> ahsan
>>
>>
>>  On 11/1/06, Ahsan <ah...@gmail.com> wrote:
>> >
>> > i have created the following mailet and matcher files and the edited
>> > config file lines are given below.
>> > my JAMES is no longer running, it crashes :(
>> >
>> > 
>> ****************************************************************************************************************** 
>>
>> >   <mailetpackages>
>> >          <mailetpackage>org.apache.james.transport.mailets
>> > </mailetpackage>
>> >    <mailetpackage>serveravailability.mailet</mailetpackage>
>> >       </mailetpackages>
>> >       <matcherpackages>
>> >          <matcherpackage>org.apache.james.transport.matchers
>> > </matcherpackage>
>> >    <matcherpackage> serveravailability.matcher</matcherpackage>
>> >       </matcherpackages>
>> >
>> > ----
>> >
>> > <mailet match="SAMatcher2=all" class="SAMailet2">
>> >   <from>root@localhost.com </from>
>> >   <subject>mail delivery error !</subject>
>> >   <content>Sorry, the email address u sent the mail to, is not valid.
>> > Please have a look again. Thanks.</content>
>> >   </mailet>
>> >
>> > 
>> ****************************************************************************************************************** 
>>
>> >
>> > i have got a deadline, can you please have a look and let me know 
>> what i
>> > did wrong ??
>> >
>> >
>>
>>
>> -- 
>> Md. Ahsanur Rashid,
>>
>> Level-2, Term-1,
>> Department of Computer Science and Engineering (CSE),
>> Bangladesh University of Engineering & Technology (BUET),
>> Dhaka-1000, Bangladesh.
>> Tel - (+88)  01715621323, 01717769404
>>
>
>
>


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


Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
the main thing with the config.xml thingy is that i do not need any info or
anytihng else to initialize the matcher,so how should i write the config
lines ???

any help will be greatly appreciated :)

thanks

-
ahsan


On 11/1/06, Ahsan <ah...@gmail.com> wrote:
>
> these config.xml lines also do not work
>
> <mailet match="SAMatcher2" class="SAMailet2">
>   <from>root@localhost.com</from>
>   <subject>mail delivery error !</subject>
>   <content>Sorry, the email address u sent the mail to, is not valid.
> Please have a look again. Thanks.</content>
>   </mailet>
>
>
>  On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> >
> > about the mailet and matcher, what i have done is-->>
> >
> > 1) if the host is not available (suppose@server-unavailable.com) then
> > the matcher will return the address
> > the mailet will set the mail state to ghost and send a mail to the
> > sender.
> >
> > 2) if the host is available, then the matcher will return null, the
> > mailet will do nothing and the next mailet/matcher will do their job
> >
> > thanks
> >
> > -
> > ahsan
> >
> >
> >  On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> > >
> > > i have created the following mailet and matcher files and the edited
> > > config file lines are given below.
> > > my JAMES is no longer running, it crashes :(
> > >
> > > ******************************************************************************************************************
> > >   <mailetpackages>
> > >          <mailetpackage>org.apache.james.transport.mailets
> > > </mailetpackage>
> > >    <mailetpackage>serveravailability.mailet</mailetpackage>
> > >       </mailetpackages>
> > >       <matcherpackages>
> > >          <matcherpackage>org.apache.james.transport.matchers
> > > </matcherpackage>
> > >    <matcherpackage> serveravailability.matcher</matcherpackage>
> > >       </matcherpackages>
> > >
> > > ----
> > >
> > > <mailet match="SAMatcher2=all" class="SAMailet2">
> > >   <from>root@localhost.com </from>
> > >   <subject>mail delivery error !</subject>
> > >   <content>Sorry, the email address u sent the mail to, is not valid.
> > > Please have a look again. Thanks.</content>
> > >   </mailet>
> > >
> > > ******************************************************************************************************************
> > >
> > > i have got a deadline, can you please have a look and let me know what
> > > i did wrong ??
> > >
> > >
> >
> >
> > --
> > Md. Ahsanur Rashid,
> >
> > Level-2, Term-1,
> > Department of Computer Science and Engineering (CSE),
> > Bangladesh University of Engineering & Technology (BUET),
> > Dhaka-1000, Bangladesh.
> > Tel - (+88)  01715621323, 01717769404
> >
>
>
>
> --
> Md. Ahsanur Rashid,
>
> Level-2, Term-1,
> Department of Computer Science and Engineering (CSE),
> Bangladesh University of Engineering & Technology (BUET),
> Dhaka-1000, Bangladesh.
> Tel - (+88)  01715621323, 01717769404
>



-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
these config.xml lines also do not work

<mailet match="SAMatcher2" class="SAMailet2">
  <from>root@localhost.com</from>
  <subject>mail delivery error !</subject>
  <content>Sorry, the email address u sent the mail to, is not valid. Please
have a look again. Thanks.</content>
  </mailet>


On 11/1/06, Ahsan <ah...@gmail.com> wrote:
>
> about the mailet and matcher, what i have done is-->>
>
> 1) if the host is not available (suppose@server-unavailable.com) then the
> matcher will return the address
> the mailet will set the mail state to ghost and send a mail to the sender.
>
> 2) if the host is available, then the matcher will return null, the mailet
> will do nothing and the next mailet/matcher will do their job
>
> thanks
>
> -
> ahsan
>
>
>  On 11/1/06, Ahsan <ah...@gmail.com> wrote:
> >
> > i have created the following mailet and matcher files and the edited
> > config file lines are given below.
> > my JAMES is no longer running, it crashes :(
> >
> > ******************************************************************************************************************
> >   <mailetpackages>
> >          <mailetpackage>org.apache.james.transport.mailets
> > </mailetpackage>
> >    <mailetpackage>serveravailability.mailet</mailetpackage>
> >       </mailetpackages>
> >       <matcherpackages>
> >          <matcherpackage>org.apache.james.transport.matchers
> > </matcherpackage>
> >    <matcherpackage> serveravailability.matcher</matcherpackage>
> >       </matcherpackages>
> >
> > ----
> >
> > <mailet match="SAMatcher2=all" class="SAMailet2">
> >   <from>root@localhost.com </from>
> >   <subject>mail delivery error !</subject>
> >   <content>Sorry, the email address u sent the mail to, is not valid.
> > Please have a look again. Thanks.</content>
> >   </mailet>
> >
> > ******************************************************************************************************************
> >
> > i have got a deadline, can you please have a look and let me know what i
> > did wrong ??
> >
> >
>
>
> --
> Md. Ahsanur Rashid,
>
> Level-2, Term-1,
> Department of Computer Science and Engineering (CSE),
> Bangladesh University of Engineering & Technology (BUET),
> Dhaka-1000, Bangladesh.
> Tel - (+88)  01715621323, 01717769404
>



-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404

Re: prob with writing a simple mailet

Posted by Ahsan <ah...@gmail.com>.
about the mailet and matcher, what i have done is-->>

1) if the host is not available (suppose@server-unavailable.com) then the
matcher will return the address
the mailet will set the mail state to ghost and send a mail to the sender.

2) if the host is available, then the matcher will return null, the mailet
will do nothing and the next mailet/matcher will do their job

thanks

-
ahsan


On 11/1/06, Ahsan <ah...@gmail.com> wrote:
>
> i have created the following mailet and matcher files and the edited
> config file lines are given below.
> my JAMES is no longer running, it crashes :(
>
> ******************************************************************************************************************
>   <mailetpackages>
>          <mailetpackage>org.apache.james.transport.mailets</mailetpackage>
>    <mailetpackage>serveravailability.mailet</mailetpackage>
>       </mailetpackages>
>       <matcherpackages>
>          <matcherpackage>org.apache.james.transport.matchers
> </matcherpackage>
>    <matcherpackage> serveravailability.matcher</matcherpackage>
>       </matcherpackages>
>
> ----
>
> <mailet match="SAMatcher2=all" class="SAMailet2">
>   <from>root@localhost.com</from>
>   <subject>mail delivery error !</subject>
>   <content>Sorry, the email address u sent the mail to, is not valid.
> Please have a look again. Thanks.</content>
>   </mailet>
>
> ******************************************************************************************************************
>
> i have got a deadline, can you please have a look and let me know what i
> did wrong ??
>
>


-- 
Md. Ahsanur Rashid,

Level-2, Term-1,
Department of Computer Science and Engineering (CSE),
Bangladesh University of Engineering & Technology (BUET),
Dhaka-1000, Bangladesh.
Tel - (+88)  01715621323, 01717769404