0

Sendmail is the easiest mail system around but i've a specific need i'm not able to manage atm.

i'm using a software (that use the maildir structure) and i would like to move all received email in another folder instead of the default one.

I've not seen anything configurable into sendmail.cf that could help me. Anyone have solved this problem or i need to pass further and think about adding postfix?

Regards

1
  • 3
    "Sendmail is the easiest mail system around" - Even the original author of sendmail considers the configuration syntax too complex: In retrospect, as the file got larger and 32-bit machines took over, it would have made sense to reconsider the syntax. There was a time when I thought about doing this but decided against it because I didn't want to break the "large" installed base (which at that point was probably a few hundred machines). In retrospect this was a mistake;" - aosabook.org/en/sendmail.html
    – HBruijn
    Oct 11, 2017 at 9:55

2 Answers 2

1

By default RHEL Sendmail uses procmail as the the local delivery agent, which you can easily tune from a ~/.procmailrc configuration file.

The sample .procmailrc below will duplicate each received message to two Maildir directories

### Keep carbon copy of message in ~/Backup_Inbox/
:0 c
./Backup_Inbox/
### Move messages to ~/Maildir/
:0w
./Maildir/
1

That's a job for a mail delivery agent (MDA) instead of a mail transfer agent (MTA).

  • For a standalone solution there's Procmail, Maildrop, Sieve...
  • Some IMAP server suites like Dovecot and Cyrus IMAP includes a MDA.
  • You have Postfix as a tag. For Postfix, there's Postdrop.

You must log in to answer this question.

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