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

240648Re: Piped Commands using virtual LDAP aliases

Expand Messages
  • mouss
    Jul 1, 2008
    • 0 Attachment
      Derek Yarnell wrote:
      > On Jun 30, 2008, at 3:41 PM, mouss wrote:
      >
      >> Derek Yarnell wrote:
      >>> I am trying to get postfix to run a piped command from LDAP however
      >>> I am having some troubles as it seems to always append the local
      >>> host name to it so I am guess i am not even down the right path yet.
      >>
      >> http://www.postfix.org/postconf.5.html#myorigin
      >
      >
      >>>
      >>> I am trying to use nisMailAlias, is there anyone out there doing
      >>> this an if so how?
      >>
      >> if the above is not enough, try reading
      >> http://www.postfix.org/DEBUG_README.html#mail
      >>
      >
      > \
      > objectClass: top
      > nisMailAlias
      > umiacsExpire
      > cn: test@...
      > rfc822MailMember: "|/bin/true"
      >
      > [root@claven postfix]# postmap -q test@...
      > ldap:/etc/postfix/ldap-umiacs-mailman.conf
      > "|/bin/true"
      >
      > I have also tried with and without quotes.
      >
      > [root@claven postfix]# grep 26F5918E35 /var/log/maillog
      > Jul 1 10:00:43 claven postfix/smtpd[13454]: 26F5918E35:
      > client=dhcp214.proxy.umiacs.umd.edu[192.168.1.214]
      > Jul 1 10:00:48 claven postfix/cleanup[13458]: 26F5918E35:
      > message-id=<20080701140043.26F5918E35@...>
      > Jul 1 10:00:48 claven postfix/qmgr[13442]: 26F5918E35:
      > from=<derek@...>, size=391, nrcpt=1 (queue active)
      > Jul 1 10:00:48 claven postfix/local[13459]: 26F5918E35:
      > to=<|/bin/true@...>,
      > orig_to=<test@...>, relay=local, delay=14,
      > delays=14/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user:
      > "|/bin/true")
      > Jul 1 10:00:48 claven postfix/bounce[13460]: 26F5918E35: sender
      > non-delivery notification: BE60518E37
      > Jul 1 10:00:48 claven postfix/qmgr[13442]: 26F5918E35: removed
      >
      > main.cf
      > ----------
      > queue_directory = /var/spool/postfix
      > command_directory = /usr/sbin
      > daemon_directory = /usr/libexec/postfix
      > mail_owner = postfix
      > mydomain = mailman.umiacs.umd.edu
      > myorigin = mailman.umiacs.umd.edu
      > inet_interfaces = all
      > mydestination = $myhostname, localhost.$mydomain, localhost,
      > mailman.umiacs.umd.edu
      > virtual_alias_maps = ldap:/etc/postfix/ldap-umiacs-mailman.conf
      > $alias_maps

      remove $alias_maps from virtual_alias_maps. These are two different
      concepts. there is no command execution in virtual_alias_maps. Thus your
      "|/bin/tru@..." problem.

      > unknown_local_recipient_reject_code = 450
      > alias_maps = hash:/etc/aliases
      > alias_database = hash:/etc/aliases
      > debug_peer_level = 2
      > debugger_command =
      > PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
      > xxgdb $daemon_directory/$process_name $process_id & sleep 5
      > sendmail_path = /usr/sbin/sendmail.postfix
      > newaliases_path = /usr/bin/newaliases.postfix
      > mailq_path = /usr/bin/mailq.postfix
      > setgid_group = postdrop
      > html_directory = no
      > manpage_directory = /usr/share/man
      > sample_directory = /usr/share/doc/postfix-2.3.3/samples
      > readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
      >
      > ---
      > Derek T. Yarnell
      > University of Maryland
      > Institute for Advanced Computer Studies
      > derek@...
      >
      >
    • Show all 7 messages in this topic