Solved

Hylafax Confirmations

Posted on 2004-09-30
10
373 Views
Last Modified: 2010-04-20
Hi, is there any way to configure hylafax or linux redhat 7 itself to either directly or indirectly send the email confirmations to a printer . The confirmations wind up in the users home mail box, but the users are using win 2k pro, and they cannot check that mail box, they only use outlook express which some hardly check, but if the confirms could be directed either to a printer or another fax machine that would work for us. PLEASE HELP.
0
Comment
Question by:jerrycsakanyjr
  • 6
  • 4
10 Comments
 
LVL 6

Expert Comment

by:blkline
ID: 12190584
On the server create a file called  "/etc/procmailrc".   Ensure that it is readable:  chmod +755 /etc/procmailrc.  Place inside of it:

:0
*   ^From:.your_hylafax_email_address   (whoever is the sender on the email in question)
| /usr/bin/a2ps -P desiredPrinterQueue

Any mail sent to anyone will checked for the hylafax address and if found, the mail will be formatted and delivered.

Ensure that you have the a2ps utility  (it makes things pretty).

You can also use:

| lpr -P deskredPrinterQueue  for a less fancy output.

Barry
0
 
LVL 6

Expert Comment

by:blkline
ID: 12190601
One thing I didn't mention.  If you want this to occur only for certain users then, instead of putting the file into /etc/procmailrc, create it in the user's home directory as:   .procmailrc.


For more information see

man procmail

Barry
0
 

Author Comment

by:jerrycsakanyjr
ID: 12190702
what does the :0 do ?
Where do you configure the hylafax email address ?
0
 
LVL 6

Expert Comment

by:blkline
ID: 12191112
This creates a procmail recipe.  :0 starts the recipe.  

Find the hylafax email address from one of the emails that it sends to your users.  That line is looking for a beginning of a line, followed by "From:." , followed by an e-mail address.  That's how it knows to process that e-mail.

| lpr -P print  

pipes the output through lpr or a2ps, your choice   (I'd do this one as it converts the text based message to post script for printing.

There are many cool things you can do with procmail.  Check:   man procmailex  for examples.

Barry
0
 

Author Comment

by:jerrycsakanyjr
ID: 12191280
we use sendmail though not procmail ...is this a problem ?
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 6

Expert Comment

by:blkline
ID: 12192261
sendmail is your MTA.   Procmail will be called on delivery.  You'll be fine.

BK
0
 

Author Comment

by:jerrycsakanyjr
ID: 12192285
Do i have to restart any services ...
0
 
LVL 6

Expert Comment

by:blkline
ID: 12192355
No.      Just create the file and have at it!   FWIW, I do this exact thing for some reports that we get e-mailed to us from our answering service.  The reports come in on e-mail and are printed at the appropriate printer for retrieval the next morning.
0
 

Author Comment

by:jerrycsakanyjr
ID: 12192419
Hmm.its not working, i'm getting them emails, but they are just not printing for some reason. Could that be because i have a .forward file that forward file in my home directory that forwards emails to a certain address ? I pasted the contents of the procmailrc file below see if there are any typos.


:0
* ^From:.fax@belleabstract.com
| /usr/bin/a2ps -P up-middle
0
 
LVL 6

Accepted Solution

by:
blkline earned 500 total points
ID: 12192838
The forward would supercede the procmailrc file, I think.  Be sure that you have procmail installed on this machine.  On RH 7 it should be there, but type "which procmail" just to be sure.  Also, type "which a2ps" to ensure that you have that tool, too.  Assuming that you have all of that, you need to see what's up with procmail.

Just for fun, copy that /etc/procmailrc file to the user's home directory.  Thus, if you are delivering mail to george, copy /etc/procmailrc to /home/george/.procmailrc, then chown george.george /home/george/.procmailrc.  

Alternately, set up a test account (say testprint) and create a .procmailrc file in /home/testprint.

Make its contents:

:0  (that a zero)
| /usr/bin/a2ps -P up-middle

Then send it some mail:

mail -s "Testing" testprint
You type here
^D  

And it should print.  That will give you some assurance that the basics are there and we can work on getting the other e-mails printed.

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now