Networking Forums  

Go Back   Networking Forums > Networking Newsgroups > Linux Networking

Print certain emails using Postfix, Sieve and Cups

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2005, 09:52 AM
Default Print certain emails using Postfix, Sieve and Cups



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



Markus Bender
Reply With Quote
  #2  
Old 03-22-2005, 12:00 PM
Matt Payton
Guest
 
Posts: n/a
Default Re: Print certain emails using Postfix, Sieve and Cups

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

Tags
cups, emails, postfix, print, sieve

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
Forum Jump


All times are GMT. The time now is 07:47 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.