Loading ...
Sorry, an error occurred while loading the content.

PATCH (well kind of) (was: bounces and sender_dependent_relayhost_maps)

Expand Messages
  • Wietse Venema
    ... OK, got it. The sender_dependent_relayhost_maps feature does not currently handle the null sender address. That is an omission that can be rectified. If
    Message 1 of 2 , Nov 21, 2007
    • 0 Attachment
      Keean Schupke:
      > sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost

      OK, got it. The sender_dependent_relayhost_maps feature does
      not currently handle the null sender address. That is an omission
      that can be rectified.

      If you could add this in trivial-rewrite/resolve.c:

      /*
      * With off-host delivery, sender-dependent or global relayhost
      * override the recipient domain.
      */
      OLD if (rp->snd_relay_info && *sender
      NEW if (rp->snd_relay_info && (*sender ? sender : var_empty_relayhost_maps_key)
      && (relay = mail_addr_find(rp->snd_relay_info, sender,
      (char **) 0)) != 0)
      vstring_strcpy(nexthop, relay);

      Where var_empty_relayhost_maps_address is defined in global/mail_params.h
      with:

      #define VAR_NULL_RELAYHOST_KEY "empty_address_relayhost_map_lookup_key"
      #define DEF_NULL_RELAYHOST_KEY "<>"
      extern char *var_empty_relayhost_maps_key;

      and approprate lines in trivial-rewrite/trivial-rewrite.c with:

      at the top:

      char *var_empty_relayhost_maps_key;

      in main():
      VAR_NULL_RELAYHOST_KEY, DEF_NULL_RELAYHOST_KEY, &var_empty_relayhost_maps_key, 1, 0,

      Then it could be made to work.

      I'm working on getting something out the door myself, so no time
      to write and test a patch.

      Wietse
    • George Forman
      FYI... ... NEW NEW if (rp- snd_relay_info && (*sender ? sender : var_empty_relayhost_maps_key) && (relay = mail_addr_find(rp- snd_relay_info, (*sender ?
      Message 2 of 2 , Nov 28, 2007
      • 0 Attachment
        FYI...

        > If you could add this in trivial-rewrite/resolve.c:
        >
        > /*
        > * With off-host delivery, sender-dependent or global relayhost
        > * override the recipient domain.
        > */
        > OLD if (rp->snd_relay_info && *sender
        > NEW if (rp->snd_relay_info && (*sender ? sender : var_empty_relayhost_maps_key)
        > && (relay = mail_addr_find(rp->snd_relay_info, sender,
        > (char **) 0)) != 0)
        > vstring_strcpy(nexthop, relay);

        NEW NEW if (rp->snd_relay_info && (*sender ? sender : var_empty_relayhost_maps_key)
        && (relay = mail_addr_find(rp->snd_relay_info, (*sender ? sender : var_empty_relayhost_maps_key),
        (char **) 0)) != 0)
        vstring_strcpy(nexthop, relay);

        ----------------------------------------
        > Subject: PATCH (well kind of) (was: bounces and sender_dependent_relayhost_maps)
        > To: keean@...
        > Date: Wed, 21 Nov 2007 13:28:17 -0500
        > CC: postfix-users@...
        > From: wietse@...
        >
        > Keean Schupke:
        >> sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost
        >
        > OK, got it. The sender_dependent_relayhost_maps feature does
        > not currently handle the null sender address. That is an omission
        > that can be rectified.
        >
        > If you could add this in trivial-rewrite/resolve.c:
        >
        > /*
        > * With off-host delivery, sender-dependent or global relayhost
        > * override the recipient domain.
        > */
        > OLD if (rp->snd_relay_info && *sender
        > NEW if (rp->snd_relay_info && (*sender ? sender : var_empty_relayhost_maps_key)
        > && (relay = mail_addr_find(rp->snd_relay_info, sender,
        > (char **) 0)) != 0)
        > vstring_strcpy(nexthop, relay);
        >
        > Where var_empty_relayhost_maps_address is defined in global/mail_params.h
        > with:
        >
        > #define VAR_NULL_RELAYHOST_KEY "empty_address_relayhost_map_lookup_key"
        > #define DEF_NULL_RELAYHOST_KEY "<>"
        > extern char *var_empty_relayhost_maps_key;
        >
        > and approprate lines in trivial-rewrite/trivial-rewrite.c with:
        >
        > at the top:
        >
        > char *var_empty_relayhost_maps_key;
        >
        > in main():
        > VAR_NULL_RELAYHOST_KEY, DEF_NULL_RELAYHOST_KEY, &var_empty_relayhost_maps_key, 1, 0,
        >
        > Then it could be made to work.
        >
        > I'm working on getting something out the door myself, so no time
        > to write and test a patch.
        >
        > Wietse

        _________________________________________________________________
        Share life as it happens with the new Windows Live.Download today it's FREE!
        http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_112007
      Your message has been successfully submitted and would be delivered to recipients shortly.