private string GetAccountMessageDirectory(Account account) { var mailbox = EmailAddressParser.GetMailbox(account.Address); var domain = EmailAddressParser.GetDomain(account.Address); return(Path.Combine(_dataDirectory, domain, mailbox)); }
private bool IsMailerDaemonAddress(string address) { var mailbox = EmailAddressParser.GetMailbox(address); return(mailbox.Equals("MAILER-DAEMON", StringComparison.InvariantCultureIgnoreCase)); }