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 Norman Maurer <nm...@spam-box.de> on 2006/01/23 08:26:19 UTC

Add diffrent headers for each recip

Hi guys,

i wrote a plugin to support dspam in james. It works fine here. But now
i search a solution to run the dspam mailet i wrote for each recip that
get the message. So it would insert diffrent signature headers for each
recip.

Is it possible ? Or is james generally run each mailet for each recip ?

bye

Ps: Is there also a healo check etc in james ?


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


Re: Add diffrent headers for each recip

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Hi guys,
> 
> i wrote a plugin to support dspam in james. It works fine here. But now
> i search a solution to run the dspam mailet i wrote for each recip that
> get the message. So it would insert diffrent signature headers for each
> recip.

You have to manually iterate over the recipient list and eventually 
store a new copy of the modified message in the store if you want to 
have a different result for each recipient.

> Is it possible ? Or is james generally run each mailet for each recip ?

James run a matcher that match a zero or more recipients for every 
message. If it matches 0 recipients the message won't go to the mailet, 
if it matches all the recipients the message is sent to the mailet 
untouched, if it return a partial match the mail is splitted in 2 mails 
(one with the matching recipients, one with the other ones) and the 
matching one is passed to the mail.
So you receive a single mail with the all the matching recipients.

> bye
> 
> Ps: Is there also a healo check etc in james ?

What do you mean by "healo check"?

Stefano

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


Re: Add diffrent headers for each recip

Posted by Stefano Bagnara <ap...@bago.org>.
Noel J. Bergman wrote:
>> I never got the point in checking the parameter of the HELO command
>> (possibly spoofed) when you can check the remote address.
> 
> Well, that's the point.  If a mail system spoofs its HELO name, you might
> want the option of rejecting it based on that criteria.

Sure, but then why not to check only the remote address ?
I don't understand what kind of security/reliability/trust the HELO 
param adds. If you want to block specific hosts you should do that using 
the remote-addr and not the helo param. Probably I'm missing something, 
btw,

I said this just as a personal approach/idea: I'm not against a helo 
checker in james (possibly with a disable option, as I don't want to run 
unneeded dns resolutions).

Stefano

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


RE: Add diffrent headers for each recip

Posted by "Noel J. Bergman" <no...@devtech.com>.
> > with helo check i mean to check if the helo that was provided
> > can be resolved etc.

> No, current HELO and EHLO command handlers don't check the host provided.

There are a couple of matchers that we need to move into the fast-fail code,
and those are at the top of my list to get done for the release.

> I never got the point in checking the parameter of the HELO command
> (possibly spoofed) when you can check the remote address.

Well, that's the point.  If a mail system spoofs its HELO name, you might
want the option of rejecting it based on that criteria.

	--- Noel


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


Message store organization (was: Add diffrent headers for each recip)

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Look at the service() method of the RemoteDelivery mailet.
> It loops over the recipients and store a copy of the mail
> in the outgoing spool for each different domain.

Or look at LocalDelivery, which adds a unique header for each local
recipient as the message is stored.

The overhead still bothers me.  For future, I have been thinking that it
might be good to break down the message into [RFC2821 Envelope, RFC2822
Headers and RFC2822 body]-tuples, each stored such that we can have shared
content (COW semantics).

	--- Noel


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


Re: Add diffrent headers for each recip

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer wrote:
> Hmm, kann you provide an example ?

Look at the service() method of the RemoteDelivery mailet.
It loops over the recipients and store a copy of the mail in the 
outgoing spool for each different domain. You probably need to do 
something similar.

> with helo check i mean to check if the helo that was provided can be
> resolved etc. 

No, current HELO and EHLO command handlers don't check the host provided.

In James 2.3.0 the command handlers will be configurable so it will be 
easier for you to write one, and eventually submit your work to our tracker.

> I just wrote it by myself cause it not seems to is included.. I also
> wonder why no helo is needed at all for send an msg via james ? Is it
> not a needed in rfcs ?

Yes, a compliant client should send HELO or EHLO, but James does not 
check the arguments so it works without the salutation too, as if HELO 
was sent. Other MTAs also do the same. This should not create problems.
Obviously this should be changed if you want to check the host provided.

PS: I never got the point in checking the parameter of the HELO command 
(possibly spoofed) when you can check the remote address.

Stefano


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


Re: Add diffrent headers for each recip

Posted by Norman Maurer <nm...@spam-box.de>.
Hmm, kann you provide an example ?

with helo check i mean to check if the helo that was provided can be
resolved etc. 

I just wrote it by myself cause it not seems to is included.. I also
wonder why no helo is needed at all for send an msg via james ? Is it
not a needed in rfcs ?

bye

Am Montag, den 23.01.2006, 10:56 +0100 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Hi guys,
> > 
> > i wrote a plugin to support dspam in james. It works fine here. But now
> > i search a solution to run the dspam mailet i wrote for each recip that
> > get the message. So it would insert diffrent signature headers for each
> > recip.
> 
> You have to manually iterate over the recipient list and eventually 
> store a new copy of the modified message in the store if you want to 
> have a different result for each recipient.
> 
> > Is it possible ? Or is james generally run each mailet for each recip ?
> 
> James run a matcher that match a zero or more recipients for every 
> message. If it matches 0 recipients the message won't go to the mailet, 
> if it matches all the recipients the message is sent to the mailet 
> untouched, if it return a partial match the mail is splitted in 2 mails 
> (one with the matching recipients, one with the other ones) and the 
> matching one is passed to the mail.
> So you receive a single mail with the all the matching recipients.
> 
> > bye
> > 
> > Ps: Is there also a healo check etc in james ?
> 
> What do you mean by "healo check"?
> 
> Stefano
> 
> ---------------------------------------------------------------------
> 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