emailpostfix-mtamail-serverdovecotmail-sender

Does Dovecot-LDA need the -f argument (and what is its purpose)?


Dovecot-LDA seems to deliver mail without the -f argument, and delivered mail is identical with and without it, however many setup guides include it in the delivery command. I'm frequently seeing error messages regarding invalid -f arguments, and I figure that removing it from my delivery command should fix this.

How does the -f argument change Dovecot-LDA's behaviour, and do I really need to provide it?


Solution

  • -f sets "envelope sender". It is email address used in SMTP protocol MAIL FROM: command to indicate where delivery failure notifications should be send.

    AFAIK dovecot-lda does not use it itself but may be used by sieve filters.
    AFAIK Most MTA/SMTP servers put envelope sender address in Return-Path: header before the final delivery (e.g. before passing the message to dovecot-lda).

    My rule of thumb suggestion: Try to fix your problem.
    IF it is hard to fix AND you do not use envelope sender in sieve scripts
    THEN you may remove -f option from dovecot-lda command line parameters.