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 Bosco So <bo...@despammed.com> on 2004/01/17 05:55:47 UTC

hooking RemoteDelivery status

I'm spooling VERPed emails to a James server for remote delivery. I want 
to record in a database table the ultimate status of each delivery 
(after all retries).

What's the best way to do this? A blind approach is to extend the 
RemoteDelivery mailet to record successes and failures and replace all 
references to RemoteDelivery with my new mailet. Is there an easier way?

I'm using James 2.2.0a15 on Redhat Linux 8 & 9 with Sun's 1.4.2_01 java.

-- Bosco


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


RE: hooking RemoteDelivery status

Posted by "Noel J. Bergman" <no...@devtech.com>.
Bosco So wrote:

>> What's the best way to do [provide DSN]?

DSN support is on the list.  If I recall correctly a couple of people were
working on it.  Changes to LocalDelivery and RemoteDelivery would support
it.  IIRC, one idea was to attach DSN data as a mail attribute, and then
send the mail to a DSN processor.

> I've already deployed a bounce handler mailet to catch messages sent to
> the Return-Path

I assume that you mean to catch bounce messages, not generate them.  Also,
it should be a matcher.  FWIW, I have generic VERP code that uses regex to
define VERP patterns.

> my Management is stuck on the Lyris model (which micro-manages
> the delivery of messages down to the SMTP conversation level)

This would fit fine with the planned approach.  Please join the developer
list if you have an interest in contributing.

	--- Noel


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


Re: hooking RemoteDelivery status

Posted by Bosco So <bo...@despammed.com>.
>> I'm spooling VERPed emails to a James server for remote delivery. I 
>> want to record in a database table the ultimate status of each 
>> delivery (after all retries).
>>
>> What's the best way to do this? A blind approach is to extend the 
>> RemoteDelivery mailet to record successes and failures and replace 
>> all references to RemoteDelivery with my new mailet. Is there an 
>> easier way?
>>
>> I'm using James 2.2.0a15 on Redhat Linux 8 & 9 with Sun's 1.4.2_01 java.
>
>
> You don't need to touch RemoteDelivery.  Modifying RemoteDelivery 
> would only help you catch deliveries that failed fast, and not 
> messages that get processed remotely and bounced back (two alternate 
> ways a remote server could do the same thing).
>
> Setup a matcher that looks for your address pattern, and then fire 
> whatever mailet you want when that VERP address arrives.
>
> There is a mime type that defines how/why a message bounces, and I was 
> surprised that a large number (> 60%) of the bounces I get include 
> this information.  I don't know whether anyone has had time to, but 
> there was talk of having RemoteDelivery create this mime type as part 
> of bounces, and then code to help you read this.  Unfortunately I 
> forget the RFC off hand.
>
> But for my purpose, I just records bounces as yes/no.  It's not as 
> intelligent as I would like, but it works for now.


I've already deployed a bounce handler mailet to catch messages sent to 
the Return-Path (whose value is different from the From: and Reply-To: 
headers). The assumption is that any messages sent to the address 
specified in the Return-Path is a bounce (see PS below). I hope that's 
an OK assumption. I also have a different mailet to handle the messages 
sent to Reply-To: (which is VERPed with a different prefix).

The problem is, my Management is stuck on the Lyris model (which 
micro-manages the delivery of messages down to the SMTP conversation 
level) and they

   1. Want to know the exact time that an email was successfully
      delivered (which is usually much different than when it was
      spooled because of the volume of mail we handle)
   2. Do NOT like the idea that the number of successfully delivered
      messages is  NUM_SPOOLED - NUM_BOUNCED and that they won't know
      that exact count until after NUM_RETRIES * RETRY_INTERVAL (5 * 6
      hours). They want a record in a table that says a message was
      delivered (even though I warned them that such a message may be
      bounced by an external server two days later).

Management REALLY wants to know the fast successes and failures and I'm 
on the hook (pun intended) to implement it. So that comes back to my 
original request for advice on hooking or extending RemoteDelivery.

-- Bosco

PS: Don't know if this is a bug or not, but James seems to be sending 
some fast fail bounces to the address specified in my Reply-To: header 
instead of the Return-Path: header. I'll detail this in another message 
to keep the topics separate.

PPS: Regarding categorizing bounces, I'm not doing that right now 
(mainly due to lack of time). But I'm keeping my eyes peeled for RegEx 
that'll help categorize bounces into some main categories. There is 
enough fodder here for a huge lively discussion.





Re: hooking RemoteDelivery status

Posted by Serge Knystautas <se...@lokitech.com>.
Bosco So wrote:
> I'm spooling VERPed emails to a James server for remote delivery. I want 
> to record in a database table the ultimate status of each delivery 
> (after all retries).
> 
> What's the best way to do this? A blind approach is to extend the 
> RemoteDelivery mailet to record successes and failures and replace all 
> references to RemoteDelivery with my new mailet. Is there an easier way?
> 
> I'm using James 2.2.0a15 on Redhat Linux 8 & 9 with Sun's 1.4.2_01 java.

You don't need to touch RemoteDelivery.  Modifying RemoteDelivery would 
only help you catch deliveries that failed fast, and not messages that 
get processed remotely and bounced back (two alternate ways a remote 
server could do the same thing).

Setup a matcher that looks for your address pattern, and then fire 
whatever mailet you want when that VERP address arrives.

There is a mime type that defines how/why a message bounces, and I was 
surprised that a large number (> 60%) of the bounces I get include this 
information.  I don't know whether anyone has had time to, but there was 
talk of having RemoteDelivery create this mime type as part of bounces, 
and then code to help you read this.  Unfortunately I forget the RFC off 
hand.

But for my purpose, I just records bounces as yes/no.  It's not as 
intelligent as I would like, but it works for now.

-- 
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

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


Re: Virtual Hosting

Posted by Serge Knystautas <se...@lokitech.com>.
Matt Anderson wrote:
>     Thank you serge for you reply. I greatly appreciate it however I have a
> follow up question. If POP3 protocol has no support for my problem (shown
> below) then it would be safe to assume that you would have to do this form
> of redirection to other mailboxes on all email servers? Thanks again.

Yes.

-- 
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com

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


RE: Virtual Hosting

Posted by Matt Anderson <mu...@swiftdsl.com.au>.
Hi All,
    Thank you serge for you reply. I greatly appreciate it however I have a
follow up question. If POP3 protocol has no support for my problem (shown
below) then it would be safe to assume that you would have to do this form
of redirection to other mailboxes on all email servers? Thanks again.

Kindest Regards,
    Matt Anderson

-----Original Message-----
From: Serge Knystautas [mailto:sergek@lokitech.com]
Sent: Saturday, January 17, 2004 5:30 PM
To: James Users List
Subject: Re: Virtual Hosting


Matt Anderson wrote:
> Hi All,
>     I have implemented the redirection of incoming emails with the same
> usernames with different domains, ie admin@domain1.com and
admin@domain2.com
> however I have a burning question. Is there anyway at all to be able to
have
> both clients log into their email account using username 'admin' and
> password 'whatever' and access there emails for the associated domain to
> which they were sent. I know this is confusing to follow but I am hoping
> some of you more familiar with James maybe able to help me out. Thank you
> for your time and I look forward to hearing from any response which you
may
> have.

No.

http://james.apache.org/FAQ.html#7

See the part about how POP3 protocol has no support for that.  The FAQ
does describe a way to do virtual hosting, but you can't have the same
username mapped to different mailboxes.

--
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com


---------------------------------------------------------------------
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: Virtual Hosting

Posted by Serge Knystautas <se...@lokitech.com>.
Matt Anderson wrote:
> Hi All,
>     I have implemented the redirection of incoming emails with the same
> usernames with different domains, ie admin@domain1.com and admin@domain2.com
> however I have a burning question. Is there anyway at all to be able to have
> both clients log into their email account using username 'admin' and
> password 'whatever' and access there emails for the associated domain to
> which they were sent. I know this is confusing to follow but I am hoping
> some of you more familiar with James maybe able to help me out. Thank you
> for your time and I look forward to hearing from any response which you may
> have.

No.

http://james.apache.org/FAQ.html#7

See the part about how POP3 protocol has no support for that.  The FAQ 
does describe a way to do virtual hosting, but you can't have the same 
username mapped to different mailboxes.

-- 
Serge Knystautas
President
Lokitech >>> software . strategy . design >> http://www.lokitech.com
p. 301.656.5501
e. sergek@lokitech.com


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


Virtual Hosting

Posted by Matt Anderson <mu...@swiftdsl.com.au>.
Hi All,
    I have implemented the redirection of incoming emails with the same
usernames with different domains, ie admin@domain1.com and admin@domain2.com
however I have a burning question. Is there anyway at all to be able to have
both clients log into their email account using username 'admin' and
password 'whatever' and access there emails for the associated domain to
which they were sent. I know this is confusing to follow but I am hoping
some of you more familiar with James maybe able to help me out. Thank you
for your time and I look forward to hearing from any response which you may
have.

Kindest Regards,
    Matt Anderson


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