Hi. El Viernes, 18 de Enero de 2008, Sandy Drobic escribió:
Carlos Lorenzo Matés wrote:
Hi to All.
Is possible to use a variable user in the pipe option?
Yeees... that is possible. Though I don't know if it is exactly what you require. "man 8 pipe" will tell you that the pipe deamon expands the localpart of the recipient address (the part left of the "@" character in the recipient address) for the macro ${user}. If that is the information you need, everything works.
ie:
procmail unix - n n - - pipe flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
in this line change the user=nobody to user=${user}
I wouldn't touch that.
If you deliver to a command via mailbox_command (not a pipe) then this comes to play:
Mailbox delivery can be delegated to an external command specified with the mailbox_command_maps and mailbox_com- mand configuration parameters. The command executes with the privileges of the recipient user (exceptions: sec- ondary groups are not enabled; in case of delivery as root, the command executes with the privileges of default_privs).
Would that help you?
it is not exactly to change the procmail user, but for changing the user in the emailto fax gateway, the line is similar.
How does the line look?
Well, the case is exactly this one. I have a mail to fax gateway, but the fax jobs are sent always with the same user (the sendfax). What i want is that the fax job is sent each time with the user who really send the mai Now i have this line in the master.cf fax unix - n n - 1 pipe flags= user=fax argv=/usr/bin/faxmail -d -n $(user) All the faxes seems to be sent by the user fax. I whant that each fax sent belongs to the user who really sent the fax. what i whould change is the user=fax to user=$(user), but i tried this and failed Thanks -- Un saludo. Carlos Lorenzo Matés. clmates AT mundo-r DOT com