LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-19-2010, 07:38 PM   #1
twistedpair
Member
 
Registered: Jan 2004
Posts: 71

Rep: Reputation: 15
Need some direction


Hi everyone,
I need to be able to build a perl script that can easily periodically check an email inbox for an incoming message, and read each message various items. Still using scripting, I'll need to be able to either create mailboxes or aliases without restarting the service (preferably), then be able to delete those same mailboxes/aliases later on. I also need to be able to handle multiple domain names. From all I can tell, postfix will do this for me, but I wanted to check with you all first to see if your experience has been the same.

When reading email, it'd be great if it was command-line or something that I can easily code into the perl script, and something that isn't interractive. So for instance if the command line utility brings up a text-rendered screen not unlike vi, that would be bad. It'd would almost be better to have it work like the "cat" command type of thing. Any ideas?

-TP
 
Old 06-20-2010, 12:29 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by twistedpair View Post
Hi everyone,
I need to be able to build a perl script that can easily periodically check an email inbox for an incoming message, and read each message various items. Still using scripting, I'll need to be able to either create mailboxes or aliases without restarting the service (preferably), then be able to delete those same mailboxes/aliases later on. I also need to be able to handle multiple domain names. From all I can tell, postfix will do this for me, but I wanted to check with you all first to see if your experience has been the same.

When reading email, it'd be great if it was command-line or something that I can easily code into the perl script, and something that isn't interractive. So for instance if the command line utility brings up a text-rendered screen not unlike vi, that would be bad. It'd would almost be better to have it work like the "cat" command type of thing. Any ideas?

-TP
Your question is a bit disjointed.

First, you can easily use Perl to create a script to read mail, and process it. But what's on the back end is meaningless, for the most part. Perl can read IMAP, POP3, and other mail server types...once you get the message in, you can process it however you want.

Back end actions (like creating/deleting users), will need a different script. You can do it with Perl, or with a shell-script. The actions you take will be different for sendmail than they are postfix, but either will work, just the commands will be different.

So basically: either postfix or sendmail will work for what you want, and you CAN write a Perl script to do it.
 
1 members found this post helpful.
Old 06-20-2010, 02:36 PM   #3
twistedpair
Member
 
Registered: Jan 2004
Posts: 71

Original Poster
Rep: Reputation: 15
Yep, that answers it, sorry it was a bit disjointed now having re-read it, but yeah that's what I needed to find out. Thank you.

-TP
 
  


Reply



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
Not sure exactly what I *need* to do..can someone point me in a direction? IPFW *BSD 4 01-29-2009 02:25 PM
A little direction please heideL Programming 5 11-17-2008 03:03 AM
Point me in the right direction arche Linux - Newbie 2 02-11-2008 10:02 AM
Need Direction Billn Linux - Newbie 1 09-11-2007 09:50 AM
pinging in one direction but not the other dehuszar Linux - Networking 5 01-20-2005 01:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:41 AM.

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