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

276881Re: Sender dependent issue

Expand Messages
  • Dragan Zubac
    Apr 29 6:56 AM
      Hello

      Here're the changed config files :

      /etc/postfix/main.cf

      myhostname = mx.domain.com
      myorigin = /etc/mailname
      mailbox_command = procmail -a "$EXTENSION"

      virtual_alias_maps = hash:/etc/postfix/virtual
      mydestination = $myhostname localhost.$mydomain localhost $mydomain
      relayhost = [10.0.0.202]:52345

      smtp_sender_dependent_authentication = yes
      sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
      smtp_sasl_auth_enable = yes
      smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

      **********************************************************

      /etc/postfix/virtual

      local@... local@localhost

      **********************************************************

      /etc/postfix/sender_relay

      zubacdragan@... [10.0.0.202]:52345

      **********************************************************

      /etc/postfix/sasl_password

      zubacdragan@... username:password

      **********************************************************

      Now I send one email to 'local@...' and it get delivered :

      Apr 29 14:46:54 mx postfix/smtpd[21720]: connect from
      f2zubac.test.com[10.0.0.250]
      Apr 29 14:46:54 mx postfix/smtpd[21720]: 3408B6A0065:
      client=f2zubac.test.com[10.0.0.250]
      Apr 29 14:46:54 mx postfix/cleanup[21724]: 3408B6A0065:
      message-id=<4DBAC12E.10900@...>
      Apr 29 14:46:54 mx postfix/qmgr[21672]: 3408B6A0065:
      from=<f2zubac@...>, size=919, nrcpt=1 (queue active)
      Apr 29 14:46:54 mx postfix/smtpd[21720]: disconnect from
      f2zubac.test.com[10.0.0.250]
      Apr 29 14:46:54 mx postfix/local[21725]: 3408B6A0065:
      to=<f2zubac@localhost>, orig_to=<local@...>, relay=local,
      delay=0.33, delays=0.26/0.01/0/0.06, dsn=2.0.0, status=sent (delivered
      to command: procmail -a "$EXTENSION")
      Apr 29 14:46:54 mx postfix/qmgr[21672]: 3408B6A0065: removed

      one email to noexist@... and get rejected as expected :

      Apr 29 14:48:42 mx postfix/smtpd[22073]: connect from
      f2zubac.test.com[10.0.0.250]
      Apr 29 14:48:42 mx postfix/smtpd[22073]: NOQUEUE: reject: RCPT from
      f2zubac.test.com[10.0.0.250]: 550 5.1.1 <noexisting@...>:
      Recipient address rejected: User unknown in local recipient table;
      from=<f2zubac@...> to=<noexisting@...> proto=ESMTP
      helo=<f2zubac.test.com>
      Apr 29 14:48:42 mx postfix/smtpd[22073]: disconnect from
      f2zubac.test.com[10.0.0.250]

      and now one email from 'zubacdragan@...' ,should be relayed to
      [10.0.0.202]:52345:

      Apr 29 14:50:41 mx postfix/smtpd[22394]: connect from
      mail-fx0-f51.google.com[209.85.161.51]
      Apr 29 14:50:41 mx postfix/smtpd[22394]: NOQUEUE: reject: RCPT from
      mail-fx0-f51.google.com[209.85.161.51]: 550 5.1.1
      <nolocal@...>: Recipient address rejected: User unknown
      in local recipient table; from=<zubacdragan@...>
      to=<nolocal@...> proto=ESMTP helo=<mail-fx0-f51.google.com>
      Apr 29 14:50:41 mx postfix/smtpd[22394]: disconnect from
      mail-fx0-f51.google.com[209.85.161.51]

      Shouldn't last email be forwarded to [10.0.0.202]:52345,since it is
      specified in /etc/postfix/sender_relay ?


      Sincerely

      On 04/29/11 14:26, Wietse Venema wrote:
      > Dragan Zubac:
      >> Hello
      >>
      >> I'm trying to achieve the following :
      >>
      >> 1. email arrives to local@... ,should be delivered locally to
      >> account local
      > /etc/postfix/main.cf:
      > virtual_alias_maps = hash:/etc/postfix/virtual
      > # DO NOT LIST domain.com IN VIRTUAL_ALIAS_DOMAINS
      > # DO NOT LIST domain.com IN VIRTUAL_MAILBOX_DOMAINS
      > # DO NOT LIST domain.com IN MYDESTINATION
      > mydestination = $myhostname localhost.$mydomain localhost ...
      >
      > /etc/postfix/virtual:
      > local@... local@localhost
      >
      >> 2. email arrives from anything@... to anything@...
      >> (excluding 'local@...') ,the email should be forwarded to remote
      >> smtp ([10.0.0.202]:52345) using user/pass from sasl_passwd file
      > /etc/postfix/main.cf:
      > relayhost = [10.0.0.202]:52345
      >
      > Wietse
      >
    • Show all 24 messages in this topic