Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.