Vars for Custom Plugins - SpamAssassin

This is a discussion on Vars for Custom Plugins - SpamAssassin ; Can someone point me to a list and description of vars available to plugins. I know a couple like $pms->get("to") , etc but there's also "to:addr". I'm looking for some sort of reference that tell me what the differences are? ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Vars for Custom Plugins

  1. Vars for Custom Plugins

    Can someone point me to a list and description of vars available to plugins.

    I know a couple like $pms->get("to") , etc but there's also "to:addr". I'm
    looking for some sort of reference that tell me what the differences are?

    Also how to just get a clean "to" address. I've notice that may mailing
    lists will put their name in the to which screw me up. Any help would be
    much appreciated.

    Rick


  2. Re: Vars for Custom Plugins

    On Thu, May 22, 2008 at 08:57:37AM -0400, Rick Duval wrote:
    > Can someone point me to a list and description of vars available to plugins.
    >
    > I know a couple like $pms->get("to") , etc but there's also "to:addr". I'm
    > looking for some sort of reference that tell me what the differences are?


    $pms->get() is a function, not a variable.

    Take a look at "perldoc Mail::SpamAssassin::PerMsgStatus" for the functions
    from PerMsgStatus.

    --
    Randomly Selected Tagline:
    "Only your father could take a part-time job at a small town paper,
    and wind up the target of international assassins."
    - Marge Simpson, Guess Who's Coming to Criticize Dinner

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (GNU/Linux)

    iD8DBQFINXvHRnAwoQckjjoRAorVAKDIf7gCJbHsd+BbaAC9La vFrPzMZACgskN7
    QRrD5IQKu5DHcvPiVe10+j0=
    =rVzR
    -----END PGP SIGNATURE-----


  3. Re: Vars for Custom Plugins

    [sending back to users@ list since it's generally useful info]

    On Thu, May 22, 2008 at 11:25:44AM -0400, Rick Duval wrote:
    > One thing though, IF using to:addr I often get the name of the mailing list
    > as opposed to the actual recipient. Is there a "clean" way to get that?


    It sounds like you want the envelope recipient, not the "To" header field.

    Unfortunately, there's no standard way to get that since each MTA does it
    differently, if that information is added at all.

    There should probably be a standard get() option that at least attempts
    to figure this out similar to EnvelopeFrom (feel free to open a bugzilla
    request about it), but in the mean time, looking at another function in
    PerMsgStatus that wants similar data (in no particular order):

    $self->get('To') # std
    $self->get('Cc') # std
    $self->get('Apparently-To') # sendmail, from envelope
    $self->get('Delivered-To') # Postfix, poss qmail
    $self->get('Envelope-Recipients') # qmail: new-inject(1)
    $self->get('Envelope-To') # exim
    $self->get('X-Envelope-To') # procmailrc manpage
    $self->get('X-Delivered-To') # procmail quick start
    $self->get('X-Original-To') # procmail quick start
    $self->get('X-Rcpt-To') # procmail quick start
    $self->get('X-Real-To') # procmail quick start
    $self->get('Apparently-Resent-To') # procmailrc manpage

    Hope this helps.

    --
    Randomly Selected Tagline:
    "I lost my foo." - Theo

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.8 (GNU/Linux)

    iD8DBQFINZN6RnAwoQckjjoRAmHXAKCBJS1ykayb4YBDphMrFD 6KbC0clwCgr5bF
    0cOGd6jBgdwlbefBBGaaV/I=
    =13q/
    -----END PGP SIGNATURE-----


  4. Re: Vars for Custom Plugins

    Sorry , didn't send tha last email to the list as well/....

    Doesn't Spamassassin have a standard routine somewhere to deteremine who an
    email is for? It would seem like pretty basic stuff?

    Rick

    On Thu, May 22, 2008 at 11:38 AM, Theo Van Dinter
    wrote:

    > [sending back to users@ list since it's generally useful info]
    >
    > On Thu, May 22, 2008 at 11:25:44AM -0400, Rick Duval wrote:
    > > One thing though, IF using to:addr I often get the name of the mailing

    > list
    > > as opposed to the actual recipient. Is there a "clean" way to get that?

    >
    > It sounds like you want the envelope recipient, not the "To" header field.
    >
    > Unfortunately, there's no standard way to get that since each MTA does it
    > differently, if that information is added at all.
    >
    > There should probably be a standard get() option that at least attempts
    > to figure this out similar to EnvelopeFrom (feel free to open a bugzilla
    > request about it), but in the mean time, looking at another function in
    > PerMsgStatus that wants similar data (in no particular order):
    >
    > $self->get('To') # std
    > $self->get('Cc') # std
    > $self->get('Apparently-To') # sendmail, from envelope
    > $self->get('Delivered-To') # Postfix, poss qmail
    > $self->get('Envelope-Recipients') # qmail: new-inject(1)
    > $self->get('Envelope-To') # exim
    > $self->get('X-Envelope-To') # procmailrc manpage
    > $self->get('X-Delivered-To') # procmail quick start
    > $self->get('X-Original-To') # procmail quick start
    > $self->get('X-Rcpt-To') # procmail quick start
    > $self->get('X-Real-To') # procmail quick start
    > $self->get('Apparently-Resent-To') # procmailrc manpage
    >
    > Hope this helps.
    >
    > --
    > Randomly Selected Tagline:
    > "I lost my foo." - Theo
    >



  5. Re: Vars for Custom Plugins

    On 23.05.08 13:14, Rick Duval wrote:
    > Sorry , didn't send tha last email to the list as well/....
    >
    > Doesn't Spamassassin have a standard routine somewhere to deteremine who an
    > email is for? It would seem like pretty basic stuff?


    no, it is not. The real recipient is transferred in mail envelope, which
    needs not to appeart in headers.
    --
    Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
    Warning: I wish NOT to receive e-mail advertising to this address.
    Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
    BSE = Mad Cow Desease ... BSA = Mad Software Producents Desease


  6. Re: Vars for Custom Plugins

    How would you go about getting that?

    On Mon, May 26, 2008 at 4:26 AM, Matus UHLAR - fantomas
    wrote:

    > On 23.05.08 13:14, Rick Duval wrote:
    > > Sorry , didn't send tha last email to the list as well/....
    > >
    > > Doesn't Spamassassin have a standard routine somewhere to deteremine who

    > an
    > > email is for? It would seem like pretty basic stuff?

    >
    > no, it is not. The real recipient is transferred in mail envelope, which
    > needs not to appeart in headers.
    > --
    > Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
    > Warning: I wish NOT to receive e-mail advertising to this address.
    > Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
    > BSE = Mad Cow Desease ... BSA = Mad Software Producents Desease
    >



  7. Re: Vars for Custom Plugins

    > > no, it is not. The real recipient is transferred in mail envelope, which
    > > needs not to appeart in headers.


    Rick Duval wrote:
    > How would you go about getting that?


    Extend SpamAssassin's API to allow a caller to pass it additional
    information, like envelope addresses in this case, and possibly
    other interesting information about a SMTP session which never
    make it into a mail header.

    Mark


+ Reply to Thread