Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

automatic replay to an user mail

Posted on 2004-10-07
5
Medium Priority
?
244 Views
Last Modified: 2010-08-05
Hello Experts!!..

We have a server with Redhat Enterprise 3.0 with sendmail+MailScanner running. We have a user named s.garzon. what i want to do is to reply, automatically, any message from  capipuer@telecartagena.com to this user with a message i want they to receive. I guess this can be done putting a .procmailrc file  in the user directory but i don't know how to do  it. Can somebody tell me how to do it??..

P.D.: the messages must be received, i just want to reply them.

Thanx

RBrayM.
0
Comment
Question by:rbraym
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:blkline
ID: 12254256
I'm not sure what you're asking.   Are you trying to replace any message sent from capipuer@telecaragena.com to s.garzon with a message of your own?  What about the original message?  Where should it go?

What you want is probably a procmail script.  You may be able to find a sample that accomplishes what you want by doing:

man procmailex

If you can't then be a bit more specific and we'll get you straightened out.

Barry
0
 

Author Comment

by:rbraym
ID: 12254525
Hello Barry..

The message must be received by s.garzon as normal.. all i want to do is trigger a reply message to capipuer@telecaragena.com when they sent a message to this user, saying that must sent that message to other user. Just that.

How can i do this??

Thanx
0
 
LVL 6

Accepted Solution

by:
blkline earned 240 total points
ID: 12255302
Pretty simple:

:0c
*     ^From:.capipuer@telecaragena.com
*     ^To:.s.garzon*
| echo "Your message was received" | mail -s "E-mail subject here" capipuer@telecaragena.com


This is the simplest thing.  If you have a longer message, you can do something like this:

....
| cat filename | mail -s "E-mail subject here" capipuer@telecaragena.com

Barry
0
 

Author Comment

by:rbraym
ID: 12266489
Thanks..  Barry.. It worked but i had to add .* in the beggining and the end of capipuer.. and s.garz.... addresses, 'cause i was getting NO MATCH error in procmail.log.

Just another question, if i want to change the FROM header in the message that is sent back to capipuer (with the text file).. how can i do this??

Thanx

RBrayM
0
 
LVL 6

Expert Comment

by:blkline
ID: 12267075
You can do that by using sendmail instead of the mail utility.  Try "man sendmail" and check out the -f and -r flags.

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

597 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