0

My mailserver was set so that all the mails to info@domain were going to the root Maildir. Now, I'm wondering how could I "filter" these mails out so that I can see which mails were tried to be sent to info@domain.

I am using postfix + dovecot and my email for root is stored in /root/Maildir.

1 Answer 1

0

You can grep [email protected] /var/log/mail.log (or wherever postfix logs in your installation) and then refine the output and see how many messages were actually addressed to info@domain.

6
  • yes, and I get them with this command. But now, I would like to read them. So, since I know for a fact they are located in /root/Maildir/cur folder and I can read these mails by using cat, I'm wondering how to skim through those mails and find the ones that I need? Ultimatelly how could I delete ones that are not sent to info? Thx!
    – Nikola
    Apr 24, 2012 at 12:45
  • You need a mail reader capable of reading from maildir files like mutt. Depending the MUA there is always a way to filter messages based on the recipient's address. Since you run dovecot, any IMAP client (like Thunderbird for example) can do that.
    – adamo
    Apr 24, 2012 at 15:11
  • unfortunately this is not an option as this file has grown big (>1GB!) and that's why I'm trying to come up with the script which will skim through all the files, test if the info@domain is in it and if not - delete that file, where as a result I would be left with only files that have mails to info@domain
    – Nikola
    Apr 24, 2012 at 15:33
  • You can use alpine with dovecot. 1GB should not be a problem
    – adamo
    Apr 24, 2012 at 19:54
  • i've been googlin about alpine with dovecot but to no luck, can you suggest something?
    – Nikola
    Apr 24, 2012 at 21:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .