Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-13-2008, 04:27 AM   #1
Registered: Nov 2007
Distribution: Ubuntu Server and Desktop
Posts: 41

Rep: Reputation: 15
Smile Send Mail with auto reply

Hi people,

I'm newbie with sendmail and I'm having a problem, probably it's easy to do it but I've got a user that I want to configure a message "Out of Office".
I've tried to search on the internet I found a site something like this

Linux security: mail, sendmail, fetchmail, procmail...

Sending automatic reply-mails

You can do this by checking e-mails automatically. I decided:

1. to get my e-mails
2. to let them check additionally

Create a file .forward in your homedirectory like this for a user wwwrun which shall get mails from persons with a special headline:

\wwwrun,"| /home/wwwrun/"

This means that the mail gets delivered to the user himself AND to the programm mentioned. The program is not too sophisticated:

# file ~/
# called by ~/.forward which looks like this for user wwwrun:
# wwwrun,"| /home/wwwrun/"
# mission: generate automatic mails as answers
use lib "/usr/local/bin/hor.module";
use mailhor;
# This is valid for all mails generated here:
my $smtpserver = "";
my $from = '';
# my $cc = '';
my $cc = '';

# Parse this mail:
my ($org_subject,$org_from,$org_replyto) = (undef,undef,undef);
my @mail = <STDIN>;
foreach (@mail) {
$org_subject = $1 if (/^Subject: (.*)$/i);
$org_from = $1 if (/^From: (.*)$/i);
$org_replyto = $1 if (/^Reply-To: (.*)$/i);
# Analyze
if ($org_subject =~ /please give me password for msdos-bootdisk/) {
system "logger \'sending dos-password-mail to $org_from\'";

sub send_disk_password {
my (%args) = @_;
my $to = $args{to};
my $cc = $args{cc};
my $subject = "Re: please give me password for msdos-bootdisk";
my $body =<<'EODISKPASSWORD';
thanks for your interest... blablabla.
From Nuernberg, Bavaria
Richard Lippmann
&mailhor::sendamail(smtpserver=>$smtpserver,from=> $from,
I don't know if it's better or the worst but indicates me that could be done with a little script, although the script won't work because when we sent an e-mail for the specific user the mail must return a message with out of office and that dosen't happend.

Help !!!!

Best Regards
Old 05-13-2008, 05:38 PM   #2
Registered: Nov 2007
Distribution: Ubuntu Server and Desktop
Posts: 41

Original Poster
Rep: Reputation: 15
Does anyone could help?

Hi people

Probably could be a dummy question buyt does anyone knows how to do it ?

Best Regards


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix : mail cannot send to send outside ( can send/receive locally) bobbinsupport Linux - Networking 3 12-15-2007 10:40 PM
Mail auto reply novis Linux - Software 2 05-08-2006 09:44 AM
coding problem on php auto send mail after a period akamaru607 Programming 12 09-01-2005 07:48 AM
Vacation Auto reply elainepearl Linux - Software 0 07-17-2003 03:26 AM
Auto reply jayakrishnan Linux - General 1 03-28-2002 04:39 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:49 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration