Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 974211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T03:23:55+00:00 2026-05-16T03:23:55+00:00

How can we trigger a shell script on an unix server through an email

  • 0

How can we trigger a shell script on an unix server through an email with particular subject?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T03:23:56+00:00Added an answer on May 16, 2026 at 3:23 am

    procmail allows you to act on incoming mails, including filtering and starting external commands.

    Some useful links:

    • general procmail documentation: http://pm-doc.sourceforge.net/doc/
    • start a shell command as a procmail rule: http://porkmail.org/era/procmail/mini-faq.html#rtfm

    Just in case the link goes down, this is the link from the second point from above:

    Q: How can I run an arbitrary Perl or shell script on all or selected
    incoming mail?

    A: Install Procmail. Read the manual pages (there are several). Thank
    you.

    :0 * conditions, if any | your-script-here

    The conditions, in their simplest form, are regular expressions to
    match against the header of each incoming mail message. Correction:
    Even simpler, you can leave out the condition lines completely if you
    want to do your action (in this case, run a shell script)
    unconditionally.

    More-complicated conditions can also be exit codes of other shell
    scripts or programs, or tests against the full body of the message, or
    against Procmail variables (Procmail’s variables are also exported to
    the environment of subprocesses, so they are essentially environment
    variables. There are details about this later in this FAQ.)

    Actions can also be to save the message to a folder (appended to a
    Unix mailbox file, or written to a new file in a directory) or to
    forward the message to one or more other addresses. Finally, the
    action can be a nested block of more “recipes,” as these
    condition-action mappings are called in Procmail jargon, to try if the
    outer condition is met. The procmailrc(5) manual page has the full
    scoop.

    Obviously, you are not restricted to Perl or shell scripts. Anything
    you can run from a Unix command prompt can be run from Procmail, in
    principle, although running interactive programs doesn’t usually make
    much sense.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I trigger a stored procedure in SQL Server 2005 based on emails
In SQL Server 2005 Integration Services, how can I automatically trigger a restoration of
I have a shell script which I'd like to trigger from a J2EE web
I know we can trigger an Intent.ACTION_SEND intent to send email. But according to
Have a script that I can copy and run in mysql shell just fine,
May I know know I can trigger system to repaint nth row in JList?
Can a trigger for a table can be applied for tracking in same table?
How can I trigger the distant element which associates with the current button? For
I'm wondering if I can use a trigger on a table to ignore columns
How can I download files to my trigger.io app? My app shows offline data,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.