Any way we can create an SMTP server and use any scripting language to read emails from that server

Is there any way to create an SMTP mail server will all granular permissions to it so that I can read emails which that server receives through any scripting language and also reply from the same server automatically?

Several ways to do this, depending really on what you need and which postfix server you are using. Can you provide more info? Will the server be deliverying "Regular" mail into a Mailbox as well as for automatic replies? Which SMTP server can you use? Which OS? Do you want the reply to be automatic like a "vacation" setting, or as in an autoresponder for a mailing list?

1 Like

Thanks for the response.
What do you mean by a postfix server? I want to use a normal SMTP server which can be used for both in-bound and out-bound mail delivery. All the systems will be running in Linux. In my case i am using Ubuntu 11.10.
It will be delivering regular email as well as automatic replies like 'vacation'. Not as an autoresponder. Can I control the automatic replies?

Your question is still to general for these forums, but I will give you a general answer and maybe that will point you in the right direction. But I think maybe you need to find an expert that will consult with you for your specific needs.

Postfix is one of 3 major, free implementations of SMTP for UNIX. The others are sendmail and qmail. Of these, postfix has the best combination of flexibility and ease-of-configuration. All are available for Linux.

Postfix and sendmail are typically thought of as "MTAs" -- Mail Transport Agents. SMTP is a protocol designed for MTAs to talk with each other. (LMTP is another such protocol.) What you are asking for is a function typically provided by "MDAs" -- Mail Delivery Agents. These programs are delegated the responsibility of putting the mail into the right mailbox for the end-user. These programs typically do not interact with other systems or other computers -- only the system that the mail has been transported to (via the MTAs). Examples of such programs include

  • binmail
  • procmail
  • deliver

Take a look at the short Wikipedia article for these. You can start reading here: Mail delivery agent - Wikipedia, the free encyclopedia