Carlos Lorenzo Matés wrote:
I'm having a lot of feedback in the hylafax list, i'm playing around a
few ideas they told me. But i will try in the postfix list if i don't
find a good solution
Have you tried to use the command in mailbox_command as I suggested? That
would take care of the user rights problem, provided the user is a system
user.
I tried with a custom script but i cant find how to get the mail to a variable
to pass it to the mailfax command, i get the rest of the parameters, but no
idea of how to get the mail itself (it comes form the pipe)
I don't really understand right what you mean with mailbox:command, sorry :-(
http://www.postfix.org/postconf.5.html#mailbox_command
This is only available for recipient address in $mydestination. The
documentation also lists the variables that can be used in mailbox_command.
the users ara autentified against pam and ldap, but there is not problem, the
command is executed as user fax, this is right , but i can pass it a
That is what would be different with mailbox_command. The script is called as
the user, that the command is run for.
parameter to set the job owner, the problem is that parameter is not in the
proper way in the postfix master.cf.
What i tried to do is call a custom script in the master.cf like that
fax unix - n n - 1 pipe
flags= user=fax argv=/usr/local/bin/customfax.sh $(user) $(sender)
then the customfax.sh shoul do
#owner sender
owner='cut -f 1 -d @ $sender'
#destination is user
destination=$1
faxmail -o $owner -d -n $destination (and here should pass the piped mail)
this is the point i'm stoped in this way
Okay, I finally realized just what you wanted to do. This is a script I
adjusted for your purpose.
You need to add error handling to your faxmail routine to achieve a robust
transport.
#-----------------------------------------------------
#!/bin/sh
# I set this up in /var/lib/filter
INSPECT_DIR=/var/lib/filter
# Exit codes from <sysexits.h>
EX_TEMPFAIL=75
EX_UNAVAILABLE=69
# Clean up when done or when aborting.
trap "rm -f in.$$" 0 1 2 3 15
# Start processing.
cd $INSPECT_DIR || {
echo $INSPECT_DIR does not exist; exit $EX_TEMPFAIL; }
cat >in.$$ || {
echo Cannot save mail to file; exit $EX_TEMPFAIL; }
# Specify your content filter here.
# filter <in.$$ || {
# echo Message content rejected; exit $EX_UNAVAILABLE; }
#owner sender
owner=`echo $2|cut -f 1 -d"@"`
#destination is the user
destination=$1
faxmail -o $owner -d -n $destination <in.$$
exit $?
#-----------------------------------------------------
--
Sandy
List replies only please!
Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]