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 Diego Pietralunga <di...@ltt.it> on 2003/04/14 16:32:25 UTC

[Newbie] (Event) handle on outgoing mail

Hi everyone,

I made up my mind to use James in a work project.
I have to convince my boss that is what we need!

I lurked a bit in the list and cvs and a question arose:

Can I get a "handle" on _outgoing_ mail?
(Through a mailet, of course)

My need is to have a sort of a trigger on events when a user uses his/her mailbox to serve an action.
The trigger must "click" when a user _sends_ an e-mail, not when it's incoming.

For example:

mailbox: me@mydomain.tld

1) User "me" sends an e-mail to a foreign address (not on James) and gets an "Hello World" e-mail back by James 

2) User "me" sends and e-mail to a foreign address after 5.45 p.m and he gets warned by e-mail that no mail will be allow
ed to go out after 15 mins due to an internal mail policy.

3) User "me" sends and e-mail to a foreign address and gets an e-mail back saying she has exceeded the 99 e-mails per day.

4) User "me" sends and e-mail to a foreign address and gets notified that she cannot send more than 3 attachments whose size can be no more than 500KB each.

5) User "me" sends and e-mail to a foreign address and the server "testifies" that it was sent at a certain server time.

Is this possible?

Sorry if this was answered somewhere already (but couldn't find it)

Thank you.

Regards,

diego




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.471 / Virus Database: 269 - Release Date: 10/04/2003

Re: [Newbie] (Event) handle on outgoing mail

Posted by bill parducci <bi...@parducci.net>.
if you setup james as a relay (smart host), you can perform tasks on 
either inbound or outbound mail (difference being what you filter on).

here is a doc on how to configure james thus (took me a while to find 
it, seems like it would be better suited to appear in james docs now 
that it is pretty much done).

http://nagoya.apache.org/wiki/apachewiki.cgi?James/SmartOrSecondaryHost

b

Diego Pietralunga wrote:
> Hi everyone,
> 
> I made up my mind to use James in a work project.
> I have to convince my boss that is what we need!
> 
> I lurked a bit in the list and cvs and a question arose:
> 
> Can I get a "handle" on _outgoing_ mail?
> (Through a mailet, of course)
> 
> My need is to have a sort of a trigger on events when a user uses his/her mailbox to serve an action.
> The trigger must "click" when a user _sends_ an e-mail, not when it's incoming.
> 
> For example:
> 
> mailbox: me@mydomain.tld
> 
> 1) User "me" sends an e-mail to a foreign address (not on James) and gets an "Hello World" e-mail back by James 
> 
> 2) User "me" sends and e-mail to a foreign address after 5.45 p.m and he gets warned by e-mail that no mail will be allow
> ed to go out after 15 mins due to an internal mail policy.
> 
> 3) User "me" sends and e-mail to a foreign address and gets an e-mail back saying she has exceeded the 99 e-mails per day.
> 
> 4) User "me" sends and e-mail to a foreign address and gets notified that she cannot send more than 3 attachments whose size can be no more than 500KB each.
> 
> 5) User "me" sends and e-mail to a foreign address and the server "testifies" that it was sent at a certain server time.
> 
> Is this possible?
> 
> Sorry if this was answered somewhere already (but couldn't find it)
> 
> Thank you.
> 
> Regards,
> 
> diego
> 
> 
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.471 / Virus Database: 269 - Release Date: 10/04/2003



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


RE: [Newbie] (Event) handle on outgoing mail

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Can I get a "handle" on _outgoing_ mail?
> (Through a mailet, of course)

> My need is to have a sort of a trigger on
> events when a user uses his/her mailbox to
> serve an action.

If that were to mean POP3, the answer would be not in v2.  Probably not in
the early versions of v3.

> The trigger must "click" when a user _sends_ an e-mail,
> not when it's incoming.

That is a different story.  Sending mail is SMTP regardless of the source
and destination.  There is not a wit of difference between mail arriving
from a remote sender or a local sender.  The only difference is your own
application of semantic rules, e.g, the RemoteAddrNotInNetwork matcher.

> a _matcher_ like "All" gathers really ALL messages (outgoing and
incoming)?

Again, "outgoing and incoming" are somewhat mis-nomers.  Mail arrives via
SMTP, regardless of its origin and intended destination.  Eventually it will
either be delivered to a local mailbox or relayed to another server.  All
messages coming into James go through the pipeline.  What happens within
that pipeline is governed by the organization of matchers and mailets.

Your list of rules are just part of the SMTP processing chain.  You create
rules (and I suggest that you organize those rules into processors), and
away you go.

The key is to understand that James is a PROGRAMMABLE mail delivery engine.
The elements used to program James are processors (groups of instructions),
matchers (conditional execution of instructions), and mailets
(instructions).  All SMTP messages start at the pipeline root, regardless of
origin or destination.

Technically, and this may be more than you want to know, Matchers control
recipient lists.  A Matcher controls which recipients will be associated
with the message going to the mailet, and which ones will skip the mailet.
If, as is the case with many Matcher classes, the result is all or nothing,
then the nothing path is skipped.

	--- Noel


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