Automated mail handling - how to do it

Automated mail handling - how to do it

Post by Michael Borel » Tue, 23 Jul 1996 04:00:00



I'd like to set up my .forward file to run a program
that culls my incoming mail.  The vacation program
doesn't exist on my linux machine and everything I
try doesn't work.  How can I do this?

-Mike

 
 
 

Automated mail handling - how to do it

Post by Tim Lavo » Wed, 24 Jul 1996 04:00:00


    Michael> I'd like to set up my .forward file to run a program that
    Michael> culls my incoming mail.  The vacation program doesn't
    Michael> exist on my linux machine and everything I try doesn't
    Michael> work.  How can I do this?

I use procmail, which is pointed to by your .forward file. You can use
it to ditch mail, save it in folders according to source, or call
another program every time you get e-mail from Grandma. It is quite
nifty, and seems to be very robust. There is a similar program written
in Perl, though the name escapes me at the moment.

        Cheers,
        Tim

 
 
 

Automated mail handling - how to do it

Post by Michael Borel » Wed, 24 Jul 1996 04:00:00







>>    Michael> I'd like to set up my .forward file to run a program that
>>    Michael> culls my incoming mail.  The vacation program doesn't
>>    Michael> exist on my linux machine and everything I try doesn't
>>    Michael> work.  How can I do this?

>>I use procmail, which is pointed to by your .forward file. You can use
>>it to ditch mail, save it in folders according to source, or call
>>another program every time you get e-mail from Grandma. It is quite
>>nifty, and seems to be very robust. There is a similar program written
>>in Perl, though the name escapes me at the moment.

>>        Cheers,
>>        Tim

>Oops - I was a little bit too vague...

>I've tried to use the "pipe in the .forward file" approach and it doesn't
>work.  Not even for vacation.  It says that the user shell doesn't allow
>mail to run programs.  Is this a setup problem or something else?  I read
>somewhere that smail is easier to configure for mail handling than sendmail,
>so should I install smail?

>-Mike

Ok, found this problem, which was especially annoying.  When you
pipe your mail to a program, sendmail compares the user's command
shell to each entry in /etc/shells.  If there is not an exact match,
it will not allow the pipe.  Well, my command shell, as in /etc/passwd
was tcsh, which didn't match the entry in /etc/shells of /bin/tcsh.
Argh.

-Mike

 
 
 

Automated mail handling - how to do it

Post by Michael Borel » Wed, 24 Jul 1996 04:00:00





>    Michael> I'd like to set up my .forward file to run a program that
>    Michael> culls my incoming mail.  The vacation program doesn't
>    Michael> exist on my linux machine and everything I try doesn't
>    Michael> work.  How can I do this?

>I use procmail, which is pointed to by your .forward file. You can use
>it to ditch mail, save it in folders according to source, or call
>another program every time you get e-mail from Grandma. It is quite
>nifty, and seems to be very robust. There is a similar program written
>in Perl, though the name escapes me at the moment.

>    Cheers,
>    Tim

Oops - I was a little bit too vague...

I've tried to use the "pipe in the .forward file" approach and it doesn't
work.  Not even for vacation.  It says that the user shell doesn't allow
mail to run programs.  Is this a setup problem or something else?  I read
somewhere that smail is easier to configure for mail handling than sendmail,
so should I install smail?

-Mike

 
 
 

Automated mail handling - how to do it

Post by James Va » Wed, 24 Jul 1996 04:00:00


: I'd like to set up my .forward file to run a program
: that culls my incoming mail.  The vacation program
: doesn't exist on my linux machine and everything I
: try doesn't work.  How can I do this?

I run procmail, but the scripting is confusing.  Here's is a script
that keeps a local politician out of my mailbox, a simple change would
make it handle vacations. Procmail does far more than this, don't let
this .*rc fool you.  

To process all mail, try eliminating the "* ^From" line.  
And you might want to change the message, maybe?  ;-)

#~/.procmailrc
#
:0 c
* ^From.*andernet.org
* !^FROM_DAEMON
* !^X-Loop.*short.circuit.com
| (formail -rA"X-Loop: short.circuit.com" ; \
echo "" ; \
echo "Sorry, you are no longer allowed to send mail here." ; \
echo "This is an automated message." ; \
echo "" \
  ) | $SENDMAIL -t
:0 AE
junk-mail    

---eof---

 
 
 

Automated mail handling - how to do it

Post by Bob Smi » Wed, 24 Jul 1996 04:00:00


Take a look at 'procmail'.  It should be in /usr/bin if it's
installed (RedHat).  The Linux Journal had a great article
on it in the February '96 issue.

Hope this helps...
Bob Smith

: I'd like to set up my .forward file to run a program
: that culls my incoming mail.  The vacation program
: doesn't exist on my linux machine and everything I
: try doesn't work.  How can I do this?

: -Mike

 
 
 

Automated mail handling - how to do it

Post by Hans Geo » Wed, 24 Jul 1996 04:00:00



>I'd like to set up my .forward file to run a program
>that culls my incoming mail.  The vacation program
>doesn't exist on my linux machine and everything I
>try doesn't work.  How can I do this?

Check out procmail:
ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/procmail.tar.*
or
ftp://ftp.nvg.unit.no/pub/linux/sunsite\/system/Mail/malhandlers/procmail-3.10-2.tar.gz

--
:-- Hans Georg


student at Universitas Bergensis | http://brems.ii.uib.no/~s674/

Lady Fortuna is the protector of Capitalism,
please help unfolding Lady Justitia.

 
 
 

1. Q: Handling large mail loads....how to distribute mail handling??

I've been dealing with relatively reasonable mail loads on an AIX 4.3.2
7025-f50 (3 155MHz processors) machine running sendmail V8.8....2800
users
and a 2GB /var/spool/mail.  But the days of clean and simple ASCII text
mail are passing and the direct and indirect consequences can be
substantial.  
1) Someone puts a "pretty" graphic in an annoucement email and sends
that 250K file to 1000 users...now I have a 250MB lump in the mail
system.  And that's "legitimate"...
2) A few days ago, I had a clueless user attach a 4MB scanned image (the
text amounted to about 12K....the scanned image including dust specks
was 4MB) file to an email and send it to 1000 users on the mail
machine.  My mailbox filesystem went from 2GB to 6GB...that'sn
unjustifiable....but it happened.  Well, I've been pleasantly surprised
with how nicely the work got distributed over time instead of blocking
everything solid.  
3) The worst load on the mail server lately was a two day degradation of
our T1 line into random noise.  By the time things were finally set to
rights the queued mail in /var/spool/mqueue was substantial and the F50
(usually at 20-30%) was running flat out for 30 minutes to clear it out.

All this is clearly a portent: "richer" mail (video clips, anyone?) and
heavier loads to come....point-and-click mail makes users dangerous!
So......the question: How does one handle really *substantial* loads.
Yes, a hotter machine and hotter NIC card...but that only goes so far.
How do you distribute mail load over more than one machine?  How do you
deal with mail service distributed over multiple machines, file systems
and NICs?

---

// as for the rest: wife,house,children, cars, music, garden....

2. How to bridge IP packets only

3. NEEDED: Tips for automating e-mail handling and replies

4. Stupid question -kdenetwork package

5. Automated handling of Code Red HTTP requests

6. Toshiba CD-ROM and Internal Modem

7. Question on controlled automated input handling

8. Floppy install only - Newbie-ish question.

9. Use linux machine to handle automated backups from windows and mac systems on network?

10. Automated handling of Code Red HTTP requests

11. It`s IMPORTANT!!!

12. Please Help....it′s a very small thing!!!!.PLEASE

13. Help me !!!!!! I have no Idea it′s crucial