Mail activated scripts

Ben Elliston bje at redhat.com
Sun Feb 10 12:37:43 EST 2002


>>>>> "Rasjid" == Rasjid Wilcox <rasjidw at bigpond.com> writes:

  Rasjid> I assume the best way to do this is use fetchmail to grab my mail, which then 
  Rasjid> passes it to the MTA (whick is sendmail on RH7.2 AFAIK).

Correct.

  Rasjid> Based on my reading of the sendmail config file (which does not mean a lot to 
  Rasjid> me), it looks like RH7.2 uses procmail as the MDA.  Is this
  Rasjid> correct?

Yes, but you can make certain:

	$ grep ^Mlocal /etc/{mail/,}sendmail.cf

  Rasjid> I then need to get KMail to check my 'local' account in 
  Rasjid> /var/spool/mail/username.  Do I use the Procmail lockfile 
  Rasjid> /var/spool/mail/username.lock in KMail??

I guess so--I've not used KMail much.

  Rasjid> Once I've got all this working, then I read up about
  Rasjid> procmail and how to get it to do things (like run a shell
  Rasjid> script on a certain type of mail trigger).

Yep, here is an example of such a recipe:

  :0 c
  * $^To:.*\<$\LOGNAME\>
  | command

  Rasjid> Anyway, does this look like the right approach?

Yes.

Ben




More information about the linux mailing list