Networking Forums

Networking Forums > Computer Networking > Linux Networking > Print certain emails using Postfix, Sieve and Cups

Reply
Thread Tools Display Modes

Print certain emails using Postfix, Sieve and Cups

 
 
Markus Bender
Guest
Posts: n/a

 
      03-22-2005, 08:52 AM
Hallo linuxer

I've got a little problem here and didn't find any answers yet. I've
tried to setup a sieve script which should redirect emails from
particular senders or to particular recipients to an alias called
print.
I have set up the alias
print: "|lpr -Plp"

When I send an email from the bash to print everything works fine and
the email is printed. When I send an email from outside the email is
just dropped in the normal mailbox without printing. I changed the
redirect destination in the Sieve script to another email address and
it
worked just fine. I don't know what could be wrong here. I also checked
my cups log. There is no attemped by postfix to use lpr.
Anybody an idea???
Thanks for your help

Markus

 
Reply With Quote
 
 
 
 
Matt Payton
Guest
Posts: n/a

 
      03-22-2005, 11:00 AM
On Tue, 22 Mar 2005 01:52:16 -0800, Markus Bender wrote:

> Hallo linuxer
>
> I've got a little problem here and didn't find any answers yet. I've
> tried to setup a sieve script which should redirect emails from
> particular senders or to particular recipients to an alias called
> print.
> I have set up the alias
> print: "|lpr -Plp"
>
> When I send an email from the bash to print everything works fine and
> the email is printed. When I send an email from outside the email is
> just dropped in the normal mailbox without printing. I changed the
> redirect destination in the Sieve script to another email address and
> it
> worked just fine. I don't know what could be wrong here. I also checked
> my cups log. There is no attemped by postfix to use lpr.
> Anybody an idea???


Maybe either permissions or PATH. I did something similar, and for
testing purposes I put the print commands in a shell script, and added
that to the alias. So it went something like :
In aliases...
print:"|/tmp/myshellscript"

/tmp/myshellscript...
#!/bin/sh
lpr -Pmyprinter

chmod a+x myshellscript

That way I was sure postfix could execute the shell script. Once I had it
working, I moved the script to somewhere postfix had read/execute access,
but was safer than /tmp.

Also, check your logs for any possible errors...Postfix is reasonably good
at telling you exactly what's going on.

--
- Matt -

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't print through CUPS from Linux to Windows XP printer d Linux Networking 4 08-02-2006 07:18 AM
print server compatiblie with fedora and CUPS socket connection kevin@mtel.co.uk Linux Networking 2 06-20-2006 02:04 PM
CUPS printer hangs after inactivity, requires CUPS restart Frnak McKenney Linux Networking 0 07-28-2005 11:56 PM
CUPS Lieven Linux Networking 1 11-10-2004 02:31 PM
help, pretty please, with linux on top. CUPS WOES! cant print Rob \ the nut \ Linux Networking 0 07-18-2004 02:50 PM



1 2 3 4 5 6 7 8 9 10 11