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.
Sometimes I get a bounce back mail saying the e-mail address used wasn't valid. Is there a way to create a folder in "mail", and automatically sort these bounced back mails into this folder? Once this is done, how can I view these mails in a flat file manner? Am thinking of writing a script to parse through the mails to get the invalid e-mails all in one go.
Are you running your own mail server? If so, your mail is likely already organized into folders (new, old, spam, etc) and you should be able to create one for bounced and automatically sort the bounced messages into that. One program that comes to mind to do this is Sieve. It is commonly used with POP/IMAP programs such as Dovecot to sort mail into folders based on information in the headers, such as spam tags and it should be able to trigger on the bounce tag just as easily.
If you are just using an MUA (mail user agent) client to download your mail from a server, you can probably do the same kind of thing, where a filter is triggered on the bounced tag and placed in a separate folder.
I assume by "flat file manner" you mean that you want all the messages in one file as normally they are stored as simple text files. Once you have the messages isolated, you could use a script to concatenate them all into one file. In Evolution, I think this is pretty much what the Archive function does in its native format.
Thanks. When I type "mail", it just lists the messages all on the same page. It doesn't appear that there are any folders at all. Also, my Outlook is downloading all these reject mails in addition to the normal mails.
Once I setup folders on the server, and with these rejected mails sorted in a specific folder, Outlook will download only mails that aren't stored in folders, right?
Yes I'm running the mail server. It's a Postfix/Dovecot combo. I don't believe it's using Sieve.
Dovecot stores mail as separate files in either the cur or new directories. The cur contains items that are stored on the server but have been read and new contains the items that have not yet been read. Sieve can be used as a plug in for Dovecot that will look for flags and place the messages in a different folder. Some of the email server how-to documents show examples of using it for spam filing.
Since Outlooks interface is POP or IMAP protocols via Dovecot, I don't think it will directly map the mail folder (directories) to Outlook folders (Inbox). If this is what you want, then you should be set. I am sure there is a way to make it happen, but I don't know it off hand. If you want the messages to be stored in Outlook, I think the easiest approach to at least try first, would be to see if you can 'filter' in Outlook for the bounce tag in the headers and automatically place the messages in a folder.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.