Possible Duplicate:
How to configure postfix to pipe all incoming email to a script?
I'm having problems setting up simple piping for Redmine (or '|cat > /tmp/temp')
/etc/postfix/virtual:
support@myhost.com support
/etc/postfix/aliases:
support: "|/opt/redmine-1.2.2/processemail.sh"
main.cf
virtual_alias_maps = hash:/etc/postfix/virtual, mysql:/etc/postfix/mysql_virtual_forwards.cf
virtual_mailbox_domains = myhost.com, mysql:/etc/postfix/mysql_virtual_domains.cf
virtual_mailbox_maps = hash:/etc/postfix/virtual_alias, mysql:/etc/postfix/mysql_virtual_mailboxes.cf
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps
processemail.sh:
#!/bin/sh
/opt/redmine-1.2.2/extra/mail_handler/rdm-mailhandler.rb --url http://myhost.com --key f5obfctmGfqZWnOWNtR8 --project test --tracker support --allow-override tracker,project --verbose --unknown-user accept --no-permission-check
I've run newaliases; postmap virtual; postalias aliases; postalias virtual_alias; newalias
- Yeah, probably overdoes it, but still misses the pouint :(
I've run newaliases and restarted postfix. Mail is delivered as usual, but nothing is added to /tmp
This is the only log entry saying anything about virtual
.
Dec 10 04:08:41 master postfix/virtual[3112]:
A3F46AD1BF: to=<support@myhost.com>, relay=virtual, delay=0.4,
delays=0.38/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
If I run cat someemail | processemail.sh
in the shell, everything works. Processemail isn't even run by postfix.
Anyone knows what might be wrong? Or how I can turn on more logging?