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 Jerry M <te...@malcolms.com> on 2010/07/10 23:28:22 UTC

WhiteList Matcher Using Cryptic Sender Address

I received an email from  user@domain.com.   The Return-Path header in 
the email is: <pr...@domain.com>

The WhiteList matcher is using the latter address, which is useless for 
whitelist checking.  I'm seeing this long-string email address thing 
showing up more and more in emails from services like Constant-Contact.

I looked at the matcher code.  It is simply giving me mail.getSender().  
I guess I can't argue that this is indeed the 'sender' address as far as 
the low level SMTP stuff is concerned.  But I simply want the matcher to 
check the whitelist database for the user@domain.com version of the 
address instead of this address.  I know the address I want is in the 
email.  When it gets to Thunderbird, the from and reply-to appears 
correctly.

I have no problem modifying the matcher code.  I just need some advice 
on what to change it to.  I don't see any alternate methods on the mail 
class to give me the From or Reply-To address instead of the one I'm 
getting.

Can someone advise me on what to change it to?

Thanks.

Jerry


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


Re: WhiteList Matcher Using Cryptic Sender Address

Posted by Norman Maurer <no...@apache.org>.
Hi Jerry,

you can get the Headers via the MimeMessage:

mail.getMessage().getFrom();

Bye,
Norman


2010/7/10 Jerry M <te...@malcolms.com>:
> I received an email from  user@domain.com.   The Return-Path header in the
> email is: <pr...@domain.com>
>
> The WhiteList matcher is using the latter address, which is useless for
> whitelist checking.  I'm seeing this long-string email address thing showing
> up more and more in emails from services like Constant-Contact.
>
> I looked at the matcher code.  It is simply giving me mail.getSender().  I
> guess I can't argue that this is indeed the 'sender' address as far as the
> low level SMTP stuff is concerned.  But I simply want the matcher to check
> the whitelist database for the user@domain.com version of the address
> instead of this address.  I know the address I want is in the email.  When
> it gets to Thunderbird, the from and reply-to appears correctly.
>
> I have no problem modifying the matcher code.  I just need some advice on
> what to change it to.  I don't see any alternate methods on the mail class
> to give me the From or Reply-To address instead of the one I'm getting.
>
> Can someone advise me on what to change it to?
>
> Thanks.
>
> Jerry
>
>
> ---------------------------------------------------------------------
> 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