LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-06-2010, 11:24 AM   #1
grob115
Member
 
Registered: Oct 2005
Posts: 542

Rep: Reputation: 32
Sorting bounced back mail


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.
 
Old 09-07-2010, 05:23 AM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
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.
 
Old 09-07-2010, 08:26 AM   #3
grob115
Member
 
Registered: Oct 2005
Posts: 542

Original Poster
Rep: Reputation: 32
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.
 
Old 09-08-2010, 09:21 AM   #4
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
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.
 
  


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
[SOLVED] Email bounced back alphatest Linux - Software 13 07-09-2013 09:42 AM
Mail Getting Bounced rajesh.bahl Linux - Server 1 07-23-2010 12:23 PM
MAILS GETTING BOUNCED BACK (localhost.localdomain does not exists) chrlsquincy Linux - Server 8 01-22-2010 04:18 AM
Here is the error from the AOL sender whose messages have been bounced back from my maiwurd Linux - Software 2 01-26-2009 12:44 PM
Bounced back to login screen on Suse jcrb Linux - Newbie 2 03-07-2006 02:04 AM

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

All times are GMT -5. The time now is 03:04 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